Repository navigation
ci: cache Rust deps/rustc for the CodeQL rust job - #2159
Conversation
CodeQL's build-mode: none for Rust still shells out via rust-analyzer to compile build scripts and proc-macro crates across most of the workspace's dependency graph, with no toolchain pin, registry cache, or rustc-level cache today (Analyze (rust) took 19m in run 35124428510 vs ~1m for the other two matrix languages). Rust has no build-mode: manual/autobuild to fall back to, and CodeQL's own dependency-caching input explicitly excludes Rust, so reuse this repo's existing setup-rust/cache-duckdb (sccache) composite actions under a dedicated codeql-rust cache key, the same way ci.yml's lint-core/test-core/lint-tauri jobs already do.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: 1 review is currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughThe CodeQL workflow now prepares Rust jobs with the repository’s Rust setup action and compiler cache. JavaScript/TypeScript and Actions jobs remain unchanged. ChangesRust CodeQL workflow
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Merge Risk: ⚪ Minimal · up to The Rust CodeQL cache setup is correctly scoped and ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description provides a detailed summary and a proposed test plan, but it omits the Related Issues and Type of Change sections. The checklist is also entirely unchecked, and the test plan describes future validation rather than completed testing.
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
#2151 renamed .github/actions/cache-duckdb to cache-sccache and changed its inputs to the R2 bucket credentials, while #2159 added a CodeQL step that still referenced cache-duckdb with the old cache-key input. Every Analyze (rust) run on develop and on pull requests has failed since with "Can't find action.yml under .github/actions/cache-duckdb". Use the renamed action with the same inputs ci.yml passes.
Summary
Analyze (rust)incodeql.ymlrunsbuild-mode: none, which is Rust's only supported build mode with CodeQL (manual/autobuild aren't available for Rust). Undernone, CodeQL's docs say it "uses rust-analyzer to compile and run build scripts (build.rs files) and compile macro code" — it still shells out to cargo/rustc for most of the workspace's build-dependency and proc-macro closure, just without a final link.javascript-typescript/actionslegs of the same matrix. This pattern holds across other recentdevelopruns.dependency-cachinginput explicitly does not cover Rust (only Java, Go, C#), so that official escape hatch doesn't apply here../.github/actions/setup-rustand./.github/actions/cache-duckdb(sccache) composite actions in therustmatrix leg only, under their owncodeql-rustcache key — the same patternci.yml'slint-core/test-core/lint-taurijobs already use.duckdb-archiveisn't a default Cargo feature, so this doesn't touch the DuckDB C++ buildcache-duckdbwas originally written for; the win here is from caching ordinary dependency and proc-macro compilation instead.actions/cachebackend already used byci.yml.Test plan
Analyze (rust)run on this PR/branch for wall-clock time and sccache hit-rate stats to confirm the cache is actually exercised by CodeQL's internal rust-analyzer invocation (this can't be verified without a real run).docs/development/local-build-cache.mdentry documenting the measured before/after, matching this repo's evidence-backed documentation convention.🤖 Generated with Claude Code
Summary by CodeRabbit