Skip to content

fix(build): don't fail a pushed build when the cache trace finds no cache lines - #28

Merged
beeinger merged 1 commit into
mainfrom
fix/cache-trace-pipefail
Oct 21, 2026
Merged

beeinger merged 1 commit into
mainfrom
fix/cache-trace-pipefail

Conversation

@piterxyz

Copy link
Copy Markdown
Contributor

Problem

build_images.sh ends each build with a cache trace (added in 7b3f2fb):

grep -iE "importing cache manifest|sending cache export|exporting cache|cache export|cache" "${log}" | head -8

The script runs with set -e -o pipefail. When the buildx log has no line mentioning the cache, grep exits 1, build_one returns 1, and the job reports Build failed for <app> even though the image was built and pushed. finalize (merge + tag + deploy) is then skipped.

Seen in HerodotusDev/daloc-frontend-new run 39594663856 (release 1.0.57): both …-arm64 and …-amd64 logged ✅ pushed, then Build failed, and nothing was deployed.

Fix

Append || true to the trace's grep. The trace is informational, so it must not decide the job result.

Notes

  • A re-run of an affected workflow is safe: build_one skips images that already exist (⏭ … exists) and finalize then runs.
  • Separate from this fix, the missing cache lines suggest the type=gha cache backend produced no output on that run, which may be worth a look alongside the smoke probes.

…ache lines

The cache trace greps the buildx log for cache lines. Under set -e -o pipefail grep exits 1 when none match, so a build whose image was already pushed was reported as failed and finalize (merge + tag + deploy) was skipped. The trace is informational, so it must not decide the job result.

@beeinger beeinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct — the trace grep runs inside build_one under set -e, and a no-match exit aborts the worker after the push already succeeded. This broke daloc-frontend-new deploys today (1.0.57 arm64 pushed, deploy skipped). Merging to unblock; the informational trace survives via the || true.

@beeinger
beeinger merged commit 7f964af into main Oct 21, 2026
1 check passed
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