Skip to content

ci: rust-cache was caching nothing, it needs workspaces - #3

Open
MattJackson wants to merge 1 commit into
mainfrom
ci/rust-cache-workspaces
Open

ci: rust-cache was caching nothing, it needs workspaces#3
MattJackson wants to merge 1 commit into
mainfrom
ci/rust-cache-workspaces

Conversation

@MattJackson

Copy link
Copy Markdown
Contributor

rust-cache was caching nothing here

Swatinem/rust-cache@v2 was used with no workspaces: input. The action looks for one Cargo workspace at $GITHUB_WORKSPACE, and nothing is checked out there: every actions/checkout in these jobs uses path:. The action logged "could not find Cargo.toml" and CARRIED ON WITHOUT FAILING, so the job rebuilt everything from scratch on every run while the log said the cache step succeeded. That is the worst shape a cache misconfiguration can take: it costs full build time on every run and reports success.

Every Cargo workspace the job actually builds is now named. Where the job also builds the sibling busbar checkout, that is listed too, and it matters more than the plugin's own: busbar-plugin-pack plus a full release build of busbar is by far the larger of the two.

Deliberately left alone

Checked every workflow in this repo that uses Swatinem/rust-cache, not just the ones changed. A job whose Cargo workspace genuinely is at the checkout root needs nothing and got nothing, rather than a workspaces: . that would be pure noise. headroom-hook/.github/workflows/docker.yml is one such case (its checkout has no path:), and headroom-hook/.github/workflows/docker-bundle.yml already carried a correct workspaces: busbarAI.

Part of a fleet sweep

Same fix applied across the first-party plugin repos, and to the reusable plugin-ci.yml in core (GetBusbar/busbar#58), which had the same defect and reaches every plugin repo at once.

Swatinem/rust-cache@v2 was used with no workspaces input. The action looks for
one Cargo workspace at the checkout root, and nothing is checked out there:
every checkout in these jobs uses path:. The action logged "could not find
Cargo.toml" and carried on WITHOUT failing, so the job rebuilt everything from
scratch on every run while the log said the cache step succeeded.

Every workspace the job actually builds is now named. Where the job also builds
the sibling busbar checkout, that is listed too: it is by far the larger of the
two builds and the one worth caching most.
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