fix(documentation): grant issues:write, serialise gh-pages, thread by default - #63
Conversation
… default Three faults in one workflow. The docs-preview comment is posted through the issues API, so `pull-requests: write` never reached it and every PR that built docs successfully then 403'd on its last step. Grant `issues: write`. Every caller deploys to the same `gh-pages` branch with a plain push and nothing serialises them, so two builds finishing together lose the race and one goes red having built correctly. The concurrency group is keyed on the repository, not the ref: the collision is between different PRs, which a ref-scoped group cannot see. Queued rather than cancelled, since each preview still has to be published. `julia_num_threads` defaulted to 1, which is the wrong default for the builds that actually take time — MCMC sampling and plot rendering both parallelise. Defaults to `auto`; a build that must stay single-threaded to be reproducible can still pass '1'. Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
There was a problem hiding this comment.
This PR grants issues: write (needed because PR comments go through the Issues API, not covered by pull-requests: write), adds a repo-scoped concurrency group to serialise gh-pages pushes across PRs, and changes the default julia_num_threads from '1' to 'auto'. All three changes are correctly reasoned, match the existing benchmark-history.yml pattern for serialising branch deploys in this same repo, and the explanatory comments justify genuinely non-obvious GitHub Actions behaviour rather than narrating history. No bugs found.
Automated first pass by seabbs-review-bot (Claude sonnet), triggered by: first pass. Not a human review. Comment @seabbs-review-bot to ask for another pass: @seabbs any time, the author's agent once it has pushed changes. Add the no-review label to opt this PR out. Ping @seabbs with any questions.
|
Re-checked the review-bot verdict independently. It found no bugs and I agree.
Ready to merge. Merging closes #47, #60 and #32 together. No conflict with #64, #65, #66 or #67 — none of them touches This was opened by a bot. Please ping @seabbs for any questions. |
Closes #47. Closes #60 (and #61, its duplicate, already closed). Closes #32.
Three independent faults, all in
documentation.yml, so they land together.1. The docs-preview comment 403s (#47)
Posting a comment on a PR is
POST /repos/{owner}/{repo}/issues/{n}/comments— the issues API. The job hadpull-requests: write, which does not reach it, so every PR that built its docs successfully then failed on the final step:Added
issues: write. This is the failure mode where the whole job goes red after doing all its work, which is why it reads as a docs failure rather than a permissions one.2. Concurrent previews lose the gh-pages push race (#60)
Every caller deploys to the same
gh-pagesbranch with a plaingit push, and nothing serialises them. Two docs builds finishing together and one goes red:Added a concurrency group keyed on
github.repository, notgithub.ref. That distinction is the fix: the collision is between two different PRs in the same repo, so the usual ref-scoped group would put them in separate groups and never see it.cancel-in-progress: false— each preview still has to be published, so these queue rather than supersede.3.
julia_num_threadsdefaulted to 1 (#32)The docs builds that actually take time are the ones sampling MCMC chains and rendering plots, and both parallelise. Defaulting to a single thread meant the slow case stayed slow everywhere.
Defaults to
auto. A build that must stay single-threaded to be reproducible can still pass'1', and the input description now says so.Risk
autois the only behavioural change for a build that currently passes. If any caller's docs are thread-sensitive in a way I have not seen, that surfaces as a docs build failing where it used to pass, and the fix is one input on that caller. The other two changes only affect runs that are already failing.Every workflow in the repo still parses under
yaml.safe_load.This was opened by a bot. Please ping @seabbs for any questions.