Skip to content

fix(ci): global sccache cache tag + tolerate zero-test filters#4295

Merged
synoet merged 1 commit into
mainfrom
ci/global-sccache-cache
Jun 24, 2026
Merged

fix(ci): global sccache cache tag + tolerate zero-test filters#4295
synoet merged 1 commit into
mainfrom
ci/global-sccache-cache

Conversation

@synoet

@synoet synoet commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Fixes two CI regressions exposed by tooling-only PRs (a PR that only touches xtask, e.g. #4294's cargo-deny port).

1. test fails with "no tests to run" on tooling-only PRs

The nextest package filter narrows an xtask-only change to rdeps(=xtask), which selects zero tests — and nextest's default exits error: no tests to run (exit 4). Add --no-tests=pass so an empty selection is a pass; a tooling change legitimately affects no tests.

2. New branches start with a cold cache

The Namespace cache volume is scoped per branch, and check/test only run on pull_request (never on main), so a fresh branch has no default-branch cache to inherit and recompiles the whole workspace from scratch (~5–6 min).

Pin an explicit sccache-ci cache tag on the check/test runner (runs-on: namespace-profile-linux-rust-ci;overrides.cache-tag=sccache-ci) so every branch reads/writes one global volume — the way the old shared S3 sccache bucket did. sccache entries are content-addressed, so concurrent writers can't corrupt each other; worst case is an occasional miss that recompiles.

Note: the tag's volume is brand-new, so the first run on any branch is still cold — the global-warm payoff kicks in once it's seeded.

Regenerate: cargo x workflows from rust/cloud-storage (--check verifies sync).

🤖 Generated with Claude Code

Two regressions surfaced by tooling-only PRs (a PR that only touches
xtask, like the cargo-deny workflow port):

- The nextest package filter narrows an xtask-only change to
  `rdeps(=xtask)`, which selects zero tests; nextest's default then
  exits with `error: no tests to run`. Add `--no-tests=pass` so an
  empty selection is success — a tooling change legitimately affects
  no tests.

- A new branch's Namespace cache starts cold: the volume is scoped
  per-branch and check/test never run on `main`, so there's no
  default-branch cache to inherit. Pin an explicit `sccache-ci` cache
  tag on the check/test runner so every branch reads/writes one global
  volume, the way the old shared S3 sccache bucket did. sccache entries
  are content-addressed, so concurrent writers can't corrupt each
  other — worst case is an occasional miss that recompiles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fc387a49-18ab-47db-a15e-12a6281fce2c

📥 Commits

Reviewing files that changed from the base of the PR and between 15e469f and ab07ac2.

📒 Files selected for processing (6)
  • .github/actionlint.yaml
  • .github/workflows/code_check_cloud_storage.yml
  • rust/cloud-storage/tools/xtask/src/workflows/code_check_cloud_storage.rs
  • rust/cloud-storage/tools/xtask/src/workflows/runners.rs
  • rust/cloud-storage/tools/xtask/src/workflows/scripts/run_tests.sh
  • rust/cloud-storage/tools/xtask/src/workflows/vars.rs

📝 Walkthrough

Summary by CodeRabbit

  • Chores

    • Optimized CI/CD pipeline caching configuration for improved build performance across cloud storage workflows.
    • Updated runner configurations to leverage shared cache infrastructure for faster compilation times.
  • Bug Fixes

    • Fixed test execution behavior to treat scenarios with zero matching tests as success instead of failure.

Walkthrough

The pull request makes two independent CI changes. First, it introduces a CI_CACHE_TAG constant ("sccache-ci") in vars.rs and a new Runner::with_cache_tag method in runners.rs that formats a runs-on label with an explicit overrides.cache-tag suffix. The check and test jobs in code_check_cloud_storage.rs are updated to use this method, which is reflected in the generated workflow YAML and in the actionlint configuration. Second, --no-tests=pass is added to cargo nextest run in both run_tests.sh and the workflow YAML, changing behavior so that a test filter matching zero tests results in success rather than an error.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title follows conventional commits format (fix:), is under 72 characters (62 chars), and clearly summarizes both main changes: the global sccache cache tag and zero-test filter tolerance.
Description check ✅ Passed The PR description is directly related to the changeset, detailing the two CI regressions being fixed and explaining the rationale behind the modifications across all changed files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@synoet synoet merged commit a21250e into main Jun 24, 2026
26 checks passed
@synoet synoet deleted the ci/global-sccache-cache branch June 24, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant