VA-53: idempotent buildx builder setup in build-package.yml #59

Merged
nrupard merged 1 commit from fix/VA-53-buildx-idempotent into main 2026-06-13 14:16:57 +02:00
Owner

Summary

VA-53: build-package.yml failed on recent merges (run #207 @ ef48f994, 2s; run #203 @ 0cd08d74, 1m33s; no logs were captured).

Root cause (the recurring 2s failure)

The "Set up buildx builder" step ran docker buildx create --name agent-builder --driver docker-container --use unconditionally. On the persistent Forgejo runner the named builder survives between jobs, so the next run's create fails fast with "existing instance for agent-builder" - a recurring ~2s failure on every run after the first on a given runner (matches #207).

Fix

Reuse the builder if it exists, otherwise create it, then inspect --bootstrap to (re)start its BuildKit container in case a prior run's container was pruned. (A docker-container-driver builder is required because the build uses --output type=local, which the default docker driver can't do.)

The build itself is healthy

docker build --file oci-build/release.Dockerfile . succeeds on current main - the binary compiles (release, 2m30s) and exports. Run #203's longer 1m33s failure looks like a transient runner network/resource miss (the build reproduces green, and run #194 with the same dependency set passed), so it is not a code issue.

Validation

YAML parses and the shell step passes bash -n. The fix can only fully prove out on the next push to main (build-package doesn't run in the PR check), where it should no longer collide on the leftover builder.

Refs VA-53.

## Summary VA-53: `build-package.yml` failed on recent merges (run #207 @ `ef48f994`, 2s; run #203 @ `0cd08d74`, 1m33s; no logs were captured). ## Root cause (the recurring 2s failure) The "Set up buildx builder" step ran `docker buildx create --name agent-builder --driver docker-container --use` unconditionally. On the persistent Forgejo runner the named builder survives between jobs, so the **next** run's `create` fails fast with "existing instance for agent-builder" - a recurring ~2s failure on every run after the first on a given runner (matches #207). ## Fix Reuse the builder if it exists, otherwise create it, then `inspect --bootstrap` to (re)start its BuildKit container in case a prior run's container was pruned. (A docker-container-driver builder is required because the build uses `--output type=local`, which the default `docker` driver can't do.) ## The build itself is healthy `docker build --file oci-build/release.Dockerfile .` succeeds on current main - the binary compiles (release, 2m30s) and exports. Run #203's longer 1m33s failure looks like a transient runner network/resource miss (the build reproduces green, and run #194 with the same dependency set passed), so it is not a code issue. ## Validation YAML parses and the shell step passes `bash -n`. The fix can only fully prove out on the next push to `main` (build-package doesn't run in the PR check), where it should no longer collide on the leftover builder. Refs VA-53.
fix(ci): make the buildx builder setup idempotent across runs
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 2m16s
Create release / Create release from merged PR (pull_request) Has been skipped
2eed1fc5f5
VA-53: `build-package.yml` failed on recent merges (run #207, 2s). The "Set up buildx builder" step ran `docker buildx create --name agent-builder --driver docker-container --use` unconditionally. On the persistent Forgejo runner the named builder survives between jobs, so the next run's `create` fails fast with "existing instance for agent-builder" - a recurring ~2s failure on every run after the first on a given runner.

Reuse the builder if it already exists, otherwise create it, then `inspect --bootstrap` to (re)start its BuildKit container in case a prior run's container was pruned. A docker-container-driver builder is required because the build uses `--output type=local` (the default `docker` driver can't export to the filesystem).

The release build itself is healthy: `docker build --file oci-build/release.Dockerfile .` succeeds on current main (the binary compiles and exports). Run #203's longer (1m33s) failure looks like a transient runner network/resource miss - the build is reproducible green and run #194 with the same dependency set passed - so it is not addressed by a code change.

#VA-53

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nrupard deleted branch fix/VA-53-buildx-idempotent 2026-06-13 14:16:57 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-agent!59
No description provided.