Skip to content

iris: copy hatch_build.py into Docker images#3650

Merged
rjpower merged 1 commit intomainfrom
fix/iris-docker-hatch-build-hook
Mar 14, 2026
Merged

iris: copy hatch_build.py into Docker images#3650
rjpower merged 1 commit intomainfrom
fix/iris-docker-hatch-build-hook

Conversation

@rjpower
Copy link
Copy Markdown
Collaborator

@rjpower rjpower commented Mar 14, 2026

  • Dockerfile.worker and Dockerfile.controller now COPY hatch_build.py alongside pyproject.toml so the custom hatch build hook (added in Auto-generate protobuf and Connect RPC files via hatch build hook #3631) is present when uv sync runs during the Docker build.
  • Without this, the build fails with OSError: Build script does not exist: hatch_build.py.
  • Dockerfile.task is unaffected (it doesn't run uv sync at build time, and already has nodejs/npx for proto generation at runtime).

The custom build hook added in #3631 requires hatch_build.py to be
present when uv sync runs. The Dockerfiles only copied pyproject.toml,
so the build failed with "Build script does not exist: hatch_build.py".
@rjpower rjpower added the agent-generated Created by automation/agent label Mar 14, 2026
@rjpower rjpower requested a review from ravwojdyla March 14, 2026 02:28
@rjpower rjpower enabled auto-merge (squash) March 14, 2026 02:28
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 14, 2026

Claude finished @rjpower's task in 46s —— View job


Review

This PR fixes a Docker build break introduced by #3631 (which added a custom hatch build hook). Both Dockerfile.controller and Dockerfile.worker now COPY hatch_build.py alongside pyproject.toml so uv sync can find the build hook. The change is correct and minimal.

  • Read changed Dockerfiles and diff
  • Verify hatch_build.py exists and is referenced in pyproject.toml
  • Confirm Dockerfile.task is unaffected (no uv sync at build time)
  • Post review

Findings: None. The fix is straightforward and correct. pyproject.toml declares [tool.hatch.build.hooks.custom] which expects hatch_build.py in the same directory — copying it into the Docker build context is the right fix. Dockerfile.task correctly remains unchanged since it doesn't run uv sync during the build. The layer caching strategy is preserved: hatch_build.py changes rarely, so bundling it with pyproject.toml in the early COPY layer is appropriate.

LGTM.

@rjpower rjpower merged commit 078a192 into main Mar 14, 2026
20 checks passed
@rjpower rjpower deleted the fix/iris-docker-hatch-build-hook branch March 14, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-generated Created by automation/agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants