Skip to content

Commit 73a7a3b

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 3f09687 commit 73a7a3b

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
@@ -269,13 +277,17 @@ run_test() {
269277
# robust across all tutorials regardless of how each declares test deps.
270278
local -a pytest_cmd=("uv" "run" "--with" "pytest" "--with" "pytest-asyncio" "pytest")
271279
if [ "$BUILD_CLI" = true ]; then
272-
local wheel_file
273-
wheel_file=$(ls /home/runner/work/*/*/dist/agentex_sdk-*.whl 2>/dev/null | head -n1)
274-
if [[ -z "$wheel_file" ]]; then
275-
wheel_file=$(ls "${SCRIPT_DIR}/../../dist/agentex_sdk-*.whl" 2>/dev/null | head -n1)
280+
local heavy_wheel slim_wheel
281+
heavy_wheel=$(ls /home/runner/work/*/*/adk/dist/agentex_sdk-*.whl 2>/dev/null | head -n1)
282+
if [[ -z "$heavy_wheel" ]]; then
283+
heavy_wheel=$(ls "${SCRIPT_DIR}/../../adk/dist/agentex_sdk-*.whl" 2>/dev/null | head -n1)
284+
fi
285+
slim_wheel=$(ls /home/runner/work/*/*/dist/agentex_sdk_client-*.whl 2>/dev/null | head -n1)
286+
if [[ -z "$slim_wheel" ]]; then
287+
slim_wheel=$(ls "${SCRIPT_DIR}/../../dist/agentex_sdk_client-*.whl" 2>/dev/null | head -n1)
276288
fi
277-
if [[ -n "$wheel_file" ]]; then
278-
pytest_cmd=("uv" "run" "--with" "$wheel_file" "--with" "pytest" "--with" "pytest-asyncio" "pytest")
289+
if [[ -n "$heavy_wheel" && -n "$slim_wheel" ]]; then
290+
pytest_cmd=("uv" "run" "--with" "$heavy_wheel" "--with" "$slim_wheel" "--with" "pytest" "--with" "pytest-asyncio" "pytest")
279291
fi
280292
fi
281293

@@ -350,7 +362,7 @@ execute_tutorial_test() {
350362
fi
351363
}
352364

353-
# Function to check if built wheel is available
365+
# Function to check if both built wheels are available
354366
check_built_wheel() {
355367

356368
# Navigate to the repo root (two levels up from examples/tutorials)
@@ -362,19 +374,26 @@ check_built_wheel() {
362374
return 1
363375
}
364376

365-
# Check if wheel exists in dist directory at repo root
366-
local wheel_file=$(ls /home/runner/work/*/*/dist/agentex_sdk-*.whl 2>/dev/null | head -n1)
367-
if [[ -z "$wheel_file" ]]; then
368-
echo -e "${RED}❌ No built wheel found in dist/agentex_sdk-*.whl${NC}"
369-
echo -e "${YELLOW}💡 Please build the local SDK first by running: uv build${NC}"
370-
echo -e "${YELLOW}💡 From the repo root directory${NC}"
377+
# Heavy ADK wheel + slim client wheel — we need both because heavy pins
378+
# agentex-sdk-client which isn't on PyPI yet.
379+
local heavy_wheel=$(ls /home/runner/work/*/*/adk/dist/agentex_sdk-*.whl 2>/dev/null | head -n1)
380+
local slim_wheel=$(ls /home/runner/work/*/*/dist/agentex_sdk_client-*.whl 2>/dev/null | head -n1)
381+
if [[ -z "$heavy_wheel" ]]; then
382+
echo -e "${RED}❌ No built heavy wheel found in adk/dist/agentex_sdk-*.whl${NC}"
383+
echo -e "${YELLOW}💡 Build it first: (cd adk && uv build --wheel)${NC}"
384+
cd "$original_dir"
385+
return 1
386+
fi
387+
if [[ -z "$slim_wheel" ]]; then
388+
echo -e "${RED}❌ No built slim wheel found in dist/agentex_sdk_client-*.whl${NC}"
389+
echo -e "${YELLOW}💡 Build it first: uv build --wheel${NC}"
371390
cd "$original_dir"
372391
return 1
373392
fi
374393

375-
# Test the wheel by running agentex --help
376-
if ! uv run --with "$wheel_file" agentex --help >/dev/null 2>&1; then
377-
echo -e "${RED}❌ Failed to run agentex with built wheel${NC}"
394+
# Test the heavy wheel by running agentex --help (uses both wheels for resolution)
395+
if ! uv run --with "$heavy_wheel" --with "$slim_wheel" agentex --help >/dev/null 2>&1; then
396+
echo -e "${RED}❌ Failed to run agentex with built wheels${NC}"
378397
cd "$original_dir"
379398
return 1
380399
fi

0 commit comments

Comments
 (0)