Skip to content

ci(.github/workflows): stop falling back to buildx in the dogfood build - #31851

Merged
mafredri merged 1 commit into
mainfrom
mafredri/dogfood-no-buildx-fallback
Nov 6, 2026
Merged

mafredri merged 1 commit into
mainfrom
mafredri/dogfood-no-buildx-fallback

Conversation

@mafredri

@mafredri mafredri commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

The dogfood image build falls back to docker buildx build on the runner whenever the Depot build fails (buildx-fallback: true). This removes the fallback from both Depot builds, so a Depot failure fails build_image. It also removes the "Set up Docker Buildx" step, which only the fallback used.

Why remove it:

  • It no longer covers the failure it was added for. chore: update sqlc to 1.25.0 #11538 added it in 2024-01, when Depot builds failed because Coder's Depot trial had ended, to "build it very slowly instead of failing if there is an issue with the depot.dev". The job ran on GitHub's ubuntu-latest then. Since feat(flake.nix): switch dogfood dev image to buildNixShellImage from dockerTools #16223 (2025-01) it runs on Depot's own runners (depot-ubuntu-22.04-8), so the fallback only helps when Depot's build service fails while its runners keep working.
  • It hid a broken build path for months. In the retained logs (2026-08-19 to 2026-11-05), 35 of 42 main builds fell back, all because of the stale branch in Depot's git clone that fix(.github/workflows): build dogfood images from the checkout #31777 fixes. A warning annotation on the run was the only trace.
  • Fallback builds are slower and less reliable. They have no layer cache, so the base image step took 252 to 559 s (17 runs) instead of 3 to 22 s with Depot's cache (30 runs), and every package was downloaded again. Three main builds failed in apt steps that a cached Depot build skips: 2026-10-01 and 2026-11-05 on Ubuntu mirror version mismatches, 2026-11-03 on a kernel.org mirror outage.

With #31710, a failed build on main posts to Slack. A re-run after Depot recovers publishes the image.

Decision log
  • Cost: during a Depot build outage, main publishes no image until someone re-runs the build. Workspaces keep using the previous image.
  • Precedent: docker-base.yaml and release.yaml already use depot/build-push-action without a fallback.
  • What uncached builds also caught: because they rebuilt every layer, fallback builds hit upstream apt breakage as soon as it happened (the google-cloud-sdk rename and a HashiCorp key change, failing main from 2026-09-04 until fix(dogfood/coder): refresh apt keyrings and rename google-cloud-sdk #29279 on 2026-09-14). With Depot's cache, such breakage shows up the next time Dockerfile.base or files/ changes.
  • Fork PRs: the base build already skips fork PRs. The vscode-coder build has no fork guard, so once fix(.github/workflows): build the vscode-coder dogfood image #31717 enables it, a fork PR relies on Depot's open-source PR authentication instead of falling back. None of the 1,000 most recent dogfood workflow runs for PRs (back to 2025-12-15) came from a fork.
  • Buildx is unused otherwise: depot/build-push-action runs docker buildx only in its fallback path, and no other step in the workflow or scripts/dogfood/test_image.sh uses buildx.
  • Evidence: fallback counts and timings come from the build_image job logs and the GitHub jobs API. Older logs have expired.
  • Checked: make pre-commit-light (with actionlint) passes, and zizmor 1.11.0 with the Makefile's flags reports no findings.
  • Checked by this PR's CI: build_image passed on Depot without the buildx setup step, and the image tooling tests passed. The main path, where Depot failures used to fall back, runs only after merge.

🤖 This PR was created with the help of Coder Agents.

The fallback was added in #11538, when Depot builds failed because the
Depot trial had ended and the job ran on GitHub's ubuntu-latest. The job
has run on Depot's own runners since #16223, so the fallback only covers
a Depot build failure while Depot's runners still work.

In the retained logs it only ever hid one problem: 35 main builds fell
back because of a stale branch in Depot's git clone, and their only sign
of it was a warning annotation. A fallback build has no layer cache, so
it refetches every package and takes minutes instead of seconds. Three
of those builds failed on Ubuntu mirror problems that a cached build
would not have hit.

A Depot failure now fails the build. The buildx setup step existed only
for the fallback.
@mafredri
mafredri marked this pull request as ready for review November 6, 2026 16:18
@mafredri
mafredri requested a review from matifali November 6, 2026 16:51
@mafredri
mafredri merged commit 3f547f6 into main Nov 6, 2026
62 checks passed
@mafredri
mafredri deleted the mafredri/dogfood-no-buildx-fallback branch November 6, 2026 17:33
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants