GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cache the Gradle zip so release 504s can't fail gradle legs by mikolalysenko · Pull Request #2046 · SocketDev/socket-patch

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Nov 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Problem

scripts/install-gradle.sh downloads the pinned Gradle zip from two origins, but both are served by github.com releases (services.gradle.org redirects to gradle/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 e2e gradle 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

  • Restore gradle-<version>-bin.zip from the actions cache before Install Gradle in 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.sh uses 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.
  • The key includes hashFiles('scripts/install-gradle.sh'), so changing a pin starts a fresh entry.
  • gradle-compatibility.yml restores the same keys and saves nothing. Saving every OS × version there would add about 1 GB of near-duplicate zips to the repo cache.
  • Two small fixes in the same script: the usage text now prints the whole header, and unzip -o makes a rerun into the same directory work.

No test is added, removed or moved. Required check names (ci-ok, clippy) are unchanged.

Proof

  • Real download of Gradle 6.9.4: OK. With curl replaced by a stub that always fails with (22) 504:
    • cached zip present → install-gradle.sh: using the cached gradle-6.9.4-bin.zip, launcher printed, rc=0
    • corrupted cached zip → sha256 mismatch, zip removed, both origins tried, every origin failed, rc=1 (fails closed)
    • rerun into the same directory with stdin closed → rc=0 (unzip -o)
  • python3 -B -m unittest discover -s scripts/tests: 411 tests OK. This includes test_merge_queue_fail_fast.CiWorkflowContract, which allows step tolerance only on capped cache restores. The save steps carry no continue-on-error; actions/cache/save only logs a warning when the key is already taken.
  • shellcheck clean. actionlint and zizmor report the same findings as on main (zizmor: 58 before and after).

/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:

  • Composite action to share key/path between workflows: two call sites don't justify one. The comments point each step at the other.
  • Cross-OS single key: the runner temp paths differ per OS, so a cross-OS archive wouldn't restore to the right place. Per-OS keys are kept, and only Linux (4 versions) plus Windows 8.14.3 are saved, about 600 MB.
  • Save timeout / one saver per version: this matches the vexctl save. It runs only on main, the zip is already compressed, and the losing saves cost a few seconds.

https://claude.ai/code/session_011f9aeT4udaLUf9uZoDNXAx


Generated by Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Claude (claude) added 2 commits November 9, 2026 22:48
@claude
Cache the pinned Gradle zip for e2e legs
81edc40
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) <[email protected]>
Claude-Session: https://claude.ai/code/session_011f9aeT4udaLUf9uZoDNXAx
@claude
Key the Gradle cache on the pins, restore-only compat
dc6dd8e
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) <[email protected]>
Claude-Session: https://claude.ai/code/session_011f9aeT4udaLUf9uZoDNXAx
@mikolalysenko Mikola Lysenko (mikolalysenko) added the ci-janitor Opened by the CI janitor routine (flakes, redundant tests, CI perf) label Nov 9, 2026
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

bugbot run


Generated by Claude Code

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Tanmay182003
Tanmay Singla (Tanmay182003) approved these changes Nov 9, 2026
View reviewed changes
@mikolalysenko
Mikola Lysenko (mikolalysenko) added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit d19ce41 Nov 9, 2026
51 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the ci-janitor/cache-gradle-dist branch November 9, 2026 23:25
This was referenced Nov 10, 2026
chore(release): complete 5.1.0 notes for every PR since v5.0.1 #2047
Merged
Keep the ruby crawl test off the host's Bundler env #2056
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Tanmay182003 Tanmay Singla (Tanmay182003) Tanmay182003 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

ci-janitor Opened by the CI janitor routine (flakes, redundant tests, CI perf)

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mikolalysenko @Tanmay182003 @claude
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.