ci: build images one at a time
ci / integration (push) Blocked by required conditions
ci / security (push) Blocked by required conditions
ci / dockerfile (push) Blocked by required conditions
ci / bump (push) Blocked by required conditions
ci / lint (push) Waiting to run
ci / types (push) Blocked by required conditions
ci / unit (push) Blocked by required conditions
ci / chart (push) Blocked by required conditions
ci / image (api) (push) Blocked by required conditions
ci / image (reconciler) (push) Blocked by required conditions
ci / image (worker) (push) Blocked by required conditions

`image (api)` and `image (reconciler)` both died in run #13 with:

    ERROR: failed to solve: DeadlineExceeded: no active session for
    ylux5s1p4xyb5e5tmnz4gljhq: context deadline exceeded

That is the buildkit session heartbeat between buildx in the job container and
buildkitd in the dind sidecar, not anything in the Dockerfiles. The runner has
capacity 2, so two legs of the matrix built concurrently on a 2-core burstable
node already sitting at 81% CPU and 87% memory, and starved each other.

The evidence is in the same run: `image (worker)` was still building when the
other two failed, had the node to itself afterwards, and went green on an
unchanged Dockerfile.

max-parallel: 1 trades wall-clock for builds that finish. Every other gate in
run #13 — lint, types, unit, integration, security, dockerfile, chart — was
already green, so this is the last thing standing between here and a full run.
This commit is contained in:
Nguyen Minh Phuc
2026-07-20 04:11:04 +00:00
parent b35c551160
commit 2098443f31
+14
View File
@@ -311,6 +311,20 @@ jobs:
contents: read contents: read
strategy: strategy:
fail-fast: false fail-fast: false
# One image at a time. The runner has capacity 2, so without this two buildx builds
# run concurrently on a 2-core burstable node that already sits near 80% CPU. Both
# then died with:
#
# ERROR: failed to solve: DeadlineExceeded: no active session for <id>:
# context deadline exceeded
#
# That is the buildkit session heartbeat between buildx in the job container and
# buildkitd in the dind sidecar missing its deadline under CPU starvation — not a
# Dockerfile problem. The third leg, which had the node to itself, kept building.
#
# Serial costs wall-clock and buys builds that finish. Raise it when the runner has
# cores to spare, not before.
max-parallel: 1
matrix: matrix:
svc: [api, worker, reconciler] svc: [api, worker, reconciler]
# Deliberately no `outputs:` here. Matrix legs share one outputs map and clobber each # Deliberately no `outputs:` here. Matrix legs share one outputs map and clobber each