Skip to content

Build builder image in CI when tag is missing#109

Merged
JAORMX merged 1 commit into
mainfrom
chore/automate-libkrun-updates
Jul 9, 2026
Merged

Build builder image in CI when tag is missing#109
JAORMX merged 1 commit into
mainfrom
chore/automate-libkrun-updates

Conversation

@JAORMX

@JAORMX JAORMX commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Problem

The Renovate PR that bumps LIBKRUN_VERSION (#107 → v1.19.4) fails the Build (Linux CGO) check with:

Error: reading manifest v1.19.4 in ghcr.io/stacklok/go-microvm-builder: manifest unknown

The builder image is tagged by LIBKRUN_VERSION and only built by builder.yaml after merge to main. When a PR bumps LIBKRUN_VERSION, the image for the new tag doesn't exist yet, so task build-runner fails pulling it — a chicken-and-egg problem.

Fix

Add a registry check in the Build (Linux CGO) job:

  • If ghcr.io/stacklok/go-microvm-builder:<LIBKRUN_VERSION> exists → pull as before (fast path; applies to all normal PRs and libkrunfw-only bumps).
  • If it doesn't exist → build it locally via task builder-image-build so CI can verify the bump (only happens when LIBKRUN_VERSION actually changes).

CONTAINER_RUNTIME=docker is forced for the job so the manifest check, local build, and build-runner all share the same container storage (GitHub runners have docker; the Taskfile default prefers podman, which would use separate storage).

Scoping

This only triggers for libkrun version bumps, not libkrunfw bumps or unrelated PRs — BUILDER_IMAGE_TAG is derived from LIBKRUN_VERSION only (Taskfile.yaml:32), so libkrunfw-only PRs like #108 reuse the existing builder image and take the fast path.

Follow-up to #106.

The builder image is tagged by LIBKRUN_VERSION and only built by
builder.yaml after merge to main. When a PR bumps LIBKRUN_VERSION
(e.g. a Renovate update), the image for the new tag doesn't exist
yet, so task build-runner fails pulling it.

Add a registry check in the Build (Linux CGO) job: if the builder
image tag exists, pull it as before; if not, build it locally via
task builder-image-build so CI can verify the bump. Only triggers
when LIBKRUN_VERSION actually changes (libkrunfw-only bumps reuse
the existing tag). Force CONTAINER_RUNTIME=docker so the manifest
check, local build, and build-runner all share storage.
@JAORMX JAORMX merged commit 6c8b677 into main Jul 9, 2026
7 checks passed
@JAORMX JAORMX deleted the chore/automate-libkrun-updates branch July 9, 2026 11:58
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.

1 participant