perf(ci): cache cargo deps and drop the duplicate Windows full test run (#404) - #413
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 54 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
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. Comment |
PR Summary by QodoCache Cargo dependencies and skip duplicate Windows CI tests
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can keep summaries lean with Findings visible per group, which tucks the rest behind a View link |
Code Intel change risk
Top signals
revspec: |
Code Intel Quality SignalCompleteness: complete · snapshot
Bottleneck: none
|
Advances #404 (measurement + first two changes). Required check names are unchanged.
Baseline (before): last 5 successful
code-intel-cirunsSource:
gh run view <id> --json jobs. Durations arecompletedAt - startedAtper job/step, in minutes.Where the time goes (log of run 36836937358, Windows jobs): the
cargo teststep is about 3.5 min of compile (Finished test profile ... in 3m 28s/3m 32s) plus about 9.5 min of test execution. Both Windows jobs ran that same step in the same run.Build Rust CLIis about 4.7 min, almost all of it the workspace crate underlto = "thin"andcodegen-units = 1. Packaging is not the cost:PackageandVerify beta packageeach take under 20 s.Changes
Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2is added right afterSetup Rustinwindows-build-test-packageand in every leg ofcross-platform-smoke. It is pinned by commit SHA with a version comment, the same style asactions/checkout,setup-pythonandupload-artifact. It caches~/.cargoand the dependency artifacts intarget/; the workspace crate is always rebuilt. The key includes the job id, the runner OS/arch, rustc, and the Cargo.lock/toolchain hashes. The cache is saved only on success, and PRs read caches saved onmain.cross-platform-smoke (windows-latest)no longer runscargo test -p code-intel --locked. The step now carriesif: runner.os != 'Windows', so macOS and Ubuntu still run it.pr-gate.ymlheader comment said ci.yml has no cache action. It is updated to match (no behaviour change). A CHANGELOG entry is added.Why coverage holds
windows-build-test-packageruns the identical command,cargo test -p code-intel --locked, on the samewindows-latestimage. Before it, both jobs run the same steps: checkoutfetch-depth: 0, Python 3.14, layout tests,rustup toolchain install, choco ripgrep 14.1.0, pinned ast-grep, fmt, check. Neither job sets job-levelenv. The test set and its environment are therefore the same; the second run was pure duplication.Everything the Windows smoke leg checks uniquely still runs there:
bootstrap.py --local-assetinstallinstall_smoke--ignoredtests (packaged_install_runs_relocated_sentrux_shim,packaged_install_deploys_legacy_pipeline_entrypoint, DR-0001)CODE_INTEL_HOMEpersistence assertThose
install_smoketests now compile their own test target in that step instead of reusing the full-suite build.No test, gate, job name, matrix entry or timeout changed. Branch protection (
gh api .../branches/main/protection) requireswindows-build-test-packageandcross-platform-smoke (windows-latest|macos-latest|ubuntu-latest); all four still report.Local checks (AU-5090, this branch)
code-intel lint hardcoded-paths→Hardcoded path scan: OK (297 files)code-intel repin --repo .→repin: clean — no stale pinscode-intel sentrux gate .→No degradation detected(Quality 6236 -> 6238, Coupling 63.33 -> 63.33)legacy/scripts/tests/test-retirement-packets.ps1→8 packets, 2 audits, 0 known-blockedpython tests/test_repository_layout.py→ 5 OK; both workflows parse withyaml.safe_loadAfter: measured on this PR
Run 36895945909. Attempt 1 is cold: no
v0-rust-*cache existed in the repo, and every job loggedNo cache found.Attempt 2 is warm, started withgh run rerun 36895945909: every job loggedCache hit for: v0-rust-<job>-<OS>-...and restored about 108 MB (Ubuntu about 130 MB). Durations come fromgh api repos/2233admin/code-intel-pipeline/actions/runs/36895945909/attempts/<n>/jobs, in minutes. Both attempts passed all four jobs.What the numbers say
cross-platform-smoke (windows-latest)dropped from 25.4 to 13.8 (cold) and 11.7 (warm) min, leaving about 16–18 min of headroom under itstimeout-minutes: 30. That leg previously hit the timeout on PR docs: land DR-0013/DR-0014 and the issue-queue verdict layer #406. Only theinstall_smokestep got more expensive, and only slightly (0.1 → 0.9 / 0.7 min). The reason: it now compiles its own debug test target (Finished test profile ... in 50.13scold,35.80swarm) and no longer reuses the full-suite build. Both--ignoredDR-0001 tests still ran and passed:packaged_install_runs_relocated_sentrux_shim ... okandpackaged_install_deploys_legacy_pipeline_entrypoint ... ok.rust-cacherestores only dependencies. Warm runs saved about 0.2–0.4 min oncargo checkand 0.4–1.1 min on the release build. The Windows test-profile compile did not change (2m 54scold vs2m 52swarm), because thecode-intelworkspace crate and its 70+ integration-test binaries dominate it. Restore takes ≤ 0.3 min and save takes ≤ 0.25 min, so the cache is net positive on every leg.windows-build-test-package(about 24 min). Its ~13 mincargo teststep is about 3 min of compile plus about 9.5 min of test execution. This PR does not change that. The next lever is test execution time, for example the slow integration targets that take 50–105 s each in the baseline log. That is out of scope here because it changes how the tests run.Required checks on this PR
windows-build-test-package,cross-platform-smoke (windows-latest),cross-platform-smoke (macos-latest),cross-platform-smoke (ubuntu-latest): success on both attempts.change-risk,agent-gate,sentrux-capability-gate: pass.