Skip to content

ci: build the debian base when the published one is behind the checkout - #468

Merged
nozaq merged 1 commit into
mainfrom
claude/debian-build-cache-sync-ay1dut
Sep 12, 2026
Merged

nozaq merged 1 commit into
mainfrom
claude/debian-build-cache-sync-ay1dut

Conversation

@nozaq

@nozaq nozaq commented Sep 12, 2026

Copy link
Copy Markdown
Member

Problem

Since #462, build-checks.yml builds each image on the debian base built from the checkout only when the change set selects debian itself, and on the published ghcr.io/bare-devcontainer/debian base otherwise.

A base change merged on main but not yet released (right now: #466, merged after v20260912) is not in the change set of a pull request that touches only a language image. That pull request was therefore checked on the published base, while the next release rebuilds debian for the pending change and builds every image on top of it. The checks and the release disagreed on the base for up to a day after every debian change.

Change

  • The setup job gains a step that diffs debian/ between the latest release tag and HEAD, applying the release rules of scripts/changed-images.sh (Markdown and smoke tests are ignored, as the release ignores them). The published base is treated as matching the checkout only when those rules find no change; with no release tag, it is never assumed to match.
  • check-base now runs when debian is selected or the published base does not match the checkout, so check-image builds on the base the release will build on. Nothing else in check-base/check-image changes: the artifact hand-off, registry mirror and cache conditions already key on needs.check-base.result.
  • AGENTS.md describes the new condition.

The step logs the debian/ files that differ from the tag, so a base build triggered this way can be verified from the log.

Verification

Ran the step's shell logic locally against three checkouts:

HEAD Result
origin/main (#466 pending release) debian/Dockerfile, debian/assets/.bashrc differ → base built
v20260912 matches → published base
450fc25 (main before #466) matches → published base

🤖 Generated with Claude Code


Generated by Claude Code

@nozaq
nozaq marked this pull request as ready for review September 12, 2026 06:51
build-checks.yml built each image on the published debian base unless the
change set selected debian itself. A base change merged on main but not yet
released is not in that change set, so a pull request touching only a
language image was checked on a base the next release does not build it
on: the release rebuilds debian for the pending change and every image on
top of it.

The setup job now also diffs debian/ against the latest release tag with
the release rules of changed-images.sh, and builds the base from the
checkout whenever those rules find a change, or when no release tag
exists. The published base is used only while it matches the checkout.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@nozaq
nozaq force-pushed the claude/debian-build-cache-sync-ay1dut branch from ad9dbd5 to 1aeac31 Compare September 12, 2026 06:56

nozaq commented Sep 12, 2026

Copy link
Copy Markdown
Member Author

Build Checks on 1aeac31 failed in two jobs, check-image (zig, 0.15-trixie, arm64) and check-image (zig, 0.15-bookworm, arm64). Both fail in the zig Dockerfile at the git fetch of the shell completions: codeberg.org answered HTTP 504. This PR does not touch zig/, and every other job of the run passed, so the failure is the upstream host, not this change. The failed jobs have been re-run once.


Generated by Claude Code

@nozaq
nozaq merged commit 37a60e1 into main Sep 12, 2026
139 of 141 checks passed
@nozaq
nozaq deleted the claude/debian-build-cache-sync-ay1dut branch September 12, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants