Skip to content

Configure GitHub workflows to use concurrency cancel-in-progress for pull requests#16323

Open
apupier wants to merge 2 commits into
apache:3.3from
apupier:addConcurrencyCancelInProgressForPRGitHubWorkflows
Open

Configure GitHub workflows to use concurrency cancel-in-progress for pull requests#16323
apupier wants to merge 2 commits into
apache:3.3from
apupier:addConcurrencyCancelInProgressForPRGitHubWorkflows

Conversation

@apupier

@apupier apupier commented Jun 8, 2026

Copy link
Copy Markdown

see recommended best practices at Apache
https://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=INFRA&title=GitHub+Actions+Recommended+Practices

Cancel superseded PR runs

When a new commit is pushed to a PR branch, the runs triggered by earlier commits keep going, even though their results are no longer relevant. A concurrency group scoped to the PR cancels those stale runs as soon as a newer commit arrives.

Scope the group by PR number so each PR only cancels its own runs, and limit cancel-in-progress to pull_request events so pushes to release branches are never interrupted.

concurrency:
  # One group per PR, or per ref for branch pushes.
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  # Cancel in-progress runs for PRs only, so release branch builds always complete.
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

What is the purpose of the change?

Checklist

  • Make sure there is a GitHub_issue field for the change.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

@codecov-commenter

codecov-commenter commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.80%. Comparing base (c3ceb27) to head (03d235c).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16323      +/-   ##
============================================
+ Coverage     60.79%   60.80%   +0.01%     
+ Complexity    11777    11770       -7     
============================================
  Files          1953     1953              
  Lines         89208    89208              
  Branches      13458    13458              
============================================
+ Hits          54234    54243       +9     
+ Misses        29403    29396       -7     
+ Partials       5571     5569       -2     
Flag Coverage Δ
integration-tests-java21 32.17% <ø> (+0.05%) ⬆️
integration-tests-java8 32.23% <ø> (-0.09%) ⬇️
samples-tests-java21 32.20% <ø> (+0.08%) ⬆️
samples-tests-java8 29.70% <ø> (-0.16%) ⬇️
unit-tests-java11 59.05% <ø> (+0.01%) ⬆️
unit-tests-java17 58.50% <ø> (-0.03%) ⬇️
unit-tests-java21 58.52% <ø> (+0.01%) ⬆️
unit-tests-java25 58.45% <ø> (-0.03%) ⬇️
unit-tests-java8 59.04% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zrlw zrlw changed the title Configure GitHub workflows to use concurrency cancel-in-progress for Configure GitHub workflows to use concurrency cancel-in-progress for pull requests Jun 9, 2026
Add concurrency settings for pull request workflows.

@zrlw zrlw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants