Skip to content

chore(ci): stop release-plz from saving build cache#9297

Merged
jdx merged 1 commit intomainfrom
chore/remove-release-plz-rust-cache
Apr 22, 2026
Merged

chore(ci): stop release-plz from saving build cache#9297
jdx merged 1 commit intomainfrom
chore/remove-release-plz-rust-cache

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Apr 22, 2026

Summary

  • keep release-plz restoring the shared Rust build cache
  • stop release-plz from writing that cache back to GitHub Actions

Why

  • avoid having release-plz refresh the oversized shared Linux Rust cache on main
  • keep cache reads for build speed while removing this workflow as a cache writer

Testing

  • not run (workflow-only change)

This PR was generated by an AI coding assistant.


Note

Low Risk
Workflow-only change that tweaks GitHub Actions caching behavior; low functional risk aside from potentially affecting build speed/cache freshness.

Overview
The release-plz GitHub Actions workflow now configures Swatinem/rust-cache with save-if: false, so it will restore the shared build cache but won’t save/update that cache after the run.

Reviewed by Cursor Bugbot for commit b841ab2. Bugbot is set up for automated code reviews on this repo. Configure here.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 22, 2026

Greptile Summary

This PR adds save-if: false to the Swatinem/rust-cache step in .github/workflows/release-plz.yml, preventing the release-plz workflow from writing back to the shared Linux Rust build cache while still restoring it. This avoids the workflow overwriting the shared build cache with a potentially stale or differently-composed artifact set.

Confidence Score: 5/5

Safe to merge — single-line CI config change with no risk to production.

The change is a correct, well-scoped use of the save-if input supported by Swatinem/rust-cache. No logic, security, or correctness concerns; all remaining findings are P2 or lower.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/release-plz.yml Adds save-if: false to rust-cache step — correct usage of the Swatinem/rust-cache input to disable cache writes while keeping cache restores.

Sequence Diagram

sequenceDiagram
    participant GHA as GitHub Actions
    participant Cache as GitHub Actions Cache
    participant Job as release-plz job

    GHA->>Job: Trigger (push to main / schedule)
    Job->>Cache: Restore rust build cache (shared-key: build)
    Cache-->>Job: Cache hit (restored)
    Job->>Job: cargo build --all-features
    Note over Job,Cache: save-if: false — no cache write
    Job->>Job: mise run release-plz
Loading

Reviews (1): Last reviewed commit: "chore(ci): stop release-plz from saving ..." | Re-trigger Greptile

@jdx jdx merged commit 96bbb41 into main Apr 22, 2026
35 of 36 checks passed
@jdx jdx deleted the chore/remove-release-plz-rust-cache branch April 22, 2026 13:48
@github-actions
Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.4.18 x -- echo 21.5 ± 0.4 20.7 23.8 1.00
mise x -- echo 21.6 ± 0.5 20.9 26.6 1.01 ± 0.03

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.4.18 env 21.0 ± 0.7 20.2 29.3 1.00
mise env 21.4 ± 0.7 20.3 23.9 1.02 ± 0.05

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.4.18 hook-env 22.3 ± 0.6 21.0 27.7 1.00 ± 0.04
mise hook-env 22.3 ± 0.7 21.3 24.4 1.00

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.4.18 ls 19.2 ± 0.4 18.2 21.6 1.00
mise ls 19.5 ± 0.5 18.5 21.4 1.01 ± 0.03

xtasks/test/perf

Command mise-2026.4.18 mise Variance
install (cached) 146ms 148ms -1%
ls (cached) 76ms 75ms +1%
bin-paths (cached) 80ms 79ms +1%
task-ls (cached) 803ms 804ms +0%

jdx added a commit that referenced this pull request Apr 22, 2026
## Summary
- Re-enable `lint` as the Linux writer of the shared `build` rust-cache
entry on `main` (revert the save-side of #9298)
- Picks up pre-existing prettier drift in two docs files flagged by the
pre-commit hook

## Why
After #9297 (release-plz save-if: false) and #9298 (lint save-if:
false), no Ubuntu job remained that saved the shared `build` cache. The
other jobs with `shared-key: build` that still save (`unit` on macOS,
`windows-unit`) use different per-OS cache entries, so the Linux `build`
entry had no writer at all. It would stay stuck at whatever was saved
before #9298 and eventually be evicted (7-day LRU / 10GB cap) with
nothing to refresh it — which is why the most recent `release-plz` run
didn't restore a fresh cache.

`lint` is a good writer choice: it runs the most thorough build (`cargo
clippy --all-features --all-targets` plus `cargo
deny`/`msrv`/`machete`), producing the most complete `target/` for
downstream restorers.

## Test plan
- [ ] Next `main` push: verify lint job saves the `build` cache and
subsequent PRs restore it

*This PR was generated by an AI coding assistant.*

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: only adjusts CI cache save conditions and tweaks markdown
formatting in docs, with no production code or runtime behavior changes.
> 
> **Overview**
> Re-enables saving the shared `rust-cache` `build` entry from the
Ubuntu `lint` job by changing `save-if` to only write on
`refs/heads/main`, ensuring Linux builds keep the cache refreshed.
> 
> Also fixes markdown admonition formatting in two docs pages
(`backend-plugin-development.md`, `url-replacements.md`) to match the
expected warning callout style.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
acfdeaf. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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