feat(cli): allow prebuild images for langgraph deploy#8100
feat(cli): allow prebuild images for langgraph deploy#8100hari-dhanushkodi wants to merge 5 commits into
Conversation
Asamu David (phvash)
left a comment
There was a problem hiding this comment.
Looks good. Non-blocking, but two ux improvement suggestions"
- we should add existence check for the image, and
- We should also confirm the image's platform is
linux/amd64to avoid any gotchas during deployment.
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
| except click.exceptions.Exit: | ||
| raise click.ClickException( | ||
| f"Docker image '{image}' was not found locally. Build or pull the image " | ||
| "before deploying with --image." | ||
| ) from None |
There was a problem hiding this comment.
🟡 Missing Docker crashes image validation
With --image, _resolve_build_mode(..., force_local=True) skips the existing can_build_locally() preflight, so this helper is the first place that invokes Docker. If the Docker binary is not installed, asyncio.create_subprocess_exec("docker", ...) raises FileNotFoundError (and the subprocess helper can surface that instead of click.exceptions.Exit), which is not caught here. That makes langgraph deploy --image ... crash with a traceback on machines without Docker instead of returning the actionable Docker-required error that the normal local-build path provides. Please catch the missing-binary case here or keep the Docker availability preflight for --image.
(Refers to lines 384-388)
Your feedback helps Open SWE learn. React with 👍 or 👎 to tell us if this review comment was useful.
Fixes #
adds a --image flag to
langgraph deploy, allows a user tolanggraph builda custom image and then deploy this specific image withlanggraph deploy.