Skip to content

Commit 22c90b5

Browse files
committed
checking tutorial ports
1 parent ea16c53 commit 22c90b5

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

β€Ž.github/workflows/agentex-tutorials-test.ymlβ€Ž

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
cd scale-agentex/agentex
3030
echo "πŸš€ Starting dependencies (Postgres, Redis, Temporal, MongoDB)..."
3131
32-
# Start all services except the agentex service
32+
# Start all services
3333
docker compose up -d
3434
3535
echo "⏳ Waiting for dependencies to be healthy..."
@@ -44,8 +44,26 @@ jobs:
4444
sleep 5
4545
done
4646
47-
# Verify all deps are up
47+
# Wait specifically for AgentEx server to be ready
48+
echo "⏳ Waiting for AgentEx server to be ready..."
49+
for i in {1..30}; do
50+
if curl -s --max-time 5 http://localhost:5003/health >/dev/null 2>&1; then
51+
echo "βœ… AgentEx server is ready"
52+
break
53+
fi
54+
echo " Attempt $i/30: Waiting for AgentEx server..."
55+
sleep 5
56+
done
57+
58+
# Debug port mappings
59+
echo "πŸ” Docker port mappings:"
4860
docker compose ps
61+
echo ""
62+
echo "πŸ” Docker port details:"
63+
docker compose ps --format "table {{.Name}}\t{{.Image}}\t{{.Ports}}"
64+
echo ""
65+
echo "πŸ” Testing AgentEx server accessibility:"
66+
curl -v --max-time 10 http://localhost:5003/health 2>&1 || echo "❌ AgentEx not accessible on localhost:5003"
4967
5068
- name: Build AgentEx SDK
5169
run: |
@@ -124,9 +142,13 @@ jobs:
124142
echo "Updated $manifest_path to use port $port"
125143
fi
126144
145+
# Debug connectivity before running test
146+
echo "πŸ” Pre-test connectivity check:"
147+
curl -v --max-time 5 http://localhost:5003/agents 2>&1 || echo "❌ /agents endpoint not accessible"
148+
127149
# Run test in background with unique port
128150
(
129-
AGENTEX_API_BASE_URL="http://host.docker.internal:5003" \
151+
AGENTEX_API_BASE_URL="http://localhost:5003" \
130152
./run_agent_test.sh --build-cli "$tutorial"
131153
132154
if [ $? -eq 0 ]; then

β€Žexamples/tutorials/run_agent_test.shβ€Ž

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,20 @@ run_test() {
260260
# Change to tutorial directory
261261
cd "$tutorial_path" || return 1
262262

263+
# Debug connectivity inside uv environment
264+
echo -e "${YELLOW}πŸ” Testing connectivity inside uv environment...${NC}"
265+
uv run python -c "
266+
import os
267+
print(f'AGENTEX_API_BASE_URL: {os.environ.get(\"AGENTEX_API_BASE_URL\", \"NOT SET\")}')
268+
try:
269+
import httpx
270+
response = httpx.get('http://localhost:5003/agents', timeout=10)
271+
print(f'βœ… HTTP request successful: {response.status_code}')
272+
print(f'Response: {response.text}')
273+
except Exception as e:
274+
print(f'❌ HTTP request failed: {e}')
275+
"
276+
263277
# Run the tests
264278
uv run pytest tests/test_agent.py -v -s
265279
local exit_code=$?

0 commit comments

Comments
Β (0)