Skip to content

fix(dockerignore): re-include runner/templates so the runner image builds#293

Merged
bdchatham merged 1 commit into
mainfrom
fix/dockerignore-runner-templates
May 19, 2026
Merged

fix(dockerignore): re-include runner/templates so the runner image builds#293
bdchatham merged 1 commit into
mainfrom
fix/dockerignore-runner-templates

Conversation

@bdchatham
Copy link
Copy Markdown
Collaborator

The ECR publish workflow from #291 fails on the seitask-runner build:

COPY --from=builder /workspace/runner/templates /templates
ERROR: failed to compute cache key: "/workspace/runner/templates": not found

Source: run #26120617262

Root cause

.dockerignore is whitelist-style — ** ignores everything, then specific patterns re-include only what the controller image needs: *.go, go.mod, go.sum, *.sh.

The runner image (added in #286) also needs runner/templates/*.yaml.tmpl baked into the image at /templates/ so it can render per-kind SeiNodeTask manifests at runtime. The controller image doesn't need these files, so they were never on the re-include list. The runner Dockerfile fails as soon as it tries to copy them out of the builder stage.

Fix

One pattern added to .dockerignore:

 # Re-include embedded shell scripts
 !**/*.sh
+
+# Re-include the runner image's per-kind Go text templates.
+!runner/templates/**

Verified locally:

$ docker build --platform linux/amd64 -f runner/Dockerfile -t seitask-runner-test:local .
...
#15 [stage-1 3/4] COPY --from=builder /workspace/runner/templates /templates
#15 DONE 0.0s
...
naming to docker.io/library/seitask-runner-test:local done

Same shape as #287

Same root cause as the prod outage from #287: a new artifact lands but a separate "what-to-include" list elsewhere doesn't pick it up.

Bug Generated artifact Missed in
#287 config/crd/sei.io_seinodetasks.yaml config/crd/kustomization.yaml resource list
This runner/templates/*.yaml.tmpl .dockerignore re-include list

Both are recoverable with one-line additions but cost a deploy iteration to detect. The CI-gap follow-up I previously dropped (#288's PR body item 3) is worth resurrecting — a build-time check that the runner Dockerfile's COPY paths all resolve in the build context would have caught this in PR review.

🤖 Generated with Claude Code

…ilds

PR #291 added the seitask-runner image to the ECR publish workflow, but
the build fails at:

  COPY --from=builder /workspace/runner/templates /templates
  ERROR: failed to compute cache key: "/workspace/runner/templates": not found

Root cause: .dockerignore is whitelist-style — it ignores everything
(**) and re-includes only *.go, go.mod, go.sum, and *.sh. The
runner/templates/ directory's .yaml.tmpl files were never on the
re-include list because the controller image doesn't need them. The
runner image does — they're baked into /templates/ at build time so
the runner can render per-kind manifests at runtime.

Add `!runner/templates/**` to the re-include list. Confirmed locally:
`docker build -f runner/Dockerfile .` completes successfully.

Same root cause as #287 (CRD generated but missed from
config/crd/kustomization.yaml): a new component lands but the
"what-to-include" list elsewhere doesn't pick it up. Worth filing a
follow-up that lint-checks dockerignore re-includes against the
runner Dockerfile's COPY paths, paralleling the kustomization check
already on the followup list.
@cursor
Copy link
Copy Markdown

cursor Bot commented May 19, 2026

You have used all Bugbot PR reviews included in your free trial for your GitHub account on this workspace.

To continue using Bugbot reviews, enable Bugbot for your team in the Cursor dashboard.

@bdchatham bdchatham merged commit f8a17a9 into main May 19, 2026
2 checks 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.

1 participant