ci: rust-cache was caching nothing, it needs workspaces - #3
Open
MattJackson wants to merge 1 commit into
Open
Conversation
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.
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.
rust-cache was caching nothing here
Swatinem/rust-cache@v2was used with noworkspaces:input. The action looks for one Cargo workspace at$GITHUB_WORKSPACE, and nothing is checked out there: everyactions/checkoutin these jobs usespath:. 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-packplus 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 aworkspaces: .that would be pure noise.headroom-hook/.github/workflows/docker.ymlis one such case (its checkout has nopath:), andheadroom-hook/.github/workflows/docker-bundle.ymlalready carried a correctworkspaces: busbarAI.Part of a fleet sweep
Same fix applied across the first-party plugin repos, and to the reusable
plugin-ci.ymlin core (GetBusbar/busbar#58), which had the same defect and reaches every plugin repo at once.