chore(CI): regenerate app token before late checkout in nightly_detect_failure#1658
Merged
chore(CI): regenerate app token before late checkout in nightly_detect_failure#1658
Conversation
…t_failure GitHub App installation tokens expire after 1 hour. In the `handle_success` job, the token is generated at the start but then used again much later (after Zulip API calls, GitHub API pagination, Python scripts, etc.) for a second checkout and PR creation. This can cause the token to expire before the final checkout step, leading to authentication failures. Fix by regenerating a fresh token just before the second checkout.
fgdorais
pushed a commit
that referenced
this pull request
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a potential token expiration issue in
nightly_detect_failure.yml.In the
handle_successjob, the GitHub App token is generated at the start of the job but then used again much later for a second checkout and PR creation. Between these uses, there are:github-scriptstepsThis can exceed 1 hour under adverse conditions (slow network, API retries), causing the token to expire before the final checkout step.
Fix: Regenerate a fresh token (
app-token-2) just before the second checkout.🤖 Prepared with Claude Code