Skip to content

Commit 4aed299

Browse files
authored
MINOR: Use per-PR concurrency group in Dev PR workflow (#1320)
## What's Changed The `Dev PR` workflow runs on `pull_request_target`, where `github.ref` is the base branch (`refs/heads/main`), not the PR ref. Its concurrency group therefore resolved to `apache/arrow-java-refs/heads/main-Dev PR` for every PR, and with `cancel-in-progress: true` a new run on one PR cancelled the run in progress on another. This leaves a cancelled "Ensure PR format" check on the losing PR, which shows up as a failure. For example on #1295 the job was cancelled with: ``` Canceling since a higher priority waiting request for apache/arrow-java-refs/heads/main-Dev PR exists ``` This change keys the concurrency group on the PR number, so runs are only cancelled by newer runs of the same PR. Note that `pull_request_target` uses the workflow from the base branch, so this only takes effect once merged.
1 parent 70b149d commit 4aed299

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎.github/workflows/dev_pr.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ on:
3030
- review_requested
3131

3232
concurrency:
33-
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
33+
# github.ref is the base branch for pull_request_target, so use the PR number
34+
group: ${{ github.repository }}-${{ github.event.pull_request.number }}-${{ github.workflow }}
3435
cancel-in-progress: true
3536

3637
permissions:

0 commit comments

Comments
 (0)