ci: give each pull request its own release drafter run - #16213
Open
codeconsole wants to merge 3 commits into
Open
ci: give each pull request its own release drafter run#16213codeconsole wants to merge 3 commits into
codeconsole wants to merge 3 commits into
Conversation
Every pull request against a release branch computed the same concurrency group - the group is keyed on the branch it targets - so two of them pushed within seconds of each other shared one slot and cancel-in-progress had the later kill the earlier. The evicted pull request shows a cancelled check with nothing wrong with it, and never gets the labels the run exists to apply. Raising several at once, which is what rebasing a stack or merging a branch into each of them does, made it routine: 16183 was cancelled 12 seconds in by an unrelated PR. Queueing rather than cancelling would not have fixed it. GitHub holds one pending run per group and cancels the one that was pending before it, so a sweep of ten pull requests would still have shown eight cancellations, of queued runs. The group is now the pull request, so they no longer meet. Pushing twice to one pull request still supersedes its own earlier run, and pushes to a release branch still share a group by branch. They shared a slot for a reason - two runs creating the same draft at once is how duplicate drafts appear - so a pull request run no longer writes one. Release notes are built from merged pull requests: an open one contributes nothing, and the releaser was rewriting the draft it had already written. Confirmed against the live v8.0.0 draft, which lists merged pull requests only. Labels still apply on every pull request event; the draft is written by the pushes that can change it.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.0.x #16213 +/- ##
==================================================
- Coverage 54.1238% 54.1237% -0.0001%
+ Complexity 20307 20306 -1
==================================================
Files 2107 2107
Lines 101144 101146 +2
Branches 17921 17922 +1
==================================================
+ Hits 54743 54744 +1
- Misses 38595 38596 +1
Partials 7806 7806 🚀 New features to boost your workflow:
|
Corrects the commit before this one, which passed `disable-releaser` to an action that has no such input. The workflow's own run said so - "Unexpected input(s) 'disable-releaser'" - and then tried to create a release and failed. The releaser therefore still ran on pull requests, so the concurrency isolation added there did not prevent the concurrent writes it claimed to. The pull request trigger was there so the autolabeler could label pull requests, and the action pinned here cannot do that. release-drafter 7 split labelling into a second entrypoint, release-drafter/release-drafter/autolabeler, and the entrypoint used here has no labelling in it at all - its source mentions labels zero times, against twenty three in the autolabeler's. So a pull request run applied no labels. On a pull request from a fork it could not write a draft either: the token is read only, and the run failed with "Resource not accessible by integration", hidden by continue-on-error. Runs that could only fail also cancelled each other, because every pull request against a release branch computed the same concurrency group - which is how apache#16183 lost its check twelve seconds in, to an unrelated pull request that pushed after it. Nothing is lost by removing the trigger and the collision goes with it. Drafts are still written on every push to a release branch, which is when a merge can change them, and the concurrency group is a branch again because a branch is the only subject left. Restoring labels needs the autolabeler entrypoint, which is a separate action and not on the ASF approved list - approved_patterns.yml carries only release-drafter/release-drafter@* - so it wants an INFRA request first, and its own change.
The job held pull-requests: write for the autolabeler, and there is no autolabeler here any more. What remains reads merged pull requests to build the draft, which the action does through find-recent-merged-pull-requests, so the scope stays at read rather than going altogether: a permissions block is restrictive, and an unnamed scope is denied.
🚨 TestLens detected 1 failed test 🚨Here is what you can do:
Test SummaryCI - Groovy Joint Validation Build / Build Grails with Groovy snapshot (shard 2) > :grails-test-examples-scaffolding:integrationTest
🏷️ Commit: 02a2338 Test FailuresUserControllerSpec > User list (:grails-test-examples-scaffolding:integrationTest in CI - Groovy Joint Validation Build / Build Grails with Groovy snapshot (shard 2))Rerun ControlsNote Checks are currently running using the configuration below. Select tests to mute in this pull request: 🔲 UserControllerSpec > User list Reuse successful test results: 🔲 ♻️ Only rerun the tests that failed or were muted before Click the checkbox to trigger a rerun: 🔲 Rerun jobs Learn more about TestLens at testlens.app/docs. |
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.
Every pull request against a release branch computes the same release-drafter concurrency group, because the group is keyed on the branch it targets:
Two pull requests pushed within seconds of each other therefore share one slot, and the later one cancels the earlier:
The evicted pull request shows a cancelled check with nothing wrong with it, and never receives the labels the run exists to apply. Anything that raises several pull requests at once — rebasing a stack, merging a branch into each of them — makes it routine.
Queueing instead of cancelling would not fix it: GitHub keeps one pending run per group and cancels the one pending before it, so a sweep of ten pull requests would still show eight cancellations, of queued runs rather than running ones.
The group is the pull request
Pull requests no longer meet.
cancel-in-progressstill does the right thing within one subject: pushing twice to the same pull request supersedes its own earlier run, and pushes to a release branch still share a group by branch name.A pull request run labels; it does not draft
They shared a slot for a reason — two runs creating the same draft at once is how the duplicate drafts described in that file's header appear — so this removes the reason rather than working around it.
Release notes are built from merged pull requests. An open one contributes nothing to the draft, so the releaser was rewriting the draft it had already written. Checked against the live
v8.0.0draft: it lists merged pull requests only, which also corrects the claim in the workflow comment that the draft "picks up new PRs as soon as they are opened".Labels still apply on every pull request event. The draft is written by pushes to the release branch, which is when a merge can actually change it.
./gradlew validateActionspasses.