Repository navigation
CI: download leantar from the public URL when the API rate-limits the token - #4765
Merged
Merged
Conversation
all-green and lean-cache found the lean-assembled-<shard> markers by
listing the run's artifacts through the REST API and grepping the list, so
a refused listing ("API rate limit exceeded for installation") read as "no
marker": all-green then assembled the build itself, and failed when the
same limit refused leantar's download.
* .github/actions/lean-assembled: finds the markers by downloading them
through the artifact service (download-artifact, which v8 lets match
nothing and which retries, then fails, on an error), not the REST API.
all-green and lean-cache use it, with a sparse checkout of the actions.
* ci/github_release.py: a download the API refuses (403, 429) comes from
the release's public URL, outside the API's rate limit. leantar's pinned
SHA-256 is checked either way.
* lean-shard: the best-effort listing of uploaded shards is tried again
before it leaves the assembly to another job.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKUFHGBeNadVff4mCVhkSH
Member
Author
|
This patch is way too big, it should be a trivial fix not a giant refactor |
Only the download needs fixing: when no shard is found to have assembled the build, all-green assembles it itself, which failed only because the API refused its leantar download. Revert the workflow changes and the new action; keep the public-URL fallback in ci/github_release.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHGBeNadVff4mCVhkSH
Member
Author
|
Cut down to the one fix needed. If the artifact listing fails, Generated by Claude Code |
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.
CI only.
When the repository token's rate limit is spent,
all-green's REST listing of the run's artifacts returns nothing.all-greenthen concludes that no shard assembled the build and assembles it itself, which is correct but slow. It failed only because the same rate limit refused its leantar download:ci/github_release.pygot an HTTP 403 from the release API (#4683: job 128879421741 of run 42528561424; #4750: run 42528625150).The fix is in
ci/github_release.py: when the API refuses the token (403 or 429), the download goes to the release's public URL, which the API's rate limit doesn't count.ci/leantar_release.pystill checks its pinned SHA-256, so what CI trusts doesn't change. A unit test covers the fallback.🤖 Generated with Claude Code
https://claude.ai/code/session_01TKUFHGBeNadVff4mCVhkSH