From e74a4eccc2e40f04ffe1e25102159ef54f1aafa3 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Tue, 1 Dec 2026 18:52:02 -0800 Subject: [PATCH] ci: keep the process-level logs and shard results when a run fails The harness already copies each failed test's full daemon logs to SWBLOCK_TEST_LOG_DIR (keepFullLog), but the workflow never set it and uploaded nothing, so a failure's evidence was lost with the runner's temp directory. Set the directory and upload it, with every shard's JSON, log and status, as an artifact on failure (14 days). Co-Authored-By: Claude Opus 5.5 --- seaweed-block/.github/workflows/test.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/seaweed-block/.github/workflows/test.yml b/seaweed-block/.github/workflows/test.yml index b6ffd7f332..6da3c87084 100644 --- a/seaweed-block/.github/workflows/test.yml +++ b/seaweed-block/.github/workflows/test.yml @@ -255,6 +255,9 @@ jobs: KZ_SIZE: 1G F1_RUN: "1" TEST_TIMEOUT: 15m + # A failed test copies each daemon's whole log here (keepFullLog); + # the step below keeps them as the run's artifact. + SWBLOCK_TEST_LOG_DIR: ${{ runner.temp }}/process-level-logs run: | set -euo pipefail # SHARDS parallel shards, balanced by their last measured times @@ -290,3 +293,18 @@ jobs: cat "$RUNNER_TEMP"/process-level-*.status >"$RUNNER_TEMP/process-level.status" python3 -I .github/scripts/required-tests-check.py --status "$RUNNER_TEMP/process-level.status" \ "$names" "$RUNNER_TEMP"/process-level-*.json + + - name: Keep the process-level logs and shard results + # A failure's evidence outlives the runner's temp directory: each + # failed test's full daemon logs and every shard's raw JSON and log. + if: failure() && matrix.suite == 'process' + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: process-level-${{ github.run_id }}-${{ github.run_attempt }} + path: | + ${{ runner.temp }}/process-level-logs + ${{ runner.temp }}/process-level-*.json + ${{ runner.temp }}/process-level-*.log + ${{ runner.temp }}/process-level-*.status + retention-days: 14 + if-no-files-found: warn