Key the doc build concurrency group on the pull request number - #7174
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
|
qgallouedec
left a comment
There was a problem hiding this comment.
Indeed, I learned something here.
On the fallback, tests.yml and tests-experimental.yml use || github.ref rather than || github.run_id, so it isn't quite identical either way. They also run on push where theirs is reachable, while this one is pull_request-only so yours stays dead. Keep it for symmetry if you prefer, no strong view.
Worth pushing the one-liner upstream to the doc-builder template too?, since that's where the pattern came from.
|
Thanks, @qgallouedec. You are right about Your reachability point holds either way. In On the template, as I already commented in #7174 (comment), that is what I did on Friday:
|
What does this PR do?
build_pr_documentation.ymlkeys its concurrency group ongithub.head_ref, which is the head branch name without the fork owner. Two open PRs from different forks that both use a branch calledpatch-1therefore land in the same group, and a push on one cancels the in-flight doc build on the other.github.event.pull_request.numberis unique per pull request. This workflow only triggers onpull_request, so thegithub.run_idfallback is never reached, but it is kept so the block stays identical to the one intests.ymlandtests-experimental.yml. Happy to drop it if you would rather the expression say only what this workflow needs.Bugbot found the same pattern on #7170 (comment), where it had been copied from here. No two of the 182 currently open PRs share a head branch name, but 130 of them come from forks, so the collision is reachable.
Note
Low Risk
Single CI workflow concurrency expression change with no runtime or application impact.
Overview
Fixes cross-PR doc build cancellations when multiple forks use the same branch name (e.g.
patch-1).The Build PR Documentation workflow’s
concurrency.groupnow usesgithub.event.pull_request.numberinstead ofgithub.head_ref, so each PR gets its own group and pushes on one PR no longer cancel in-flight doc builds on another. Thegithub.run_idfallback is unchanged for parity with other workflows.Reviewed by Cursor Bugbot for commit 5adea5a. Bugbot is set up for automated code reviews on this repo. Configure here.