Skip to content

Key the doc build concurrency group on the pull request number - #48707

Open
albertvillanova wants to merge 1 commit into
huggingface:mainfrom
albertvillanova:key-doc-build-concurrency-on-pr-number
Open

Key the doc build concurrency group on the pull request number#48707
albertvillanova wants to merge 1 commit into
huggingface:mainfrom
albertvillanova:key-doc-build-concurrency-on-pr-number

Conversation

@albertvillanova

@albertvillanova albertvillanova commented Sep 11, 2026

Copy link
Copy Markdown
Member

CPU CI GPU run-slow

What does this PR do?

build_pr_documentation.yml keys its concurrency group on github.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: 154 of the 1590 currently open PRs here share a head branch name with another open PR, 84 of them on main and 41 on patch-1. A doc build takes around 8 minutes, which is the window in which such a collision cancels a build. I did not find a realized cancellation in the 1200 most recent runs, so this is hardening rather than a fix for something currently failing.

github.event.pull_request.number is unique per pull request. It is empty for the merge_group trigger, so those runs keep falling back to the unique github.run_id and are never cancelled, exactly as they are today with head_ref.

The template this workflow was copied from carries the same expression, and the same one-liner is proposed there in huggingface/doc-builder#829.

@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 34579150201
Result: success | Grafana metrics are not available yet.

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@vasqu vasqu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM but best to have the approval of one of @ydshieh or @tarekziade

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.

3 participants