Repository navigation
ci(images): finish the buildcache move, add timeouts, and make Dockerfile changes verifiable - #417
Merged
Merged
Conversation
…imeouts The registry round-trip is proven — run 41524220825 logged `importing cache manifest from …/er-buildcache:er-api` and both tags are in the repo — so the transitional `type=gha` cache-from comes out and buildkit touches the Actions cache in neither direction. Neither image job had a timeout, so the default was 360 minutes: a hung buildkit would burn six runner-hours with deploy-dev waiting on it. 90 for er-api against a measured 58m9s (its Dockerfile's `COPY . .` rebuilds all 408 crates on any rust/ change, so the long case is the normal one until that is restructured) and 30 for er-web against 2m30s warm. Co-Authored-By: Claude Fable 5 <[email protected]>
A Dockerfile change was unvalidatable before merge — this workflow ran on push-to-main only, so the first exercise of a restructured build was the merge, and a break blocked dev deploys until someone reverted. `verify` builds both images with push:false on PRs touching a Dockerfile, a .dockerignore or this file; er-api/er-web become push-only (their ECR role pins sub to refs/heads/main, so a PR could never assume it anyway). The path list stays narrow on purpose: a source change that breaks compilation is rust.yml's and frontend.yml's job, and widening to rust/** would put a cold ~1h build on ordinary PRs. Legal because no job here is a required check. Co-Authored-By: Claude Fable 5 <[email protected]>
athvin
added a commit
that referenced
this pull request
Nov 3, 2026
…ry (#422) Every Rust PR opened after #376 fails to compile, on a commit that has nothing to do with it: error: failed to run custom build command for `libduckdb-sys v1.20000.1` panicked at build_bundled_cc.rs:65: unpacking bundled DuckDB sources: Os { code: 39, kind: DirectoryNotEmpty } `libduckdb-sys` unpacks the bundled C++ sources into its `OUT_DIR` and panics if that directory is not empty. The saved `target/` carries a populated `debug/build/libduckdb-sys-<hash>/out`; on restore cargo re-runs the build script but does not clear the directory, so every job that compiles duckdb dies before a single test runs. ## Why it looked like the PR's fault Main's run for #376 went GREEN — all twelve test and e2e jobs. Its jobs restored the PRE-bump entry, and `lint`, the single writer, only saved the poisoned one at the end of the run. So the breakage never lands on the commit that caused it; it lands on every PR afterwards. That asymmetry cost real time on #418 (an infra-only PR with no Rust in it, so six Rust failures made no sense). The sequence that eventually distinguished "my change" from "the cache" was: another open PR passing the same gate → `git diff HEAD~1 -- Cargo.lock` showing no new crates → main's run for the bump having run the identical jobs green. Each step eliminated a hypothesis that otherwise looks plausible. The one that looked right and was not: "the PR lost a race with main's cache write, so just re-run" — it fails identically on a re-run, because the poisoned entry is the one being restored, not a missing one. #417 appears unaffected only because it touches CI files, so `detect` skips its Rust tier entirely. ## The fix is the lever the file already documents "`prefix-key` makes the v0 entries unreachable (restore-keys are prefixed too) so they age out instead of being downloaded for nothing." Same situation, same remedy: v1 -> v2, so no partial restore can resurrect the poisoned entry. One cold cycle, then normal. All EIGHT occurrences move together — the `lint` writer and the seven restore-only jobs. Bumping only the writer would leave every other job restoring v1, which is the broken state with extra steps. ## Not fixed here, deliberately `.github/workflows/shared/rust-gate.md` and the two `*.lock.yml` files generated from it still carry `v1-rust`, so the agentic workflows will hit the same panic. They are not required checks, so this is noise rather than a block — and their lock files are generated artifacts, which I am not going to hand-edit. Bumping the `.md` and recompiling with gh-aw belongs to whoever owns that workflow. Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
Three things on
images.yml, the first two from run 41524220825's measurements.1. The transitional
type=ghacache-from comes out. #407 kept it so the first registry run would not start cold. That run has happened: the log showsimporting cache manifest from …/er-buildcache:er-api, and bother-apiander-webcache manifests are in ECR. Buildkit now touches the Actions cache in neither direction — the move build-cost.md prescribed is complete.2. Both image jobs get a
timeout-minutes. They had none, so the default was 360 minutes — a hung buildkit burns six runner-hours whiledeploy-devwaits. 90 for er-api (measured 58m9s), 30 for er-web (2m30s warm).3. A Dockerfile change is now verifiable before merge. This workflow ran on push-to-main only, so the first exercise of a restructured build was the merge itself — and a break blocks dev deploys until someone reverts. A
verifyjob now builds both images withpush: falseon PRs touching*/Dockerfile,*/.dockerignoreor this workflow;er-api/er-webbecome push-only (their ECR role's OIDCsubis pinned torefs/heads/main, so a PR could never assume it regardless). The path list is deliberately narrow — compilation breakage is rust.yml's and frontend.yml's job, and widening torust/**would put a cold ~1h build on ordinary PRs. Legal because no job in this workflow is a required check.This PR self-validates: it changes
images.yml, which is in the new trigger's path list, soverifyruns here. Expect it to be slow (cold, uncacheable — PRs cannot read the registry cache) and to report as a non-required check.Next, with that net in place:
rust/DockerfiledoesCOPY . .then onecargo build --release, so any change underrust/rebuilds all 408 crates. A cargo-chef split would make the dependency layer (including the bundled-DuckDB C++ build) a registry-cache hit and leave only the 33 workspace crates to compile.🤖 Generated with Claude Code