This commit is contained in:
Quanzheng Long
2026-03-09 22:04:29 -07:00
parent 5c4af31372
commit 4b4b91c7e7
3 changed files with 17 additions and 11 deletions
+3 -1
View File
@@ -1518,7 +1518,9 @@ def prepare(
fg="cyan",
)
api_version = langgraph_cli.config.fetch_latest_api_version()
click.secho(f"Using version {api_version} for all distributed images.", fg="cyan")
click.secho(
f"Using version {api_version} for all distributed images.", fg="cyan"
)
# pull latest images
if pull:
@@ -943,6 +943,7 @@ def test_prepare_args_and_stdin_distributed_mode() -> None:
port=port,
watch=False,
engine_runtime_mode="distributed",
api_version="0.7.67",
)
# API service should use langgraph-api base image
+13 -10
View File
@@ -1787,7 +1787,9 @@ def test_config_to_compose_distributed_mode():
# Executor service is present with correct base image
assert "langgraph-executor:" in actual_compose_stdin
assert "FROM langchain/langgraph-executor:0.7.67-py3.11" in actual_compose_stdin
assert 'entrypoint: ["sh", "/storage/executor_entrypoint.sh"]' in actual_compose_stdin
assert (
'entrypoint: ["sh", "/storage/executor_entrypoint.sh"]' in actual_compose_stdin
)
# Executor has required environment variables
assert "EXECUTOR_GRPC_PORT:" in actual_compose_stdin
@@ -1874,6 +1876,7 @@ def test_config_to_compose_distributed_executor_gets_correct_paths():
validate_config({"dependencies": ["."], "graphs": graphs}),
"langchain/langgraph-api",
engine_runtime_mode="distributed",
api_version="0.7.67",
)
# Both API and executor Dockerfiles should contain valid LANGSERVE_GRAPHS
@@ -1947,16 +1950,16 @@ 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_orchestrator_defaults_to_latest():
"""Without api_version, orchestrator image should use 'latest'."""
def test_config_to_compose_distributed_requires_api_version():
"""Without api_version, distributed mode should raise ClickException."""
graphs = {"agent": "./agent.py:graph"}
actual = config_to_compose(
PATH_TO_CONFIG,
validate_config({"dependencies": ["."], "graphs": graphs}),
"langchain/langgraph-api",
engine_runtime_mode="distributed",
)
assert "langchain/langgraph-orchestrator-licensed:latest" in actual
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():