-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Timeout with version 8.0.4 (git describe) #957
Comments
I was able to reproduce this issue in a consistent manner in particular case: running inside a container while redirecting the output to another command. The issue also happens with olders setuptools-scm such 7.1.0 (shipped in fedora 39) Reproduce #!/bin/bash
python3 -m setuptools_scm | cat Result with 8.0.4
The repository where I get this is not even so large, but it has lots of tags matching the pattern, https://github.com/ansible/ansible-lint -- When running directly on my mac, the Still when redirection is involved, it fails miserably. Because this command is part of the building of the RPMs, the entire process is now broken. If the number of tags in the repository is what causes the issue, I could consider culling the very old ones. That is clearly not something that I would do happily because it could really affect some users that are using ancient versions via git. Maybe someone has some ideas about what can be done to address this issue. |
this is the first time i see this on unix with git ever - before only windows would fail on github due to sometimes taking >30 seconds to run hg commands i never had a consistent reproducer, and its absolutely unclear why it happens |
is the container you use using docker/podman machine? - its thinkable that the filesystem sync + vm play a role in setting this up the reason why the 20 second timeout was added is that sometimes pipelines would hang for minutes or into job timeouts how much time does the reproducer need ? |
@RonnyPfannschmidt My machine is an M1 mac (arch64) where I have both podman and docker engines installed, both containers do match the arch64 architecture, so they are expected to be fast. Funny is that the slowness seems to happen only on podman one, docker seems fast at this operation. Note: I am still debugging the issue, as you mentioned, is a very weird one and I bet that if it was widespread the issue tracker would be boiling. I am not questioning your timeout, I kinda guessed that without one it would be worse. 20s is big already, especially for computing a version number. I am wondering if that might be a regression with newer podman, i might have to reset the podman machine just to be sure. Another question still remains,.... why would this git command prove to be so slow/intense? (disregarding the likely virtualization costs). |
That's absolutely unclear to me When it was only windows workers, it was easy blame FS pressure plus a miss config Does it still happen when git is executed before? What's the times in setuptools-scm debug logs |
I have more details on the Windows case I originally brought up:
|
As a workaround (since currently there is no way to modify the default
|
Why not introduce a configurable timeout? Proposal:
or a finer-granularity for the different git commands... |
would it be sufficient to have the scm status command/help command be executed with a minute timeout + some loggingin case it takes longer (then setuptools_scm would log a few errors noting the timeout/delay) |
That's definitely an improvement. However, I wonder if it won't fail to scale: since apparently git index refresh depends (in such LFS cases) on pulling files from the remote (still puzzled about this, but this is how git behaves...) - it might take longer in slow network conditions or large amounts of data or slow file-systems. Therefore, it feels to me that a common and reasonable timeout should be a default, but the user should ultimately have the option to configure the timeout value based on his/hers repo and network conditions. |
There's a limit to how much user/setup inflicted mess setuptools-scm ought to handle For more timeout intensity stuff people ought to handle it by running their cache refreshing commands before the build |
Agreed, I'm with you on that; but in this case the user is running |
If you're onboard, I'll be glad to try and contribute that feature (if that helps) |
Im curious about the solution you have in mind |
I was thinking on an environment variable override (https://setuptools-scm.readthedocs.io/en/latest/overrides/) Rationale: the matter we discuss is mostly impacted by environment aspects (network, file-system performance vs. repository content, configuration and size). Therefore, for package maintainers it sounds wrong to have the timeout override as part of Variable scope/impact: should we go with a very "wide" definition (e.g. Looking forward to hearing your thoughts :) |
A partially related update: I think I see how |
i'm adding |
Thank you! |
This issue is similar to #913
But this time with the command
git describe ...
The text was updated successfully, but these errors were encountered: