Repository navigation
Mint a fresh GitHub App token for each Satis build - #599
Merged
Merged
Conversation
Installation tokens last an hour and we cache them for 55 minutes, so a build could be sent a token with only a few minutes left. Satis keeps the token in its queue until a worker clones with it, so a short backlog is enough for the clone to fail with "Invalid username or token". Builds, and release syncs that are going to trigger one, now mint a new installation token. Everything else keeps using the cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp
marked this pull request as ready for review
November 3, 2026 21:25
A blank line in Plugin.php picked up two spaces in #480, which has failed the lint check on main and every PR since. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Satis builds now get a newly minted GitHub App installation token instead of the cached one.
Installation tokens last an hour and
GitHubAppService::getInstallationTokencaches them for 55 minutes, so a build could be sent a token with about five minutes left. Satis stores the token in its queue payload and only uses it when a worker clones the repo. A short backlog is enough for the clone to fail with "Invalid username or token". That's the most likely cause of a paid plugin build that failed this week, though I haven't matched it against the production logs yet.buildForPluginnow mints a token, which covers push builds andsatis:build.SyncPluginReleasesdoes the same when it's going to trigger a build for a paid plugin, since it hands its token to the build. Other GitHub calls keep using the cache. Minting also updates the cache, so later lookups get the newer token.Things to watch:
satis:buildfor every plugin mints all the tokens up front, so a long run is the case to keep an eye on.After deploying, rerun the build for any plugin that failed with "Invalid username or token".
New tests are in
SatisBuildTokenTest, and the full suite passes locally.There's also a one-line whitespace fix in
Plugin.php. A blank line there picked up two spaces in #480, which has failed Pint on main and on every PR since.🤖 Generated with Claude Code