From 3fddc24c5f7a316bc7b6a846ec2c13965c611b59 Mon Sep 17 00:00:00 2001 From: Eilen Shin <136898293+Eilen6316@users.noreply.github.com> Date: Wed, 3 Jun 2026 22:04:05 +0800 Subject: [PATCH] chore: remove stale LangGraph server runtime remnants (#3344) * chore: remove stale langgraph server runtime remnants * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Willem Jiang Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- Makefile | 1 - backend/Dockerfile | 6 +++--- backend/tests/test_gateway_runtime_cleanup.py | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index cea782c2a..b6554fa06 100644 --- a/Makefile +++ b/Makefile @@ -119,7 +119,6 @@ stop: clean: stop @echo "Cleaning up..." @-rm -rf backend/.deer-flow 2>/dev/null || true - @-rm -rf backend/.langgraph_api 2>/dev/null || true @-rm -rf logs/*.log 2>/dev/null || true @echo "✓ Cleanup complete" diff --git a/backend/Dockerfile b/backend/Dockerfile index dcb2f26e4..b9a3b61a5 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -64,7 +64,7 @@ FROM builder AS dev # Install Docker CLI (for DooD: allows starting sandbox containers via host Docker socket) COPY --from=docker:cli /usr/local/bin/docker /usr/local/bin/docker -EXPOSE 8001 2024 +EXPOSE 8001 CMD ["sh", "-c", "cd backend && PYTHONPATH=. uv run uvicorn app.gateway.app:app --host 0.0.0.0 --port 8001"] @@ -94,8 +94,8 @@ WORKDIR /app # Copy backend with pre-built virtualenv from builder COPY --from=builder /app/backend ./backend -# Expose ports (gateway: 8001, langgraph: 2024) -EXPOSE 8001 2024 +# Expose Gateway API port. +EXPOSE 8001 # Default command (can be overridden in docker-compose) CMD ["sh", "-c", "cd backend && PYTHONPATH=. uv run --no-sync uvicorn app.gateway.app:app --host 0.0.0.0 --port 8001"] diff --git a/backend/tests/test_gateway_runtime_cleanup.py b/backend/tests/test_gateway_runtime_cleanup.py index 7a7648474..ae640267d 100644 --- a/backend/tests/test_gateway_runtime_cleanup.py +++ b/backend/tests/test_gateway_runtime_cleanup.py @@ -43,6 +43,20 @@ def test_service_launchers_always_use_gateway_runtime(): assert "LANGGRAPH_REWRITE" not in content, path +def test_backend_container_only_exposes_gateway_port(): + dockerfile = _read("backend/Dockerfile") + + assert not re.search(r"^EXPOSE\s+.*\b2024\b", dockerfile, re.M) + assert "langgraph: 2024" not in dockerfile + assert re.search(r"^EXPOSE\s+8001\b", dockerfile, re.M) + + +def test_root_makefile_clean_does_not_reference_langgraph_server_cache(): + makefile = _read("Makefile") + + assert ".langgraph_api" not in makefile + + def test_nginx_routes_official_langgraph_prefix_to_gateway_api(): for path in ("docker/nginx/nginx.local.conf", "docker/nginx/nginx.conf"): content = _read(path)