Skip to content

Fix deploy: eject artifact wrote to the read-only cell mount; repair the kind e2e harness - #49

Merged
scottypate merged 1 commit into
mainfrom
fix/deploy-readonly-materialize
Sep 12, 2026
Merged

scottypate merged 1 commit into
mainfrom
fix/deploy-readonly-materialize

Conversation

@scottypate

Copy link
Copy Markdown
Contributor

What

Every datamk deploy has failed since ADR 0008 shipped. datamk run writes the eject artifact to .cell/materialize/<table>.sql as a hard error (src/engine/mod.rs), and Builder pods mount the cell read-only from the ConfigMap, so the init Job died with Read-only file system on the first transform.

  • engine: DATAMK_MATERIALIZE_DIR redirects the eject artifacts, mirroring DATAMK_LOG=off for the same read-only case. Env-only, empty value ignored, default path unchanged. Unit test added.
  • Dockerfile: sets DATAMK_MATERIALIZE_DIR=/tmp/materialize, the scratch emptyDir the pods already mount.
  • kind e2e harness: MinIO and mc pinned to quay.io tags (Docker Hub now denies anonymous minio/* pulls, so the infra phase could not start on any machine). Route discovery selects the @<major> path now that the spec also documents /, /context, /context/{route}, and /openapi.json.
  • docs: one line in docs/guides/incremental.md.

Verification

  • make e2e passes end-to-end on a fresh kind cluster, including the freshness capstone (execution 2 published, same Server pod picked it up, no restart).
  • cargo test --bin datamk: 915 passed.
  • cargo clippy --all-targets --all-features -D warnings: clean. cargo fmt --check: clean.

Found, not fixed

apply.rs:118 server-side-applies the content-addressed init Job. A failed Job whose pod template is unchanged (same image tag) is a no-op on re-deploy, and deploy re-reports the stale failure. A fixed image under the same tag cannot retry without deleting the Job by hand. Separate issue.

The harness is still never run in CI, which is how the deploy regression shipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_0145XunDkqmp2ot1zXQo4Sxc

…the kind e2e harness

Every `datamk deploy` has failed since ADR 0008: `datamk run` writes the
eject artifact to `.cell/materialize/<table>.sql` as a hard error, and a
Builder pod mounts the cell read-only from the ConfigMap, so the init Job
died with "Read-only file system" on the first transform.

- engine: `DATAMK_MATERIALIZE_DIR` redirects the eject artifacts, mirroring
  `DATAMK_LOG=off` for the same read-only case. Env-only, empty ignored,
  default unchanged. Unit test added.
- Dockerfile: `DATAMK_MATERIALIZE_DIR=/tmp/materialize`, the scratch
  emptyDir the pods already mount.
- kind e2e: pin MinIO and mc to quay.io (Docker Hub denies anonymous
  `minio/*` pulls, so the infra phase could not start); route discovery
  picks the `@<major>` path now that the spec also documents `/`,
  `/context`, and `/openapi.json`.

`make e2e` passes end-to-end including the freshness capstone. The harness
is still not run in CI, which is how this shipped.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145XunDkqmp2ot1zXQo4Sxc
@scottypate
scottypate merged commit 41558a8 into main Sep 12, 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