Repository navigation
chore: cut CI runtime with cached Rust dependencies and merge queue support - #559
Conversation
…upport - Compile the locked Rust dependency graph in a manifest-keyed controller-dependencies stage (production, proxy-runtime, coverage), so source-only changes rebuild just the controller instead of ~12 minutes of dependencies. - Add a main-only Build Cache workflow that exports those stages to ghcr.io/rentnerproxy/platform-build-cache; verification, coverage, fixture and preview builds only read it and stop exporting large layers into the 10 GB Actions cache. - Key Rust coverage and release caches on manifests and toolchain only, drop incremental state and set CARGO_INCREMENTAL=0. - Add merge_group support to every workflow with a required check, and let Production Smokes defer pull request runtime verification to the merge queue when the repository variable CI_MERGE_QUEUE is true. - Remove the Fuzz Tests pass-through job, build PR previews only for PRs labelled "preview", clone history without blobs for change detection and install Chromium system packages only when a library is missing. - Align CI on Rust 1.100.0, the version the Dockerfiles ship, and fix its new unreachable_code finding in the ACME HTTP client. - Document the build cache, merge queue switch and preview label. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
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 39 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
main introduced rust-toolchain.toml with 1.99.1 while this branch moves CI to 1.100.0, the version the Dockerfiles ship. Keep local builds, CI and the image on the same compiler; clippy 1.100.0 is clean on the merged tree. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rust 1.100.0 merges well-covered coverage regions (38,706 instead of 57,183 regions for the same code), so every Rust coverage group drops below the 90 percent region gate without any test change. Changing that gate is a separate decision, so CI, the toolchain file and the docs stay on main's 1.99.1. The ACME HTTP client fix remains: it builds with both versions and clears the new unreachable_code finding ahead of the bump. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Why
Platform CI regularly took 25–33 minutes per PR. Measurements from recent runs:
The Actions cache sat at 10.3 / 10 GB, and a single PR push started 42 jobs against the 20-runner limit, which caused up to 5.5 min queueing on the critical path.
What changes
Rust dependency layer (largest win)
controller-dependenciesstage that compiles the locked dependency graph against placeholder targets. It depends only oncore/Cargo.tomlandcore/Cargo.lock; the controller stage then rebuilds only the own crate. The placeholder crate is removed withcargo clean --package, so the real controller is always rebuilt.Registry build cache
ghcr.io/rentnerproxy/platform-build-cache. It is the only job withpackages: writefor that package.Actions cache hygiene
CARGO_INCREMENTAL=0.Merge queue support (opt-in)
merge_groupon every workflow that provides a required check. Change detection, Gitleaks and compatibility source selection handle the event; Dependency Review and PR Preview Source skip in the queue.CI_MERGE_QUEUE=true, Production Smokes reports immediately on PRs and runs the full runtime verification once in the merge queue on the exact merge result. Without the variable, behaviour is unchanged.Fewer jobs and less waiting
Fuzz Testspass-through job (fuzz tests already run inside Web Tests); the exact-revision release verification no longer expects it.preview; the trusted gate returnsnot-requestedbefore polling required checks for up to 25 minutes.Toolchain (not changed here)
rust-toolchain.toml. Rust 1.100.0, which the Dockerfiles ship, merges well-covered coverage regions (38,706 instead of 57,183 for the same code) and pushes every Rust coverage group below the 90 percent region gate, so the bump needs its own decision on that gate.core/src/runtime/acme_http.rsuses an irrefutablelet Ok(..)for the uninhabited body error. It builds with 1.99.1 and clears theunreachable_codeerror that 1.100.0 reports.Docs
.github/WORKFLOWS.mddescribes the build cache, merge queue switch, preview label and current versions.Maintainer follow-up
main, set theplatform-build-cachepackage visibility to public so fork and Dependabot PRs can read it anonymously. Until then, image builds run without the registry cache.mainruleset, turn off "require branches to be up to date", then set the repository variableCI_MERGE_QUEUE=true.This PR's own run cannot use the registry cache yet (it does not exist before merge), so its image builds still compile everything.
Verification
main(git history/tags, an existing cross-filemock.moduleimport error), no new failures; the bash-based gate scenarios ran there.typecheck:scripts, the web type check and oxlint (including type-aware rules) on the changed files.--all-targets --all-features -D warnings) after theacme_http.rsfix, also on the tree merged withmain.controller-build(amd64) including the static musl check. After a source-only change, the dependency stage wasCACHEDand onlyrentnerproxy-controllerwas compiled (1 instead of 286 crates). The controller crate itself still takes about 4 minutes locally, so expect the image build to shrink by the dependency share, not to near zero.merge_groupruns.🤖 Generated with Claude Code
Summary by CodeRabbit
previewlabel.