Skip to content

Commit 1198bf9

Browse files
fix(ci): tutorial tests look for heavy wheel at adk/dist/, pass both wheels to uv
The tutorial test workflow boots an agentex agent via `uv run --with <wheel> agentex agents run ...`. After the package split: - The slim `agentex_sdk_client-*.whl` ships from `dist/` (root) - The heavy `agentex_sdk-*.whl` (which provides the `agentex` CLI) now ships from `adk/dist/` Old workflow ran `uv build` at root (produces slim only) and the script hunted for `dist/agentex_sdk-*.whl` (heavy) — which doesn't exist there anymore. CI saw "❌ No built wheel found in dist/agentex_sdk-*.whl". Also: heavy pins `agentex-sdk-client>=0.11.4,<0.12` as a runtime dep, and the slim isn't on PyPI yet, so uv must resolve the slim from the LOCAL wheel too. Single `--with` isn't enough; need both. Fixes: - `.github/workflows/agentex-tutorials-test.yml`: build both packages in the "Build AgentEx SDK" step. - `examples/tutorials/run_agent_test.sh`: three sites (agent run, pytest invocation, check_built_wheel) now find both wheels at their new paths (slim at `dist/agentex_sdk_client-*.whl`, heavy at `adk/dist/agentex_sdk-*.whl`) and pass both to `uv run --with`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3a95482 commit 1198bf9

2 files changed

Lines changed: 49 additions & 27 deletions

File tree

.github/workflows/agentex-tutorials-test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,13 @@ jobs:
124124
125125
- name: Build AgentEx SDK
126126
run: |
127-
echo "🔨 Building AgentEx SDK wheel..."
128-
uv build
129-
echo "✅ SDK built successfully"
127+
echo "🔨 Building slim agentex-sdk-client wheel (root)..."
128+
uv build --wheel
129+
echo "🔨 Building heavy agentex-sdk wheel (adk/)..."
130+
(cd adk && uv build --wheel)
131+
echo "✅ Both SDK wheels built successfully"
130132
ls -la dist/
133+
ls -la adk/dist/
131134
132135
- name: Test Tutorial
133136
id: run-test

examples/tutorials/run_agent_test.sh

Lines changed: 43 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -126,18 +126,26 @@ start_agent() {
126126

127127
if [ "$BUILD_CLI" = true ]; then
128128

129-
# Use wheel from dist directory at repo root
130-
local wheel_file=$(ls /home/runner/work/*/*/dist/agentex_sdk-*.whl 2>/dev/null | head -n1)
131-
if [[ -z "$wheel_file" ]]; then
132-
echo -e "${RED}❌ No built wheel found in dist/agentex_sdk-*.whl${NC}"
133-
echo -e "${YELLOW}💡 Please build the local SDK first by running: uv build${NC}"
134-
echo -e "${YELLOW}💡 From the repo root directory${NC}"
129+
# Heavy ADK wheel ships from adk/dist/; slim client wheel ships from dist/.
130+
# We need both: heavy pins agentex-sdk-client which isn't on PyPI yet,
131+
# so uv must resolve both from local wheels rather than the registry.
132+
local heavy_wheel=$(ls /home/runner/work/*/*/adk/dist/agentex_sdk-*.whl 2>/dev/null | head -n1)
133+
local slim_wheel=$(ls /home/runner/work/*/*/dist/agentex_sdk_client-*.whl 2>/dev/null | head -n1)
134+
if [[ -z "$heavy_wheel" ]]; then
135+
echo -e "${RED}❌ No built heavy wheel found in adk/dist/agentex_sdk-*.whl${NC}"
136+
echo -e "${YELLOW}💡 Build it first: (cd adk && uv build --wheel)${NC}"
137+
cd "$original_dir"
138+
return 1
139+
fi
140+
if [[ -z "$slim_wheel" ]]; then
141+
echo -e "${RED}❌ No built slim wheel found in dist/agentex_sdk_client-*.whl${NC}"
142+
echo -e "${YELLOW}💡 Build it first: uv build --wheel${NC}"
135143
cd "$original_dir"
136144
return 1
137145
fi
138146

139-
# Use the built wheel
140-
uv run --with "$wheel_file" agentex agents run --manifest "$manifest_path" > "$logfile" 2>&1 &
147+
# Pass both wheels so the local heavy resolves its slim dep locally
148+
uv run --with "$heavy_wheel" --with "$slim_wheel" agentex agents run --manifest "$manifest_path" > "$logfile" 2>&1 &
141149
else
142150
uv run agentex agents run --manifest manifest.yaml > "$logfile" 2>&1 &
143151
fi
@@ -262,13 +270,17 @@ run_test() {
262270
# Run the tests with retry mechanism
263271
local -a pytest_cmd=("uv" "run" "pytest")
264272
if [ "$BUILD_CLI" = true ]; then
265-
local wheel_file
266-
wheel_file=$(ls /home/runner/work/*/*/dist/agentex_sdk-*.whl 2>/dev/null | head -n1)
267-
if [[ -z "$wheel_file" ]]; then
268-
wheel_file=$(ls "${SCRIPT_DIR}/../../dist/agentex_sdk-*.whl" 2>/dev/null | head -n1)
273+
local heavy_wheel slim_wheel
274+
heavy_wheel=$(ls /home/runner/work/*/*/adk/dist/agentex_sdk-*.whl 2>/dev/null | head -n1)
275+
if [[ -z "$heavy_wheel" ]]; then
276+
heavy_wheel=$(ls "${SCRIPT_DIR}/../../adk/dist/agentex_sdk-*.whl" 2>/dev/null | head -n1)
277+
fi
278+
slim_wheel=$(ls /home/runner/work/*/*/dist/agentex_sdk_client-*.whl 2>/dev/null | head -n1)
279+
if [[ -z "$slim_wheel" ]]; then
280+
slim_wheel=$(ls "${SCRIPT_DIR}/../../dist/agentex_sdk_client-*.whl" 2>/dev/null | head -n1)
269281
fi
270-
if [[ -n "$wheel_file" ]]; then
271-
pytest_cmd=("uv" "run" "--with" "$wheel_file" "pytest")
282+
if [[ -n "$heavy_wheel" && -n "$slim_wheel" ]]; then
283+
pytest_cmd=("uv" "run" "--with" "$heavy_wheel" "--with" "$slim_wheel" "pytest")
272284
fi
273285
fi
274286

@@ -343,7 +355,7 @@ execute_tutorial_test() {
343355
fi
344356
}
345357

346-
# Function to check if built wheel is available
358+
# Function to check if both built wheels are available
347359
check_built_wheel() {
348360

349361
# Navigate to the repo root (two levels up from examples/tutorials)
@@ -355,19 +367,26 @@ check_built_wheel() {
355367
return 1
356368
}
357369

358-
# Check if wheel exists in dist directory at repo root
359-
local wheel_file=$(ls /home/runner/work/*/*/dist/agentex_sdk-*.whl 2>/dev/null | head -n1)
360-
if [[ -z "$wheel_file" ]]; then
361-
echo -e "${RED}❌ No built wheel found in dist/agentex_sdk-*.whl${NC}"
362-
echo -e "${YELLOW}💡 Please build the local SDK first by running: uv build${NC}"
363-
echo -e "${YELLOW}💡 From the repo root directory${NC}"
370+
# Heavy ADK wheel + slim client wheel — we need both because heavy pins
371+
# agentex-sdk-client which isn't on PyPI yet.
372+
local heavy_wheel=$(ls /home/runner/work/*/*/adk/dist/agentex_sdk-*.whl 2>/dev/null | head -n1)
373+
local slim_wheel=$(ls /home/runner/work/*/*/dist/agentex_sdk_client-*.whl 2>/dev/null | head -n1)
374+
if [[ -z "$heavy_wheel" ]]; then
375+
echo -e "${RED}❌ No built heavy wheel found in adk/dist/agentex_sdk-*.whl${NC}"
376+
echo -e "${YELLOW}💡 Build it first: (cd adk && uv build --wheel)${NC}"
377+
cd "$original_dir"
378+
return 1
379+
fi
380+
if [[ -z "$slim_wheel" ]]; then
381+
echo -e "${RED}❌ No built slim wheel found in dist/agentex_sdk_client-*.whl${NC}"
382+
echo -e "${YELLOW}💡 Build it first: uv build --wheel${NC}"
364383
cd "$original_dir"
365384
return 1
366385
fi
367386

368-
# Test the wheel by running agentex --help
369-
if ! uv run --with "$wheel_file" agentex --help >/dev/null 2>&1; then
370-
echo -e "${RED}❌ Failed to run agentex with built wheel${NC}"
387+
# Test the heavy wheel by running agentex --help (uses both wheels for resolution)
388+
if ! uv run --with "$heavy_wheel" --with "$slim_wheel" agentex --help >/dev/null 2>&1; then
389+
echo -e "${RED}❌ Failed to run agentex with built wheels${NC}"
371390
cd "$original_dir"
372391
return 1
373392
fi

0 commit comments

Comments
 (0)