Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem displaying repo status properly #240

Closed
jave opened this issue May 17, 2023 · 12 comments · Fixed by #241
Closed

problem displaying repo status properly #240

jave opened this issue May 17, 2023 · 12 comments · Fixed by #241
Assignees
Labels
bug Something isn't working

Comments

@jave
Copy link

jave commented May 17, 2023

Hello,

I have an odd problem displaying repo status properly.

I run "gita ll" several times after each other.
each run status is reported randomly for different repositories, that is, the status color changes from green to white, to back again.

This of course makes the functionality unusable, so I suspect something fundamentally wrong in my local setup, but I cant figure out what.

Any debugging help would be appreciated. Im sorry for the vagueness in the report, but its a really odd problem.

Some more info:

Python 3.10.11

The repos I try to work with are from: gitlab.com/arbetsformedlingen, a group of about 400 repos. They where initially cloned with Ghorg.

I run gita in an emacs shell buffer, but the problem is the same in a terminal.

@nosarthur
Copy link
Owner

what gita version are you using?

do u run gita ll literally back to back while the repos are not updating? is color the only difference from run to run? what is the correct status if you determine if with raw git command?

@jave
Copy link
Author

jave commented May 18, 2023

gita 0.16.3 installed with pip yesterday

color differs to from run to run, but also the * status for some repos

the repos are not uppdating

heres status of one repo:

14:43:30-joakim@tanaka:~/jobtech/arbetsformedlingen/devops/calamari-build-and-testing-cluster-roadmap$ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   readme.org

no changes added to commit (use "git add" and/or "git commit -a")

atm gita ll reports it as

calamari-build-and-testing-cluster-roadmap                                                                main       update (14 timmar sedan)

status in green

this is so strange Im thinking a problem in dependencies or something?
do you have a working docker container or the like, I could compare with?

@jave
Copy link
Author

jave commented May 18, 2023

example:

14:50:07-joakim@tanaka:~/jobtech/arbetsformedlingen/devops/calamari-build-and-testing-cluster-roadmap$ gita ll |grep calamari-build-and-testing-cluster-roadmap
calamari-build-and-testing-cluster-roadmap                                                                main       update (14 hours ago)
14:50:56-joakim@tanaka:~/jobtech/arbetsformedlingen/devops/calamari-build-and-testing-cluster-roadmap$ gita ll |grep calamari-build-and-testing-cluster-roadmap
calamari-build-and-testing-cluster-roadmap                                                                main       update (14 hours ago)
14:51:05-joakim@tanaka:~/jobtech/arbetsformedlingen/devops/calamari-build-and-testing-cluster-roadmap$ gita ll |grep calamari-build-and-testing-cluster-roadmap
calamari-build-and-testing-cluster-roadmap                                                                main *     update (14 hours ago)

so the asterisk shows up in the 3rd run, but nothing happened with the repo in between.

@nosarthur
Copy link
Owner

could you try 0.16.2.4 and see if the problem persists?

0.16.3 contains an optimization with threadpool #238 I wonder if that causes any race conditions

@nosarthur
Copy link
Owner

Actually I can reproduce your problem with 0.16.3 locally with my own repos (only about 10 of them) and it doesn't exist in 0.16.2.4

@nosarthur nosarthur self-assigned this May 18, 2023
@nosarthur nosarthur added the bug Something isn't working label May 18, 2023
@jave
Copy link
Author

jave commented May 18, 2023

Do you mean I should try commit 6389470? The one before the threadool commit? I cant find a 0.16.2.4 tag.

@nosarthur
Copy link
Owner

you can do either pip3 install gita==0.16.2.4 or python3 -m pip install gita==0.16.2.4 with the right python installation, depending on how your python is installed

@nosarthur
Copy link
Owner

I know what the problem is. To get the repo information, I changed directory in a bad way. It should be done in the subprocess call via cwd

https://github.com/nosarthur/gita/blob/master/gita/info.py#L203

@nosarthur
Copy link
Owner

@jave it should be fixed if you update gita to 0.16.3.1

thanks for reporting, I will close the case after fixing the unit tests

@jave
Copy link
Author

jave commented May 19, 2023

the asterisk display seems to work properly with 0.16.2.4

the color white, local has no remote, shows up randomly still, ill double check that its not on my end

@jave
Copy link
Author

jave commented May 19, 2023

I think the problem with "white" repos are on my end now. Ghorg cloned a bunch of repos in our org that where empty, and these get the color white. So it was a combination of problems

@nosarthur
Copy link
Owner

let me know if you find anything that doesn't make sense

you can always compare to 0.16.2.4 which should give the correct result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants