chia7712 commented on code in PR #18770: URL: https://github.com/apache/kafka/pull/18770#discussion_r1968426052
########## .github/workflows/build.yml: ########## @@ -210,45 +236,92 @@ jobs: - name: Archive JUnit XML uses: actions/upload-artifact@v4 with: - name: junit-xml-${{ matrix.java }} + name: junit-xml-${{ env.job-variation }} path: | build/junit-xml/**/*.xml compression-level: 9 if-no-files-found: ignore - name: Archive Thread Dumps - id: thread-dump-upload-artifact - if: always() && (steps.junit-test.outputs.gradle-exitcode == '124' || steps.junit-quarantined-test.outputs.gradle-exitcode == '124') + id: archive-thread-dump + if: steps.junit-test.outputs.gradle-exitcode == '124' uses: actions/upload-artifact@v4 with: - name: junit-thread-dumps-${{ matrix.java }} + name: junit-thread-dumps-${{ env.job-variation }} path: | thread-dumps/* compression-level: 9 if-no-files-found: ignore - name: Parse JUnit tests - run: python .github/scripts/junit.py --export-test-catalog ./test-catalog >> $GITHUB_STEP_SUMMARY env: GITHUB_WORKSPACE: ${{ github.workspace }} - JUNIT_REPORT_URL: ${{ steps.junit-upload-artifact.outputs.artifact-url }} - THREAD_DUMP_URL: ${{ steps.thread-dump-upload-artifact.outputs.artifact-url }} + JUNIT_REPORT_URL: ${{ steps.archive-junit-html.outputs.artifact-url }} + THREAD_DUMP_URL: ${{ steps.archive-thread-dump.outputs.artifact-url }} GRADLE_TEST_EXIT_CODE: ${{ steps.junit-test.outputs.gradle-exitcode }} - GRADLE_QUARANTINED_TEST_EXIT_CODE: ${{ steps.junit-quarantined-test.outputs.gradle-exitcode }} + run: | + python .github/scripts/junit.py \ + --path build/junit-xml >> $GITHUB_STEP_SUMMARY + # This job downloads all the JUnit XML files and thread dumps from the JDK 23 test runs. + # If any test job fails, we will not run this job. Also, if any thread dump artifacts + # are present, this means there was a timeout in the tests and so we will not proceed + # with catalog creation. + collate-test-catalog: + name: Collate Test Catalog + needs: test + runs-on: ubuntu-latest + outputs: + uploaded-test-catalog: ${{ steps.archive-test-catalog.outcome == 'success' }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Download Thread Dumps + uses: actions/download-artifact@v4 + with: + pattern: junit-thread-dumps-23-* + path: thread-dumps + merge-multiple: true + - name: Check For Thread Dump + id: check-for-thread-dump + run: | + find . + if [ -d thread-dumps ]; then + echo "Found 'thread-dumps' directory. Will not proceed with test catalog collation."; + exit 1; + fi + - name: Download JUnit XMLs + uses: actions/download-artifact@v4 + with: + pattern: junit-xml-23-* # Only look at JDK 23 tests for the test catalog + path: junit-xml + merge-multiple: true + - name: Collate Test Catalog + continue-on-error: true + env: + GITHUB_WORKSPACE: ${{ github.workspace }} + GRADLE_TEST_EXIT_CODE: 0 + run: | + python .github/scripts/junit.py \ Review Comment: in this flow, `junit.py` prints the following message. Should it get fixed? ``` No reports available. Environment variable JUNIT_REPORT_URL was not found. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org