Repository navigation
ci(measure): save the shared rust cache only when the run measures main's own code - #1084
Merged
Merged
Conversation
…in's own code A Measure run dispatched from main saved the shared measure cache whatever ref or base it measured, so a contributor's pull request measured that way ran its build scripts with write access to a cache every later main run restores. The cache now saves only when the head is main's own commit (ref empty) and the base is main. Pull request runs never saved it.
DrunkOnJava
enabled auto-merge (squash)
October 29, 2026 19:40
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.
Summary
Measure saves its shared rust cache (key
measure, restored by every later Measure run) only when it measured main's own code: the head job whenrefis empty, the base job whenbaseis empty ormain, the timing job when both hold.Motivation
Measuring an outside contributor's pull request is done by dispatching Measure from main with
-f ref=refs/pull/N/head.save-if: github.ref == 'refs/heads/main'was true for those runs, so on a cache miss the contributor's build scripts would have run with the ability to write a cache later main runs restore. Checked on 2026-10-29: Measure hascontents: read, no secrets,persist-credentials: false; no cache was saved by the runs on #1081 and #1074, and the two existing measure caches were deleted. This closes the remaining channel.Changes
.github/workflows/measure.yml: bothSwatinem/rust-cachesteps'save-if.Testing
Unit tests are banned in this repository: do not add them.
refstill restores and saves; one withrefset restores only.Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None.
Related issues
None.