Skip to content

ci: key workflow concurrency groups by pull request number - #1411

Merged
kou merged 1 commit into
apache:mainfrom
zeroshade:ci-concurrency-pr-number
Oct 23, 2026
Merged

kou merged 1 commit into
apache:mainfrom
zeroshade:ci-concurrency-pr-number

Conversation

@zeroshade

Copy link
Copy Markdown
Member

Rationale for this change

The Lint, RC and Test workflows use

concurrency:
  group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
  cancel-in-progress: true

github.head_ref is only the source branch name, without the fork owner. Two pull requests from different forks that happen to use the same branch name share a concurrency group, so each new run cancels the other PR's in-progress run.

This happened with #1406 and #1407, both from branches named fix/parquet-hidden-column-error: #1407's Test run cancelled a re-run of #1406's Test job partway through (run 39903724796, attempt 3: Test=cancelled, "The operation was canceled").

What changes are included in this PR?

Key the group by github.event.pull_request.number instead of github.head_ref in lint.yml, rc.yml and test.yml:

  group: ${{ github.repository }}-${{ github.event.pull_request.number || github.sha }}-${{ github.workflow }}
  • pull_request events: one group per PR, so a new push to a PR still cancels that PR's older run, but different PRs no longer interfere.
  • push events: pull_request.number is empty, so the group falls back to github.sha, unchanged from today.

Are these changes tested?

actionlint accepts all three workflows (its only reports are pre-existing shellcheck quoting notes in run: scripts). This PR's own CI runs exercise the new groups.

Are there any user-facing changes?

No.

The Lint, RC and Test workflows grouped runs by github.head_ref, which is
only the branch name. Pull requests from different forks that use the same
branch name therefore shared a group, and cancel-in-progress let each one
cancel the other's runs (seen with apache#1406 and apache#1407, both from branches named
fix/parquet-hidden-column-error). Use the pull request number instead; push
events still fall back to github.sha as before.

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@kou
kou merged commit 2440af8 into apache:main Oct 23, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants