Skip to content

DO NOT MERGE: probe for #1417's changelog label read - #1418

Closed
wshlavacek wants to merge 2 commits into
mainfrom
ci/changelog-label-race-probe
Closed

wshlavacek wants to merge 2 commits into
mainfrom
ci/changelog-label-race-probe

Conversation

@wshlavacek

Copy link
Copy Markdown
Collaborator

Probe for #1417; closed without merging once the runs are read.

It changes one library file and stages no fragment, so fragment staged passes only if the run sees the changelog exempt label. It was opened with the label (the opened + labeled pair), then the label is removed and re-applied.

`gh pr create --label "changelog exempt"` fires `opened` and `labeled`
together. Both runs shared `concurrency: changelog-${{ github.ref }}` with
`cancel-in-progress`, so one was cancelled, and a cancelled run is not
neutral: it stays in the commit's status rollup beside the run that
finished, as a second `fragment staged`, and the rollup reads FAILURE.
The first commits of #1407 and #1408 read FAILURE with every check that
ran passing, and the heads of #1262, #1258, #1251, #1223, #1184, #909 and
#839 carry the same cancelled-plus-success pair.

Removing only `cancel-in-progress` would not close it: a concurrency group
still cancels a pending run when another queues behind it, and `opened`
plus two labels is three runs. The concurrency block goes entirely. The
job is read-only and takes seconds, so overlapping runs cost nothing.

They do have to agree, though, and the label escape read
`github.event.pull_request.labels`, a snapshot of the moment each event
fired. With cancellation gone, an `opened` run whose payload predates the
label could fail for real on an exempt pull request, beside a `labeled`
run that passed. The step now reads the labels from the pulls API when it
runs, so every run sees the same list. The read is a plain assignment, so
a failed call ends the step under the runner's `bash -e` rather than
reading as "no label", and a `grep -q` never sits under `pipefail`.

A textual test pins both halves, in the style of the module's other
workflow checks. It fails against main's workflow.
@wshlavacek wshlavacek added changelog exempt Exempt from the changelog-fragment gate: no user-visible change, or the release commit and removed changelog exempt Exempt from the changelog-fragment gate: no user-visible change, or the release commit labels Oct 30, 2026
@wshlavacek

Copy link
Copy Markdown
Collaborator Author

Probe done; results are in #1417.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog exempt Exempt from the changelog-fragment gate: no user-visible change, or the release commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant