Skip to content

Commit 4ab02d6

Browse files
committed
Update check for prerelease installs
1 parent 8f45653 commit 4ab02d6

File tree

6 files changed

+41
-26
lines changed

6 files changed

+41
-26
lines changed

.github/scripts/run_langgraph_cli_test.py

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
from langgraph_cli.constants import DEFAULT_PORT
1111
from langgraph_cli.exec import Runner, subp_exec
1212
from langgraph_cli.progress import Progress
13+
import logging
14+
15+
logger = logging.getLogger(__name__)
16+
logging.basicConfig(level=logging.INFO)
1317

1418

1519
def test(config: pathlib.Path, port: int, tag: str, verbose: bool):
@@ -57,7 +61,9 @@ def test(config: pathlib.Path, port: int, tag: str, verbose: bool):
5761
sys.stderr.write(f"docker compose up failed: {e}\n")
5862
try:
5963
sys.stderr.write("\n== docker compose ps ==\n")
60-
runner.run(subp_exec(*compose_cmd, *args, "ps", input=stdin, verbose=False))
64+
runner.run(
65+
subp_exec(*compose_cmd, *args, "ps", input=stdin, verbose=False)
66+
)
6167
except Exception:
6268
pass
6369
try:
@@ -93,7 +99,7 @@ def test(config: pathlib.Path, port: int, tag: str, verbose: bool):
9399
set("")
94100
base_url = f"http://localhost:{port}"
95101
ok_url = f"{base_url}/ok"
96-
print(f"Waiting for {ok_url} to respond with 200...")
102+
logger.info(f"Waiting for {ok_url} to respond with 200...")
97103
deadline = time.time() + 30
98104
last_err: Exception | None = None
99105
while time.time() < deadline:
@@ -107,13 +113,16 @@ def test(config: pathlib.Path, port: int, tag: str, verbose: bool):
107113
break
108114
else:
109115
last_err = RuntimeError(f"Unexpected status: {resp.status}")
110-
print(f"Unexpected status: {resp.status}")
116+
logger.error(f"Unexpected status: {resp.status}")
111117
except error.URLError as e:
118+
logger.error(f"URLError: {e}")
112119
last_err = e
113120
except Exception as e: # noqa: BLE001
121+
logger.error(f"Exception: {e}")
114122
last_err = e
115123
time.sleep(0.5)
116124
else:
125+
logger.error("Timeout waiting for /ok to return 200")
117126
# Bring stack down before raising
118127
args_down = [*args, "down", "-v", "--remove-orphans"]
119128
try:
@@ -131,15 +140,19 @@ def test(config: pathlib.Path, port: int, tag: str, verbose: bool):
131140
)
132141

133142
# Clean up: bring compose stack down to free ports for next test
134-
args_down = [*args, "down", "-v", "--remove-orphans"]
135-
runner.run(
136-
subp_exec(
137-
*compose_cmd,
138-
*args_down,
139-
input=stdin,
140-
verbose=verbose,
143+
try:
144+
args_down = [*args, "down", "-v", "--remove-orphans"]
145+
runner.run(
146+
subp_exec(
147+
*compose_cmd,
148+
*args_down,
149+
input=stdin,
150+
verbose=verbose,
151+
)
141152
)
142-
)
153+
except Exception:
154+
logger.exception("Failed to bring down compose stack")
155+
pass
143156

144157

145158
if __name__ == "__main__":

.github/workflows/_integration_test.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
matrix:
1414
python-version:
1515
- "3.10"
16-
- "3.11"
1716
- "3.14"
1817
example:
1918
- name: A
@@ -67,19 +66,19 @@ jobs:
6766
timeout 60 python "$REPO_ROOT/.github/scripts/run_langgraph_cli_test.py" -t ${{ matrix.example.tag }}
6867
6968
- name: Build JS service
70-
if: steps.changed-files.outputs.all
69+
if: steps.changed-files.outputs.all && matrix.example.name == "A"
7170
working-directory: libs/cli/js-examples
7271
run: |
7372
langgraph build -t langgraph-test-e
7473
7574
- name: Build JS monorepo service
76-
if: steps.changed-files.outputs.all
75+
if: steps.changed-files.outputs.all && matrix.example.name == "A"
7776
working-directory: libs/cli/js-monorepo-example
7877
run: |
7978
langgraph build -t langgraph-test-f -c apps/agent/langgraph.json --build-command "yarn run turbo build" --install-command "yarn install"
8079
8180
- name: Build Python monorepo service
82-
if: steps.changed-files.outputs.all
81+
if: steps.changed-files.outputs.all && matrix.example.name == "A"
8382
working-directory: libs/cli/python-monorepo-example
8483
run: |
8584
langgraph build -t langgraph-test-g -c apps/agent/langgraph.json
@@ -88,24 +87,28 @@ jobs:
8887
timeout 60 python ../../../.github/scripts/run_langgraph_cli_test.py -t langgraph-test-g -c apps/agent/langgraph.json
8988
9089
- name: Build and test prerelease reqs service
91-
if: steps.changed-files.outputs.all
90+
if: steps.changed-files.outputs.all && matrix.example.name == "A"
9291
working-directory: libs/cli/examples/graph_prerelease_reqs
9392
run: |
9493
langgraph build -t langgraph-test-h
9594
cp ../.env.example .env
9695
if [ -n "${{ secrets.LANGSMITH_API_KEY }}" ]; then echo "LANGSMITH_API_KEY=${{ secrets.LANGSMITH_API_KEY }}" >> .env; fi
9796
timeout 60 python ../../../../.github/scripts/run_langgraph_cli_test.py -t langgraph-test-h
9897
LANGGRAPH_VERSION=$(docker run --rm --entrypoint "" langgraph-test-h python -c "import sys; from importlib.metadata import version; v = version('langgraph'); print(v);")
99-
if [ "$LANGGRAPH_VERSION" != "1.0.0a2" ]; then
98+
if [ "$LANGGRAPH_VERSION" != "1.0.2" ]; then
10099
exit 1
101100
fi
102101
LANGCHAIN_OPENAI_VERSION=$(docker run --rm --entrypoint "" langgraph-test-h python -c "import sys; from importlib.metadata import version; v = version('langchain-openai'); print(v);")
103-
if [ "$LANGCHAIN_OPENAI_VERSION" != "0.3.0" ]; then
102+
if [ "$LANGCHAIN_OPENAI_VERSION" != "1.0.1" ]; then
103+
exit 1
104+
fi
105+
LANGCHAIN_ANTHROPIC_VERSION=$(docker run --rm --entrypoint "" langgraph-test-h python -c "import sys; from importlib.metadata import version; v = version('langchain-anthropic'); print(v);")
106+
if [ "$LANGCHAIN_ANTHROPIC_VERSION" != "1.0.0.a5" ]; then
104107
exit 1
105108
fi
106109
107110
- name: Build and test prerelease reqs fail service
108-
if: steps.changed-files.outputs.all
111+
if: steps.changed-files.outputs.all && matrix.example.name == "A"
109112
working-directory: libs/cli/examples/graph_prerelease_reqs_fail
110113
run: |
111114
langgraph build -t langgraph-test-i || [ $? -eq 1 ]

libs/cli/examples/graph_prerelease_reqs/agent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
from collections.abc import Sequence
22
from typing import Annotated, Literal, TypedDict
33

4-
from langchain_community.tools.tavily_search import TavilySearchResults
54
from langchain_core.messages import BaseMessage
65
from langchain_openai import ChatOpenAI
76
from langgraph.graph import END, StateGraph, add_messages
87
from langgraph.prebuilt import ToolNode
98

10-
tools = [TavilySearchResults(max_results=1)]
9+
tools = []
1110

1211
model_oai = ChatOpenAI(temperature=0)
1312

libs/cli/examples/graph_prerelease_reqs/deps/additional_deps/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ description = "Test for prerelease stuff"
55
readme = "README.md"
66
requires-python = ">=3.10"
77
dependencies = [
8-
"langgraph==0.6.11"
8+
"langgraph==1.0.2"
99
]

libs/cli/examples/graph_prerelease_reqs/deps/zuper_deps/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ description = "Test for prerelease stuff"
55
readme = "README.md"
66
requires-python = ">=3.10"
77
dependencies = [
8-
"langchain-openai==0.3.0"
8+
"langchain-openai==1.0.0"
99
]

libs/cli/examples/graph_prerelease_reqs/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ readme = "README.md"
66
requires-python = ">=3.10"
77
dependencies = [
88
"langchain-openai==1.0.0a2",
9-
"langgraph==1.0.0a2",
10-
"langchain_community>=0.3.0",
9+
"langchain-anthropic==1.0.0.a5",
10+
"langgraph==1.0.2"
1111
]
1212

1313
[tool.uv]
14-
prerelease = "allow"
14+
prerelease = "allow"

0 commit comments

Comments
 (0)