8000 gh-134309: Fix premature cancellation of CI tests when multiple PRs have the same branch name by abstractedfox · Pull Request #134310 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-134309: Fix premature cancellation of CI tests when multiple PRs have the same branch name #134310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 22, 2025
Merged
Prev Previous commit
Next Next commit
Fix CI jobs with the same concurrency group being canceled
Addresses issue encountered during PyCon US sprints where having multiple workflows with the same concurrency group causes one of the two to be canceled.

Co-authored-by: Sviatoslav Sydorenko <sviat@redhat.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
  • Loading branch information
3 people committed May 20, 2025
commit 961818aff96aa6d4f290f9c4be98b5065a5e1a89
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
4C9F
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
group: >-
Copy link
Member

Choose a reason for hiding this comment

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

Can you please add a comment to explain why we have to put these information into the group? I understand that it's a way to create a global unique identifier.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to clarify, the info from lines 19-26 or just what's on line 18?

Copy link
Contributor

Choose a reason for hiding this comment

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

The entire thing I imagine.

Copy link
Member

Choose a reason for hiding this comment

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

Document how the group string is created.

${{
github.workflow
}}-${{
github.ref_name
}}-${{
github.event.pull_request.number
|| github.sha
}}
Copy link
Member

Choose a reason for hiding this comment

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

Remove whitespace

Suggested change
group: >-
${{
github.workflow
}}-${{
github.ref_name
}}-${{
github.event.pull_request.number
|| github.sha
}}
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}-reusable

Copy link
Contributor

Choose a reason for hiding this comment

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

It was me who asked for wrapped lines FTR.

Also, we decided to drop the reusable suffix. We talked about it with Cam a lot yesterday.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think wrapped lines meaningfully help here, and because of the interpolation markers it just adds more visual clutter.

Fine with keeping or removing -reusable, it wasn't mentioned in the PR so I thought it was unintentional.

cancel-in-progress: true

env:
Expand Down
Loading
0