-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-134262: Add retries to generate_sbom.py #134263
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
Conversation
generate_sbom.py downloads artifacts, which can flake. This commit adds exponential backoff to the download to avoid failures due to network flakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
- Add `base_delay` for retries - use a for loop instead of while loop - rename retries to max_retries
Thanks! And backport to 3.13? |
Yeah backport to 3.14 and 3.13 is probably a good idea. |
Would you like to add the "needs backport" labels? |
Thanks @emmatyping for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Thanks @emmatyping for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
(cherry picked from commit 0c5a8b0) Co-authored-by: Emma Smith <emma@emmatyping.dev> Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Sorry, @emmatyping and @hugovk, I could not cleanly backport this to
|
GH-134460 is a backport of this pull request to the 3.14 branch. |
Here's a build that failed even with https://github.com/python/cpython/actions/runs/15169080044/job/42654367027?pr=134456 Shall we bump some numbers? And print out Would help us identify any flaky resources and possibly fetch from a reliable location. |
Yeah, I can bump numbers (wanted to be conservative initially), note the location, and maybe add jitter? |
Thanks, not sure how much jitter would help here, but no objection. |
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Tools/build/generate_sbom.py
downloads artifacts, which can flake. This commit adds simple exponential back-off retries to the download to avoid failures due to network flakes.