Repository navigation
Setup | Fall back to GitHub's API when the release download fails - #5
Merged
Merged
Conversation
GitHub's release download links can return 504 to anonymous clients while api.github.com still serves the same asset. Setup now downloads to a file, falls back to the API asset endpoint, and stops on a failed extract.
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.
Setup downloads the simulation release from GitHub without credentials. During a GitHub incident, release download links returned 504 to anonymous clients while
api.github.comkept serving the same asset, so every new session started without its coding agent.Changes
Functional changes
A session now gets its coding agent even when GitHub's release download links are failing, as long as GitHub's API is up.
Technical changes
setup.shdownloads the release to a file instead of piping intotar. If that fails, it looks up the release by channel (releases/latestfor production,releases/tags/prereleasefor staging), takes its asset's API URL and downloads it withAccept: application/octet-stream.tarstill stops setup.Testing
setup.sh. Setup should print "Coding agent ready."URLat a missing file (for example.../download/prerelease/missing.tar.gz) and run setup. It should log a 404, then install from the API and start the agent.APIat a missing tag. Setup should stop with "no release asset found at …".