-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
CI: PrAssignee.yml
: .catch()
and return the error object if 404 is encountered when checking collaborator status
#58550
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
|
f89ea9c
to
2910793
Compare
PrAssignee.yml
: don't auto-retry on 404PrAssignee.yml
: .catch()
and return the error object if 404 is encountered when checking collaborator status
…s encountered when checking collaborator status
34e888d
to
64c22b3
Compare
Alright, I have tested this out to make sure it works when the PR author is not a committer. Test PR: #58553 Example success CI log: https://github.com/JuliaLang/julia/actions/runs/15307035514/job/43062234033?pr=58553 |
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.
If it were me I'd leave a shorter inline comment and explain it in the commit message, but this LGTM aside from the unnecessary retry-exempt-status-codes
retry-exempt-status-codes: "403,404" | ||
# In the above list: | ||
# | ||
# - 404 is in the list because we will always hit a 404 when the PR author is not | ||
# a committer. This 404 is normal and expected. |
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.
retry-exempt-status-codes: "403,404" | |
# In the above list: | |
# | |
# - 404 is in the list because we will always hit a 404 when the PR author is not | |
# a committer. This 404 is normal and expected. |
This isn't needed per the readme of plugin-retry.jl
Retries requests for server 4xx/5xx responses except 400, 401, 403, 404, 410, 422, and 451.
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.
I was actually wanting to retry on 400. In the past (although I don't have an example handy), I've seen GitHub give intermittent 400 in situations that were actually GitHub's fault server-side1.
So I'd want us to still retry on 400 - I'm fine with adding the other above-listed codes to our manual list. With that being said, the only one we actually know that we expect to see (in the normal/happy path) is 404, so really we could remove 403 (from our manual list) and just have 404 in our manual list.
Footnotes
-
Which really means that GitHub should have been returning a 5xx, because it's a server-side problem on their end, but in the past I've sometimes gotten 400 from them in such situations. ↩
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.
I made a PR to update the list and comment #58555
I'll merge this so we can try it out. @LilithHafner Can you review post-merge, and let me know if you have any changes you'd like me to make? Also, if things go haywire, we always have the "emergency off switch" as described here: #58303 (comment) |
@@ -38,7 +38,11 @@ jobs: | |||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |||
with: | |||
retries: 5 # retry GitHub API requests up to 5 times, with exponential backoff | |||
retry-exempt-status-codes: 403 | |||
retry-exempt-status-codes: "403,404" |
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.
retry-exempt-status-codes: "403,404" | |
retry-exempt-status-codes: "404" |
As noted in #58550 (comment) --------- Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
Follow-up to #58303.