Skip to content

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

Merged
merged 1 commit into from
May 28, 2025

Conversation

DilumAluthge
Copy link
Member

@DilumAluthge DilumAluthge commented May 28, 2025

Follow-up to #58303.

@DilumAluthge DilumAluthge requested a review from LilithHafner May 28, 2025 14:41
DilumAluthgeBot added a commit to DilumAluthgeBot/julia that referenced this pull request May 28, 2025
DilumAluthgeBot added a commit to DilumAluthgeBot/julia that referenced this pull request May 28, 2025
@DilumAluthge
Copy link
Member Author

DilumAluthge commented May 28, 2025

This alone isn't sufficient, but I have another idea that I'm going to work on.

DilumAluthgeBot added a commit to DilumAluthgeBot/julia that referenced this pull request May 28, 2025
DilumAluthgeBot added a commit to DilumAluthgeBot/julia that referenced this pull request May 28, 2025
@DilumAluthge DilumAluthge force-pushed the dpa/fix-pr-assignee-404 branch from f89ea9c to 2910793 Compare May 28, 2025 17:39
DilumAluthgeBot added a commit to DilumAluthgeBot/julia that referenced this pull request May 28, 2025
DilumAluthge pushed a commit to DilumAluthgeBot/julia that referenced this pull request May 28, 2025
@DilumAluthge DilumAluthge changed the title CI: PrAssignee.yml: don't auto-retry on 404 CI: PrAssignee.yml: .catch() and return the error object if 404 is encountered when checking collaborator status May 28, 2025
@DilumAluthge DilumAluthge marked this pull request as ready for review May 28, 2025 17:43
@DilumAluthge DilumAluthge removed the request for review from LilithHafner May 28, 2025 17:43
DilumAluthge pushed a commit to DilumAluthgeBot/julia that referenced this pull request May 28, 2025
…s encountered when checking collaborator status
@DilumAluthge DilumAluthge force-pushed the dpa/fix-pr-assignee-404 branch from 34e888d to 64c22b3 Compare May 28, 2025 17:46
DilumAluthge pushed a commit to DilumAluthgeBot/julia that referenced this pull request May 28, 2025
@DilumAluthge DilumAluthge removed the request for review from LilithHafner May 28, 2025 17:48
@DilumAluthge
Copy link
Member Author

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

@DilumAluthge DilumAluthge requested a review from LilithHafner May 28, 2025 17:50
Copy link
Member

@LilithHafner LilithHafner left a 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

Comment on lines +41 to +45
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Member Author

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

  1. 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.

Copy link
Member

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

@DilumAluthge
Copy link
Member Author

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)

@DilumAluthge DilumAluthge merged commit ef19362 into master May 28, 2025
6 of 8 checks passed
@DilumAluthge DilumAluthge deleted the dpa/fix-pr-assignee-404 branch May 28, 2025 20:15
@@ -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"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
retry-exempt-status-codes: "403,404"
retry-exempt-status-codes: "404"

DilumAluthge added a commit that referenced this pull request May 30, 2025
As noted in
#58550 (comment)

---------

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants