From 8bc90eb20f75a6d53cb3642ed4cf302c20ce590d Mon Sep 17 00:00:00 2001 From: femi Date: Tue, 18 Aug 2026 21:23:26 +0100 Subject: [PATCH 1/3] feat(ci): report nightly test history to tcache Add a report-history flag and a new "Report nightly history" step to the reusable regression workflow, PUTting each failed nightly run's JUnit XML to tcache's separate /history endpoint. Gated on report-history rather than the existing testrun_name input so manual regression/regression-dbsync dispatches never write here. Wire testrun_name and report-history: true into the three real nightly workflows (nightly, nightly-cli, nightly-dbsync). --- .github/workflows/nightly.yaml | 4 ++++ .github/workflows/nightly_cli.yaml | 4 ++++ .github/workflows/nightly_dbsync.yaml | 4 ++++ .github/workflows/regression_reusable.yaml | 23 ++++++++++++++++++++++ 4 files changed, 35 insertions(+) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index ecaa419f1..4759d1933 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -15,7 +15,11 @@ jobs: uses: ./.github/workflows/regression_reusable.yaml with: env-path: runner/env_nightly + testrun_name: nightly + report-history: true secrets: + TCACHE_BASIC_AUTH: ${{ secrets.TCACHE_BASIC_AUTH }} + TCACHE_URL: ${{ secrets.TCACHE_URL }} CI_FAIL_MAILS: ${{ secrets.NIGHTLY_FAIL_MAILS }} GMAIL_USERNAME: ${{ secrets.GMAIL_USERNAME }} GMAIL_PASSWORD: ${{ secrets.GMAIL_PASSWORD }} diff --git a/.github/workflows/nightly_cli.yaml b/.github/workflows/nightly_cli.yaml index 6cd42e75c..ed89afeca 100644 --- a/.github/workflows/nightly_cli.yaml +++ b/.github/workflows/nightly_cli.yaml @@ -15,7 +15,11 @@ jobs: uses: ./.github/workflows/regression_reusable.yaml with: env-path: runner/env_nightly_cli + testrun_name: nightly-cli + report-history: true secrets: + TCACHE_BASIC_AUTH: ${{ secrets.TCACHE_BASIC_AUTH }} + TCACHE_URL: ${{ secrets.TCACHE_URL }} CI_FAIL_MAILS: ${{ secrets.NIGHTLY_FAIL_MAILS }} GMAIL_USERNAME: ${{ secrets.GMAIL_USERNAME }} GMAIL_PASSWORD: ${{ secrets.GMAIL_PASSWORD }} diff --git a/.github/workflows/nightly_dbsync.yaml b/.github/workflows/nightly_dbsync.yaml index c3ceb0484..2e2f59da1 100644 --- a/.github/workflows/nightly_dbsync.yaml +++ b/.github/workflows/nightly_dbsync.yaml @@ -15,7 +15,11 @@ jobs: uses: ./.github/workflows/regression_reusable.yaml with: env-path: runner/env_nightly_dbsync + testrun_name: nightly-dbsync + report-history: true secrets: + TCACHE_BASIC_AUTH: ${{ secrets.TCACHE_BASIC_AUTH }} + TCACHE_URL: ${{ secrets.TCACHE_URL }} CI_FAIL_MAILS: ${{ secrets.NIGHTLY_FAIL_MAILS }} GMAIL_USERNAME: ${{ secrets.GMAIL_USERNAME }} GMAIL_PASSWORD: ${{ secrets.GMAIL_PASSWORD }} diff --git a/.github/workflows/regression_reusable.yaml b/.github/workflows/regression_reusable.yaml index 2f8e39c99..e0be0cb89 100644 --- a/.github/workflows/regression_reusable.yaml +++ b/.github/workflows/regression_reusable.yaml @@ -51,6 +51,10 @@ on: required: false type: boolean default: false + report-history: + required: false + type: boolean + default: false secrets: TCACHE_BASIC_AUTH: required: false @@ -231,6 +235,25 @@ jobs: testrun_name_strip="${CI_TESTRUN_NAME//[!a-zA-Z0-9_-]/}" curl -s -X PUT --fail-with-body -u "$TCACHE_BASIC_AUTH" "$TCACHE_URL/${testrun_name_strip}/${{ github.run_number }}/import" -F "junitxml=@run_workdir/testrun-report.xml" fi + - name: Report nightly history + # Separate from "Report test results" above - that PUTs to /import + # (the pre-existing skip-passed/retry-cache feature). This PUTs to + # /history, a distinct route added specifically for nightly + # persistent-failure tracking. Gated on `report-history`, not just + # `testrun_name`, so manual regression/regression-dbsync dispatches + # never write here - only the three nightly workflows set this flag. + # failure()-only per Martin's own PR #14 review comment: "We want to + # store the junit.xml only when we choose to do that, typically for + # failed nightly." + if: failure() && inputs.testrun_name && inputs.report-history + env: + TCACHE_BASIC_AUTH: ${{ secrets.TCACHE_BASIC_AUTH }} + TCACHE_URL: ${{ secrets.TCACHE_URL }} + run: | + if [ -n "$TCACHE_BASIC_AUTH" ] && [ -n "$TCACHE_URL" ] && [ -e run_workdir/testrun-report.xml ]; then + testrun_name_strip="${CI_TESTRUN_NAME//[!a-zA-Z0-9_-]/}" + curl -s -X PUT --fail-with-body -u "$TCACHE_BASIC_AUTH" "$TCACHE_URL/history/${testrun_name_strip}/${{ github.run_number }}" -F "junitxml=@run_workdir/testrun-report.xml" + fi - name: ↟ Upload testing artifacts on failure uses: actions/upload-artifact@v7 if: failure() From 76fba0bf26af3738dc58420fd5d950bf1c7c2bd0 Mon Sep 17 00:00:00 2001 From: femi Date: Tue, 18 Aug 2026 21:38:04 +0100 Subject: [PATCH 2/3] test: temporarily loosen gates for a live tcache smoke test Expose report-history on regression.yaml's manual dispatch and widen the history-upload gate to success-or-failure, so a quick smoke-test dispatch actually exercises the new curl call against real tcache without waiting on a real failure or running the full nightly suite. TEMPORARY - to be reverted before this PR is finalized. --- .github/workflows/regression.yaml | 5 +++++ .github/workflows/regression_reusable.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression.yaml b/.github/workflows/regression.yaml index dc8ee3a54..c00b8d349 100644 --- a/.github/workflows/regression.yaml +++ b/.github/workflows/regression.yaml @@ -60,6 +60,10 @@ on: type: boolean default: false description: "Skip tests that already passed (internal)" + report-history: + type: boolean + default: false + description: "TEMP-SMOKE-TEST: revert before merge" run-name: ${{ inputs.testrun_name && 'Run:' || ''}} ${{ inputs.testrun_name }} ${{ (inputs.testrun_name && inputs.skip_passed) && ':repeat:' || '' }} @@ -81,6 +85,7 @@ jobs: byron_cluster: ${{ inputs.byron_cluster }} testrun_name: ${{ inputs.testrun_name }} skip_passed: ${{ inputs.skip_passed }} + report-history: ${{ inputs.report-history }} env-path: runner/env_regression secrets: TCACHE_BASIC_AUTH: ${{ secrets.TCACHE_BASIC_AUTH }} diff --git a/.github/workflows/regression_reusable.yaml b/.github/workflows/regression_reusable.yaml index e0be0cb89..321fa821a 100644 --- a/.github/workflows/regression_reusable.yaml +++ b/.github/workflows/regression_reusable.yaml @@ -245,7 +245,7 @@ jobs: # failure()-only per Martin's own PR #14 review comment: "We want to # store the junit.xml only when we choose to do that, typically for # failed nightly." - if: failure() && inputs.testrun_name && inputs.report-history + if: (success() || failure()) && inputs.testrun_name && inputs.report-history # TEMP-SMOKE-TEST: revert to failure() before merge env: TCACHE_BASIC_AUTH: ${{ secrets.TCACHE_BASIC_AUTH }} TCACHE_URL: ${{ secrets.TCACHE_URL }} From a0971a4c41a418b6cfb795f5dfe293fa401ef3f9 Mon Sep 17 00:00:00 2001 From: femi Date: Thu, 20 Aug 2026 11:50:49 +0100 Subject: [PATCH 3/3] test: shorten temp comment, add tcache history verify step --- .github/workflows/regression_reusable.yaml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/regression_reusable.yaml b/.github/workflows/regression_reusable.yaml index 321fa821a..89c75ba28 100644 --- a/.github/workflows/regression_reusable.yaml +++ b/.github/workflows/regression_reusable.yaml @@ -236,15 +236,8 @@ jobs: curl -s -X PUT --fail-with-body -u "$TCACHE_BASIC_AUTH" "$TCACHE_URL/${testrun_name_strip}/${{ github.run_number }}/import" -F "junitxml=@run_workdir/testrun-report.xml" fi - name: Report nightly history - # Separate from "Report test results" above - that PUTs to /import - # (the pre-existing skip-passed/retry-cache feature). This PUTs to - # /history, a distinct route added specifically for nightly - # persistent-failure tracking. Gated on `report-history`, not just - # `testrun_name`, so manual regression/regression-dbsync dispatches - # never write here - only the three nightly workflows set this flag. - # failure()-only per Martin's own PR #14 review comment: "We want to - # store the junit.xml only when we choose to do that, typically for - # failed nightly." + # PUTs to /history, separate from /import above. Gated on + # report-history so only nightly runs persist JUnit XML. if: (success() || failure()) && inputs.testrun_name && inputs.report-history # TEMP-SMOKE-TEST: revert to failure() before merge env: TCACHE_BASIC_AUTH: ${{ secrets.TCACHE_BASIC_AUTH }} @@ -254,6 +247,16 @@ jobs: testrun_name_strip="${CI_TESTRUN_NAME//[!a-zA-Z0-9_-]/}" curl -s -X PUT --fail-with-body -u "$TCACHE_BASIC_AUTH" "$TCACHE_URL/history/${testrun_name_strip}/${{ github.run_number }}" -F "junitxml=@run_workdir/testrun-report.xml" fi + - name: TEMP-SMOKE-TEST verify tcache history + # Remove before merge. Prints the /history listing so we can confirm + # the PUT above actually landed, from the job log alone. + if: (success() || failure()) && inputs.testrun_name && inputs.report-history + env: + TCACHE_BASIC_AUTH: ${{ secrets.TCACHE_BASIC_AUTH }} + TCACHE_URL: ${{ secrets.TCACHE_URL }} + run: | + testrun_name_strip="${CI_TESTRUN_NAME//[!a-zA-Z0-9_-]/}" + curl -s -u "$TCACHE_BASIC_AUTH" "$TCACHE_URL/history/${testrun_name_strip}?days=1" - name: ↟ Upload testing artifacts on failure uses: actions/upload-artifact@v7 if: failure()