Scheduling infrastructure for absolutely everyone.
fix: search by branch instead of SHA in E2E report workflow_dispatch (#26168)
Keith Williams1c5f05638f74
diff --git a/.github/workflows/e2e-report.yml b/.github/workflows/e2e-report.ymlindex b2f351934fb..c992f0c7d1f 100644--- a/.github/workflows/e2e-report.yml+++ b/.github/workflows/e2e-report.yml@@ -67,23 +67,27 @@ jobs:}console.log('Found PR Update workflow ID:', prUpdateWorkflow.id);- // Find the most recent run for this SHA with blob-report artifacts+ // Find the most recent completed run for this branch with blob-report artifacts+ // We search by branch instead of SHA to handle cases where:+ // 1. The PR was updated after E2E tests ran (artifacts exist for older SHA)+ // 2. The current run for the SHA is still queued/in-progressconst { data: runs } = await github.rest.actions.listWorkflowRuns({owner: context.repo.owner,repo: context.repo.repo,workflow_id: prUpdateWorkflow.id,- head_sha: headSha,- per_page: 10+ branch: headBranch,+ status: 'completed',+ per_page: 20});- console.log('Found', runs.workflow_runs.length, 'runs for SHA');+ console.log('Found', runs.workflow_runs.length, 'completed runs for branch', headBranch);// Find a run with blob-report artifactslet selectedRun = null;let hasBlobReports = false;for (const run of runs.workflow_runs) {- console.log('Checking run', run.id, 'status:', run.status, 'conclusion:', run.conclusion);+ console.log('Checking run', run.id, 'conclusion:', run.conclusion);const { data: artifacts } = await github.rest.actions.listWorkflowRunArtifacts({owner: context.repo.owner,