This commit is contained in:
Quanzheng Long
2026-03-10 10:33:08 -07:00
parent 6bd3e8b1e5
commit 28cb872ca4
2 changed files with 5 additions and 24 deletions
+5 -12
View File
@@ -1269,6 +1269,11 @@ def docker_tag(
version_distro_tag = f"{version}{distro_tag}"
# Prepend API version if provided
# Strip an existing tag from base_image so we don't produce two colons
# (e.g. "langchain/langgraph-server:0.2" → "langchain/langgraph-server").
if ":" in base_image:
base_image = base_image.rsplit(":", 1)[0]
if api_version:
full_tag = f"{api_version}-{language}{version_distro_tag}"
elif "/langgraph-server" in base_image and version_distro_tag not in base_image:
@@ -1276,11 +1281,6 @@ def docker_tag(
else:
full_tag = version_distro_tag
# Strip an existing tag from base_image so we don't produce two colons
# (e.g. "langchain/langgraph-server:0.2" → "langchain/langgraph-server").
if ":" in base_image:
base_image = base_image.rsplit(":", 1)[0]
return f"{base_image}:{full_tag}"
@@ -1427,13 +1427,6 @@ def config_to_compose(
additional_contexts:
{executor_additional_contexts_str}"""
if not api_version:
raise click.ClickException(
"Distributed runtime requires a pinned API version for all images.\n"
"Either pass --api-version explicitly or let the CLI resolve it "
"from the Docker Hub version marker."
)
postgres_uri = "postgres://postgres:postgres@langgraph-postgres:5432/postgres?sslmode=disable"
result += f""" langgraph-orchestrator:
image: langchain/langgraph-orchestrator-licensed:{api_version}
-12
View File
@@ -1904,18 +1904,6 @@ def test_config_to_compose_distributed_orchestrator_uses_api_version():
assert "langchain/langgraph-orchestrator-licensed:0.7.67" in actual
def test_config_to_compose_distributed_requires_api_version():
"""Without api_version, distributed mode should raise ClickException."""
graphs = {"agent": "./agent.py:graph"}
with pytest.raises(click.ClickException, match="pinned API version"):
config_to_compose(
PATH_TO_CONFIG,
validate_config({"dependencies": ["."], "graphs": graphs}),
"langchain/langgraph-api",
engine_runtime_mode="distributed",
)
def test_config_to_compose_distributed_all_images_same_version():
"""All 3 images (api, executor, orchestrator) should use the same api_version."""
graphs = {"agent": "./agent.py:graph"}