Repository navigation
Docker image: compile the SDK once, and let the workflow push to ghcr.io - #281
Merged
Merged
Conversation
The test-services image compiled the Rust extension twice per platform: `uv sync --all-extras --all-packages` for an editable install (with 158 packages of extras the image never uses), then `uv build --all-packages` again from the sdist. Under QEMU, for linux/arm64, that was 55 + 45 minutes. Only the wheel is copied to the final stage, so the build stage now runs `uv build --wheel`, once. The workflow had no permissions block, and every run since Oct 30 failed at the push: "installation not allowed to Write organization package". It now asks for packages: write. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RePHkQqibBdq1QeiSmBDhE
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
I reviewed the Dockerfile build-stage simplification and the new workflow token permissions.
- One compile per platform:
test-services/Dockerfilenow runs onlyuv build --wheel. Before, it also ranuv sync --all-extras --all-packagesand then built the wheel a second time from an sdist. The final stage only ever ranpip install deps/*whlwith no extras, andrestate-sdkis the only package in the repo (no uv workspace members), so droppinguv syncand--all-packagesdoesn't change what the image contains. - ghcr.io push permission:
docker.ymlnow setscontents: read(enough foractions/checkout) andpackages: write(needed fordocker/build-push-actionto push withGITHUB_TOKEN). No actions were added or changed, soactions.lockdoesn't need updating.
claude-opus-5-5 | 𝕏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The "Build docker image" workflow has failed on every push to
mainsince Oct 30, and since #262 it takes about 100 minutes.Why it's slow
The linux/arm64 half of the image is built under QEMU, and
test-services/Dockerfilecompiled the Rust extension twice per platform:uv sync --all-extras --all-packagesuv build --all-packages(sdist, then a wheel from it)uv syncalso installed 158 packages of extras (google-adk, google-cloud-*, langchain…) that the image never uses: only the wheel indist/is copied to the final stage. The build stage now runsuv build --wheel, once, from the source tree.Why it fails
Every run since #248 ends with:
docker.ymlhad nopermissions:block (cla.ymlneeded explicit permissions the same day, so the token's default seems to have become read-only). It now asks forcontents: readandpackages: write. If the push is still denied after merging, the package's settings on ghcr.io needrestatedev/sdk-pythonwith write access under "Manage Actions access".Testing
/discoverwith the test services.main.Expected effect
About 100 → 50 minutes (the arm64 compile under QEMU stays). Building arm64 on a native arm64 runner instead of QEMU would bring it to about 10; that's left for a follow-up.
integration.yamlbuilds the same Dockerfile, so its image build gets faster too.Generated by Claude Code