From bd02a50cbbe8400dca92a1c3f4fbda53263cc23a Mon Sep 17 00:00:00 2001 From: yhirose Date: Fri, 7 Aug 2026 16:07:40 -0400 Subject: [PATCH] ci: auto-comment on issue #2533 when windows-without-SSL job fails Temporary instrumentation to track the intermittent windows-without-SSL failures reported in #2533. When the job fails on a push, it posts the run URL, commit, and per-shard failed-test lines as a comment on the issue, building up failure-pattern history automatically. This should be removed once the root cause is found and fixed. --- .github/workflows/test.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 834465e..2b7f3bb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -467,6 +467,9 @@ jobs: windows: runs-on: windows-latest + permissions: + contents: read + issues: write if: > (github.event_name == 'push') || (github.event_name == 'pull_request' && @@ -563,6 +566,30 @@ jobs: } if ($failed) { exit 1 } Write-Host "All shards passed." + - name: Report flaky failure on issue #2533 + if: failure() && matrix.config.name == 'without SSL' && github.event_name == 'push' + continue-on-error: true + shell: pwsh + working-directory: build/test + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + $summary = "" + for ($i = 0; $i -lt 4; $i++) { + $log = "shard_${i}.log" + if (Test-Path $log) { + $failedLines = Select-String -Path $log -Pattern "\[ FAILED \]" + if ($failedLines) { + $summary += "**Shard ${i}:**`n" + (($failedLines | ForEach-Object { $_.Line }) -join "`n") + "`n`n" + } + } + } + if (-not $summary) { + $summary = "_Could not extract failed test name from shard logs; see the run for details._`n`n" + } + $runUrl = "$($env:GITHUB_SERVER_URL)/$($env:GITHUB_REPOSITORY)/actions/runs/$($env:GITHUB_RUN_ID)" + $body = "Reoccurred on push: $runUrl`n`nCommit: $($env:GITHUB_SHA)`n`n$summary" + gh issue comment 2533 --repo $env:GITHUB_REPOSITORY --body $body env: VCPKG_ROOT: "C:/vcpkg"