Skip to content

Queue docs deployments instead of racing them - #355

Merged
stefanvanburen merged 2 commits into
mainfrom
svanburen/docs-deploy-concurrency
Sep 25, 2026
Merged

stefanvanburen merged 2 commits into
mainfrom
svanburen/docs-deploy-concurrency

Conversation

@stefanvanburen

@stefanvanburen stefanvanburen commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

This is just to fix the failure we saw in https://github.com/connectrpc/connect-py/actions/runs/36135119586/job/108071236285, from multiple PRs being merged close together.

The PR group is keyed by ref rather than shared because GitHub keeps a single pending run per concurrency group; a shared pages group, as in GitHub's Pages starter workflows, would let a PR build cancel a deployment waiting behind another one. The effect on main shows up only when two merges land close together, so this PR's own docs build exercises only the PR branch of the expression.

Two merges two seconds apart started overlapping Documentation runs,
and Pages rejected the second deployment because the first was still in
progress:
https://github.com/connectrpc/connect-py/actions/runs/36135119586/job/108071236285

Put pushes to `main` in one concurrency group that never cancels an
in-progress run, so deployments queue. GitHub keeps only the newest
pending run per group, which is fine here because it builds the newest
commit. PR builds get a group per ref and cancel superseded runs, so
they can't displace a queued deployment.

Signed-off-by: Stefan VanBuren <stefan@vanburen.xyz>

@anuraaga anuraaga 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.

Thanks!

Comment thread .github/workflows/docs.yaml Outdated
id-token: write

concurrency:
# Pages rejects a deployment while another is in progress, so deploys

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.

Lately I find Claude generates pretty ridiculous prose that sometimes I can't even read anymore, would appreciate double-checking it in advance

I think this is

# Use a constant key for commits so deployments are queued in order.
# Only cancel for pull requests

Second line being a copy from ci.yaml

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

took your suggestion on the first line, and copied over the line directly from ci.yaml for the second line, in 1b43b16. thanks!

Lately I find Claude generates pretty ridiculous prose that sometimes I can't even read anymore, would appreciate double-checking it in advance

Agreed, and will do. Writing Good Comments is still not a solved problem for AI :)

Signed-off-by: Stefan VanBuren <stefan@vanburen.xyz>
@stefanvanburen
stefanvanburen merged commit 2179d4a into main Sep 25, 2026
23 checks passed
@stefanvanburen
stefanvanburen deleted the svanburen/docs-deploy-concurrency branch September 25, 2026 13:48
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.

2 participants