Skip to content

ci(measure): save the shared rust cache only when the run measures main's own code - #1084

Merged
DrunkOnJava merged 2 commits into
mainfrom
ci/measure-cache-own-code
Oct 29, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
ci/measure-cache-own-code

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

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 when ref is empty, the base job when base is empty or main, 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 has contents: 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: both Swatinem/rust-cache steps' save-if.

Testing

Unit tests are banned in this repository: do not add them.

  • The workflow parses (YAML load); CI's workflow lint runs on this PR. A Measure dispatch from main with no ref still restores and saves; one with ref set restores only.
  • Verified on real Revit files: N/A, CI-only.

Audit-honesty checklist

  • No user-visible change, so no changelog fragment.
  • No emojis, private paths or internal jargon.

Legal and contribution hygiene

  • Apache-2.0; no Autodesk material.

Breaking changes

None.

Related issues

None.

…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
DrunkOnJava enabled auto-merge (squash) October 29, 2026 19:40
@DrunkOnJava
DrunkOnJava merged commit 4faafe1 into main Oct 29, 2026
33 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/measure-cache-own-code branch October 29, 2026 19:50
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant