From 530f896efa9bc593b3573b54e74035be476a628d Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 10 Jun 2025 21:22:37 +0200 Subject: [PATCH] workflows/reviewers: fix downloading eval results when undrafting To actually download the eval results and then proceed to ping maintainers after undrafting, the run-id must be specified explicitly. Because we didn't run with `-o pipefail` up to the last commit, we didn't notice that this workflow was silently failing with this error: jq: error: Could not open file comparison/maintainers.json: No such file or directory --- .github/workflows/reviewers.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/reviewers.yml b/.github/workflows/reviewers.yml index 655471ffec60..71d0bcb27382 100644 --- a/.github/workflows/reviewers.yml +++ b/.github/workflows/reviewers.yml @@ -62,6 +62,7 @@ jobs: # In the more special case, when a PR is undrafted an eval run will have started already. - name: Wait for comparison to be done uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + id: eval with: script: | const run_id = (await github.rest.actions.listWorkflowRuns({ @@ -72,6 +73,8 @@ jobs: head_sha: context.payload.pull_request.head.sha })).data.workflow_runs[0].id + core.setOutput('run-id', run_id) + // Waiting 120 * 5 sec = 10 min. max. // The extreme case is an Eval run that just started when the PR is undrafted. // Eval takes max 5-6 minutes, normally. @@ -90,6 +93,8 @@ jobs: - name: Download the comparison results uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: + run-id: ${{ steps.eval.outputs.run-id }} + github-token: ${{ github.token }} pattern: comparison path: comparison merge-multiple: true