Repository navigation
ci: run the integration jobs against a CodeBuild-like docker daemon - #116
Merged
Merged
Conversation
The integration jobs mounted the runner's docker socket, so the daemon under test was GitHub's, not one configured the way CodeBuild configures it. Two differences mattered. The runner's daemon uses the containerd image store; CodeBuild does not. The buildspec generated in the backend repo (formations/app/build.py, install phase) starts dockerd with --storage-driver=overlay2. pack's export to the daemon takes a different path on the containerd store, and integration-heroku24 has been failing there with failed to fetch base layers: open /tmp/imgutil.local.image.N/blobs/ sha256/67d5b5...: no such file or directory on a code path CodeBuild never runs. That digest is the linux/amd64 config blob of heroku/builder:24, which unlike heroku/builder:22 is a multi-arch index -- which is why only the heroku-24 job hit it. The runner's daemon also has no registry mirror, so neither the prefetch nor the Docker builds resolved through the CDN the way they do in production. Each job now starts the image's own dockerd with the buildspec's flags. A fresh daemon per run also gives a cold image store, so the buildpack prefetch is genuinely exercised rather than finding images an earlier job left in the shared daemon. DOCKER_HOST is overridden because the docker:dind base bakes in tcp://docker:2375, which would point the CLI away from the daemon started here. Verified locally: the daemon comes up, the CLI reaches it, and docker info reports storage-driver=overlay2 with the mirror set. These flags must be kept in step with formations/app/build.py. Co-Authored-By: Claude Opus 5 <[email protected]>
The four integration jobs each carried their own copy of the clone, the env file, the docker run and the apppack.toml check -- about ninety lines repeated four times, which is how the daemon flags would have drifted apart the moment one copy was edited. Each job now sets the case as environment (APPNAME, BRANCH, EXPECTED_COMMAND) and runs .github/scripts/integration-test.sh. The workflow drops 207 lines to 71. The expected command moves into a YAML folded scalar, so the quoting survives verbatim instead of being escaped through two shell levels. The buildpack value genuinely contains a '"'"' sequence -- that is what postbuild writes into apppack.toml -- and it was previously spelled '\"'\"'*'\"'\"' inline, which nothing could read. The jobs now check out the repo, which they did not need before, because that is where the script comes from. setup-python moves ahead of the build since the script verifies inline. Co-Authored-By: Claude Opus 5 <[email protected]>
The storage driver is not what makes the heroku-24 case pass; a Docker 29.9.0+ daemon does that on either image store (buildpacks/pack#2747). overlay2 is here because the buildspec pins it, and the two stores are not interchangeable for either build system. Also corrects the DOCKER_HOST note: docker:29-dind does not set it. Co-Authored-By: Claude Opus 5 <[email protected]>
ipmb
force-pushed
the
ci-codebuild-like-daemon
branch
from
November 18, 2026 20:23
cc45ee3 to
ce3a05c
Compare
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.
The integration jobs mounted the runner's docker socket, so the daemon under test was GitHub's rather than one configured the way CodeBuild configures it. Each job now starts the image's own
dockerdwith the buildspec's flags.Why
The authoritative buildspec is generated in the backend repo,
formations/app/build.py(install phase):Two differences from the runner's daemon mattered.
Image store. GitHub's runner daemon uses the containerd image store; the buildspec pins the classic one. The two are not interchangeable for either build system:
packexports to the daemon along a different path on the containerd store, andbuildxcan only export a local cache there. Testing on one and shipping the other means the jobs exercise a daemon we never run.Registry mirror. The runner's daemon has none, so neither the buildpack prefetch nor the Docker builds resolved through the CDN the way they do in production.
A fresh daemon per run also gives a cold image store, so the prefetch is genuinely exercised instead of finding images an earlier job left behind in the shared daemon.
Relationship to #118
An earlier revision of this PR claimed the storage driver was what fixed
integration-heroku24. That was wrong. That job was failing because the runner's Docker 29.4.2 cannot export a pack-built image at all on any store (buildpacks/pack#2747, fixed in Docker 29.9.0), which #118 addressed on its own by bumping the runner's daemon to 29.10.0. #118's run proved the point: withcontainerd-snapshotter=truestill set and only the version changed, the job passed.So this PR no longer fixes anything red. It is parity work, and stands or falls on that. Rebased on #118, it drops the four
setup-docker-actionsteps, since it stops using the runner's daemon altogether.Verification
Locally, the daemon comes up, the CLI reaches it, and
docker inforeportsstorage-driver=overlay2with the mirror set.In CI, the full suite is green, and pack's
daemon uses containerd storagewarning no longer appears anywhere in the run, previously on every buildpack job.Maintenance
These flags duplicate
formations/app/build.pyand must be kept in step with it. There is no automated check for that drift.🤖 Generated with Claude Code