fix: Update A2AException and A2AClientError so that they extend RuntimeException instead of IOException #658
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run TCK | |
| on: | |
| # Handle all branches for now | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| env: | |
| # Tag of the TCK | |
| TCK_VERSION: 0.3.0.beta2 | |
| # Tells uv to not need a venv, and instead use system | |
| UV_SYSTEM_PYTHON: 1 | |
| # SUT_JSONRPC_URL to use for the TCK and the server agent | |
| SUT_JSONRPC_URL: http://localhost:9999 | |
| # Slow system on CI | |
| TCK_STREAMING_TIMEOUT: 5.0 | |
| # Only run the latest job | |
| concurrency: | |
| group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}' | |
| cancel-in-progress: true | |
| jobs: | |
| tck-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java-version: [17, 21, 25] | |
| steps: | |
| - name: Checkout a2a-java | |
| uses: actions/checkout@v4 | |
| - name: Checkout a2a-tck | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: a2aproject/a2a-tck | |
| path: tck/a2a-tck | |
| ref: ${{ env.TCK_VERSION }} | |
| - name: Set up JDK ${{ matrix.java-version }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: check java_home | |
| run: echo $JAVA_HOME | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: "tck/a2a-tck/pyproject.toml" | |
| - name: Install uv and Python dependencies | |
| run: | | |
| pip install uv | |
| uv pip install -e . | |
| working-directory: tck/a2a-tck | |
| - name: Build with Maven, skipping tests | |
| run: mvn -B install -DskipTests | |
| - name: Start SUT | |
| run: SUT_GRPC_URL=${{ env.SUT_JSONRPC_URL }} SUT_REST_URL=${{ env.SUT_JSONRPC_URL }} mvn -B quarkus:dev & #SUT_JSONRPC_URL already set | |
| working-directory: tck | |
| - name: Wait for SUT to start | |
| run: | | |
| URL="${{ env.SUT_JSONRPC_URL }}/.well-known/agent-card.json" | |
| EXPECTED_STATUS=200 | |
| TIMEOUT=120 | |
| RETRY_INTERVAL=2 | |
| START_TIME=$(date +%s) | |
| while true; do | |
| # Calculate elapsed time | |
| CURRENT_TIME=$(date +%s) | |
| ELAPSED_TIME=$((CURRENT_TIME - START_TIME)) | |
| # Check for timeout | |
| if [ "$ELAPSED_TIME" -ge "$TIMEOUT" ]; then | |
| echo "❌ Timeout: Server did not respond with status $EXPECTED_STATUS within $TIMEOUT seconds." | |
| exit 1 | |
| fi | |
| # Get HTTP status code. || true is to reporting a failure to connect as an error | |
| HTTP_STATUS=$(curl --output /dev/null --silent --write-out "%{http_code}" "$URL") || true | |
| echo "STATUS: ${HTTP_STATUS}" | |
| # Check if we got the correct status code | |
| if [ "$HTTP_STATUS" -eq "$EXPECTED_STATUS" ]; then | |
| echo "✅ Server is up! Received status $HTTP_STATUS after $ELAPSED_TIME seconds." | |
| break; | |
| fi | |
| # Wait before retrying | |
| echo "⏳ Server not ready (status: $HTTP_STATUS). Retrying in $RETRY_INTERVAL seconds..." | |
| sleep "$RETRY_INTERVAL" | |
| done | |
| - name: Run TCK | |
| id: run-tck | |
| timeout-minutes: 5 | |
| run: | | |
| ./run_tck.py --sut-url ${{ env.SUT_JSONRPC_URL }} --category all --transports jsonrpc,grpc,rest --compliance-report report.json | |
| working-directory: tck/a2a-tck | |
| - name: Capture Thread Dump | |
| if: failure() | |
| run: | | |
| # Find the actual Quarkus JVM (child of Maven process), not the Maven parent | |
| # Look for the dev.jar process which is the actual application | |
| QUARKUS_PID=$(pgrep -f "a2a-tck-server-dev.jar" || echo "") | |
| if [ -n "$QUARKUS_PID" ]; then | |
| echo "📊 Capturing thread dump for Quarkus JVM PID $QUARKUS_PID" | |
| jstack $QUARKUS_PID > tck/target/thread-dump.txt || echo "Failed to capture thread dump" | |
| if [ -f tck/target/thread-dump.txt ]; then | |
| echo "✅ Thread dump captured ($(wc -l < tck/target/thread-dump.txt) lines)" | |
| fi | |
| else | |
| echo "⚠️ No Quarkus JVM process found for thread dump" | |
| echo "Available Java processes:" | |
| ps aux | grep java || true | |
| fi | |
| - name: Capture Heap Dump | |
| if: failure() | |
| run: | | |
| # Find the actual Quarkus JVM (child of Maven process), not the Maven parent | |
| QUARKUS_PID=$(pgrep -f "a2a-tck-server-dev.jar" || echo "") | |
| if [ -n "$QUARKUS_PID" ]; then | |
| echo "📊 Capturing heap dump for Quarkus JVM PID $QUARKUS_PID" | |
| jmap -dump:live,format=b,file=tck/target/heap-dump.hprof $QUARKUS_PID || echo "Failed to capture heap dump" | |
| if [ -f tck/target/heap-dump.hprof ]; then | |
| SIZE=$(du -h tck/target/heap-dump.hprof | cut -f1) | |
| echo "✅ Heap dump captured ($SIZE)" | |
| # Compress to reduce artifact size | |
| gzip tck/target/heap-dump.hprof | |
| COMPRESSED_SIZE=$(du -h tck/target/heap-dump.hprof.gz | cut -f1) | |
| echo "✅ Compressed heap dump ($COMPRESSED_SIZE)" | |
| fi | |
| else | |
| echo "⚠️ No Quarkus JVM process found for heap dump" | |
| echo "Available Java processes:" | |
| ps aux | grep java || true | |
| fi | |
| - name: Stop Quarkus Server | |
| if: always() | |
| run: | | |
| # Find and kill the Quarkus process to ensure logs are flushed | |
| pkill -f "quarkus:dev" || true | |
| sleep 2 | |
| - name: Verify TCK Log | |
| if: failure() | |
| run: | | |
| echo "Checking for log file..." | |
| if [ -f tck/target/tck-test.log ]; then | |
| echo "✅ Log file exists ($(wc -l < tck/target/tck-test.log) lines)" | |
| ls -lh tck/target/tck-test.log | |
| else | |
| echo "❌ Log file not found at tck/target/tck-test.log" | |
| echo "Contents of tck/target/:" | |
| ls -la tck/target/ || echo "tck/target/ does not exist" | |
| fi | |
| - name: Upload TCK Log | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tck-test-log-java-${{ matrix.java-version }} | |
| path: tck/target/tck-test.log | |
| retention-days: 2 | |
| if-no-files-found: warn | |
| - name: Upload Thread Dump | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: thread-dump-java-${{ matrix.java-version }} | |
| path: tck/target/thread-dump.txt | |
| retention-days: 2 | |
| if-no-files-found: warn | |
| - name: Upload Heap Dump | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: heap-dump-java-${{ matrix.java-version }} | |
| path: tck/target/heap-dump.hprof.gz | |
| retention-days: 2 | |
| if-no-files-found: warn |