Key the doc build concurrency group on the pull request number - #2401
Open
albertvillanova wants to merge 1 commit into
Open
Key the doc build concurrency group on the pull request number#2401albertvillanova wants to merge 1 commit into
albertvillanova wants to merge 1 commit into
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 whose branches share a name therefore land in the same group, and a push on one cancels the in-flight doc build on the other.Shared names are common, because many contributors push to their fork's default branch instead of creating one: 8 of the 140 currently open PRs here already share a head branch name, all of them on
main. A doc build takes around 3 minutes, which is the window in which such a collision cancels a build. I did not find a realized cancellation in the 100 most recent runs, so this is hardening rather than a fix for something currently failing.github.event.pull_request.numberis unique per pull request. This workflow only triggers onpull_request, so thegithub.run_idfallback is never reached, but keeping it means that a later trigger would fall back to never cancelling rather than to grouping by branch name.The template this workflow was copied from carries the same expression, and the same one-liner is proposed there in huggingface/doc-builder#829.