Skip to content

Commit 65181e4

Browse files
committed
add failed logs
1 parent 30875ea commit 65181e4

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

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

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,40 @@ jobs:
140140
fi
141141
done
142142
143+
# Always show AgentEx server container logs for debugging
144+
echo ""
145+
echo "========================================="
146+
echo "AGENTEX SERVER CONTAINER LOGS"
147+
echo "========================================="
148+
149+
# Show AgentEx server container logs
150+
echo "📋 AgentEx server container logs:"
151+
echo "----------------------------------------"
152+
cd ../scale-agentex/agentex || {
153+
echo "❌ Failed to navigate to scale-agentex/agentex directory"
154+
pwd
155+
ls -la ../
156+
exit 1
157+
}
158+
159+
echo "Current directory: $(pwd)"
160+
echo "Available containers:"
161+
docker compose ps || docker ps
162+
163+
echo ""
164+
echo "AgentEx container logs (last 100 lines):"
165+
docker compose logs agentex --tail=100 || {
166+
echo "❌ Failed to get agentex container logs, trying alternative methods..."
167+
docker logs $(docker ps --filter "name=agentex" --format "{{.ID}}") --tail=100 2>/dev/null || {
168+
echo "❌ No agentex container found, showing all container logs:"
169+
docker compose logs --tail=50 || docker logs --help
170+
}
171+
}
172+
echo "----------------------------------------"
173+
174+
# Return to tutorial directory
175+
cd ../../examples/tutorials
176+
143177
# Print summary
144178
echo ""
145179
echo "========================================="
@@ -155,6 +189,33 @@ jobs:
155189
for test in "${failed_tests[@]}"; do
156190
echo " ❌ $test"
157191
done
192+
193+
echo ""
194+
echo "========================================="
195+
echo "TUTORIAL AGENT LOGS FOR FAILED TESTS"
196+
echo "========================================="
197+
198+
# Show logs for failed tests
199+
for test in "${failed_tests[@]}"; do
200+
test_name=$(basename "$test")
201+
logfile="/tmp/agentex-${test_name}.log"
202+
203+
echo ""
204+
echo "📋 Tutorial agent logs for $test ($logfile):"
205+
echo "----------------------------------------"
206+
207+
if [ -f "$logfile" ]; then
208+
echo "Last 100 lines of tutorial agent logs:"
209+
tail -100 "$logfile"
210+
else
211+
echo "⚠️ No log file found at: $logfile"
212+
echo "Available log files:"
213+
ls -la /tmp/agentex-*.log 2>/dev/null || echo " (none)"
214+
fi
215+
216+
echo "----------------------------------------"
217+
done
218+
158219
exit 1
159220
else
160221
echo ""

0 commit comments

Comments
 (0)