Repository navigation
Cache the Gradle zip so release 504s can't fail gradle legs - #2046
Open
Mikola Lysenko (mikolalysenko) wants to merge 2 commits into
Open
Mikola Lysenko (mikolalysenko) wants to merge 2 commits into
Mikola Lysenko (mikolalysenko) wants to merge 2 commits into
Conversation
Both install-gradle.sh origins are served by github.com releases (services.gradle.org redirects there). On 2026-11-09 05:43-05:47 UTC release downloads returned 504 for longer than curl's ~30 s of retries, and 9 gradle legs of the nightly failed in the install step (run 42568829044). The 9.8.0 legs run on every PR and in the merge queue, where the same window would evict the entry. Restore gradle-<version>-bin.zip from the actions cache before the install step and save it from main on a miss, as #2039 does for vexctl. install-gradle.sh now uses a zip already in place when it matches the pinned sha256, and deletes and re-downloads one that does not. gradle-compatibility.yml restores the same keys and its nightly saves the macOS and Windows zips ci.yml never fetches. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeT4udaLUf9uZoDNXAx
Address review: include a hash of install-gradle.sh (which holds the sha256 pins) in the cache key so a fixed pin saves a fresh entry; let gradle-compatibility.yml only restore, keeping ~1 GB of per-OS zips out of the repo cache; print the whole usage header; and unzip with -o so a second run into the same directory reuses the cached zip. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeT4udaLUf9uZoDNXAx
Collaborator
Author
|
bugbot run 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.
Problem
scripts/install-gradle.shdownloads the pinned Gradle zip from two origins, but both are served by github.com releases (services.gradle.org redirects togradle/gradle-distributions). On 2026-11-09 05:43–05:47 UTC github.com release downloads returned 504 for longer than curl's ~30 s of--retry 5. 9 gradle legs of the nightly failed in the install step (run 42568829044, e.g. job 129001677694:every origin failed for Gradle 7.6.6).The same window also failed Ruby, Deno, vexctl and installer steps. #2039–#2042 fixed those, but not Gradle. The
e2egradle 9.8.0 legs (ci.yml lines 1515–1516) run on every PR and in the merge queue, so the next such window would evict a queue entry.Fix
gradle-<version>-bin.zipfrom the actions cache beforeInstall Gradlein the shared*e2e-steps(e2e, e2e-extended, e2e-full, e2e-windows, e2e-macos), and save it from main (push and nightly) on a miss. This is the same pattern as the vexctl cache in Cache vexctl on every OS so release 504s can't fail coverage #2039.install-gradle.shuses a zip already in place when it matches the pinned sha256. It deletes and re-downloads one that doesn't, so a bad cache entry can't fail a leg or be trusted.hashFiles('scripts/install-gradle.sh'), so changing a pin starts a fresh entry.gradle-compatibility.ymlrestores the same keys and saves nothing. Saving every OS × version there would add about 1 GB of near-duplicate zips to the repo cache.unzip -omakes a rerun into the same directory work.No test is added, removed or moved. Required check names (
ci-ok,clippy) are unchanged.Proof
curlreplaced by a stub that always fails with(22) 504:install-gradle.sh: using the cached gradle-6.9.4-bin.zip, launcher printed, rc=0sha256 mismatch, zip removed, both origins tried,every origin failed, rc=1 (fails closed)unzip -o)python3 -B -m unittest discover -s scripts/tests: 411 tests OK. This includestest_merge_queue_fail_fast.CiWorkflowContract, which allows step tolerance only on capped cache restores. The save steps carry nocontinue-on-error;actions/cache/saveonly logs a warning when the key is already taken./code-review high
Fixed: the usage-header range, keying on the pins,
unzip -o, and the cache footprint (gradle-compat is now restore-only). Not changed:https://claude.ai/code/session_011f9aeT4udaLUf9uZoDNXAx
Generated by Claude Code