@@ -100,85 +100,71 @@ jobs:
100100 id : run-tck
101101 timeout-minutes : 5
102102 run : |
103- ./run_tck.py --sut-url ${{ env.SUT_JSONRPC_URL }} --category all --transports jsonrpc,grpc,rest --compliance-report report.json
103+ ./run_tck.py --sut-url ${{ env.SUT_JSONRPC_URL }} --category all --transports jsonrpc,grpc,rest --compliance-report report.json 2>&1 | tee tck-output.log
104104 working-directory : tck/a2a-tck
105- - name : Capture Thread Dump
105+ - name : Capture Diagnostics on Failure
106106 if : failure()
107107 run : |
108+ echo "=== Capturing diagnostic information ==="
109+
110+ # Create diagnostics directory
111+ mkdir -p tck/target/diagnostics
112+
113+ # Capture process list
114+ echo "📋 Capturing process list..."
115+ ps auxww > tck/target/diagnostics/processes.txt
116+
108117 # Find the actual Quarkus JVM (child of Maven process), not the Maven parent
109118 # Look for the dev.jar process which is the actual application
110119 QUARKUS_PID=$(pgrep -f "a2a-tck-server-dev.jar" || echo "")
111120 if [ -n "$QUARKUS_PID" ]; then
112121 echo "📊 Capturing thread dump for Quarkus JVM PID $QUARKUS_PID"
113- jstack $QUARKUS_PID > tck/target/thread-dump.txt || echo "Failed to capture thread dump"
114- if [ -f tck/target/thread-dump.txt ]; then
115- echo "✅ Thread dump captured ($(wc -l < tck/target/thread-dump.txt) lines)"
122+ jstack $QUARKUS_PID > tck/target/diagnostics/ thread-dump.txt || echo "Failed to capture thread dump"
123+ if [ -f tck/target/diagnostics/ thread-dump.txt ]; then
124+ echo "✅ Thread dump captured ($(wc -l < tck/target/diagnostics/ thread-dump.txt) lines)"
116125 fi
117126 else
118127 echo "⚠️ No Quarkus JVM process found for thread dump"
119128 echo "Available Java processes:"
120- ps aux | grep java || true
129+ ps aux | grep java | tee -a tck/target/diagnostics/processes.txt | | true
121130 fi
122- - name : Capture Heap Dump
123- if : failure()
124- run : |
125- # Find the actual Quarkus JVM (child of Maven process), not the Maven parent
126- QUARKUS_PID=$(pgrep -f "a2a-tck-server-dev.jar" || echo "")
127- if [ -n "$QUARKUS_PID" ]; then
128- echo "📊 Capturing heap dump for Quarkus JVM PID $QUARKUS_PID"
129- jmap -dump:live,format=b,file=tck/target/heap-dump.hprof $QUARKUS_PID || echo "Failed to capture heap dump"
130- if [ -f tck/target/heap-dump.hprof ]; then
131- SIZE=$(du -h tck/target/heap-dump.hprof | cut -f1)
132- echo "✅ Heap dump captured ($SIZE)"
133- # Compress to reduce artifact size
134- gzip tck/target/heap-dump.hprof
135- COMPRESSED_SIZE=$(du -h tck/target/heap-dump.hprof.gz | cut -f1)
136- echo "✅ Compressed heap dump ($COMPRESSED_SIZE)"
137- fi
138- else
139- echo "⚠️ No Quarkus JVM process found for heap dump"
140- echo "Available Java processes:"
141- ps aux | grep java || true
131+
132+ # Capture Quarkus application logs (if available)
133+ echo "📝 Checking for Quarkus logs..."
134+ if [ -f tck/target/quarkus.log ]; then
135+ cp tck/target/quarkus.log tck/target/diagnostics/
136+ echo "✅ Copied quarkus.log ($(wc -l < tck/target/quarkus.log) lines)"
137+ fi
138+
139+ # Copy TCK server logs
140+ if [ -f tck/target/tck-test.log ]; then
141+ cp tck/target/tck-test.log tck/target/diagnostics/
142+ echo "✅ Copied tck-test.log ($(wc -l < tck/target/tck-test.log) lines)"
142143 fi
144+
145+ echo ""
146+ echo "=== Diagnostic capture complete ==="
143147 - name : Stop Quarkus Server
144148 if : always()
145149 run : |
146150 # Find and kill the Quarkus process to ensure logs are flushed
147151 pkill -f "quarkus:dev" || true
148152 sleep 2
149- - name : Verify TCK Log
150- if : failure()
151- run : |
152- echo "Checking for log file..."
153- if [ -f tck/target/tck-test.log ]; then
154- echo "✅ Log file exists ($(wc -l < tck/target/tck-test.log) lines)"
155- ls -lh tck/target/tck-test.log
156- else
157- echo "❌ Log file not found at tck/target/tck-test.log"
158- echo "Contents of tck/target/:"
159- ls -la tck/target/ || echo "tck/target/ does not exist"
160- fi
161- - name : Upload TCK Log
153+ - name : Upload TCK Diagnostics
162154 if : failure()
163155 uses : actions/upload-artifact@v4
164156 with :
165- name : tck-test-log-java-${{ matrix.java-version }}
166- path : tck/target/tck-test.log
167- retention-days : 2
157+ name : tck-diagnostics-java-${{ matrix.java-version }}
158+ path : |
159+ tck/target/diagnostics/
160+ tck/a2a-tck/tck-output.log
161+ retention-days : 7
168162 if-no-files-found : warn
169- - name : Upload Thread Dump
170- if : failure()
171- uses : actions/upload-artifact@v4
172- with :
173- name : thread-dump-java-${{ matrix.java-version }}
174- path : tck/target/thread-dump.txt
175- retention-days : 2
176- if-no-files-found : warn
177- - name : Upload Heap Dump
178- if : failure()
163+ - name : Upload TCK Compliance Report
164+ if : always()
179165 uses : actions/upload-artifact@v4
180166 with :
181- name : heap-dump -java-${{ matrix.java-version }}
182- path : tck/target/heap-dump.hprof.gz
183- retention-days : 2
184- if-no-files-found : warn
167+ name : tck-compliance-report -java-${{ matrix.java-version }}
168+ path : tck/a2a-tck/report.json
169+ retention-days : 14
170+ if-no-files-found : ignore
0 commit comments