Repository navigation
Replace automatic milestone assignment with status/triage - #1812
Merged
Merged
Conversation
jjbustamante
force-pushed
the
chore/skip-asign-milestone-when-already-set
branch
from
June 26, 2023 22:36
1945f86 to
de7a86d
Compare
Member
Author
|
PR is still on draft, removing the milestone |
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
… one Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
jjbustamante
force-pushed
the
chore/skip-asign-milestone-when-already-set
branch
from
February 7, 2024 23:09
de7a86d to
d163a95
Compare
Member
|
@jjbustamante do you remember what was left for this one? |
Member
Author
Testing it! 😄 I think I didn't find the way to actually test the PR |
The add-milestone job ran on every pull_request_target activity, including
'synchronize', and called issues.update unconditionally. Pushing a commit to
a pull request therefore reset a milestone a maintainer had changed by hand,
silently undoing release planning.
Three things were wrong:
- The job ran on 'synchronize'. It now runs only on 'opened' and 'reopened',
so a later push can no longer reassign anything. The label job keeps running
on every push, where relabelling is still wanted.
- The guard added earlier read `result.milestone` from issues.get, which
returns `{data: {...}}`. It was always undefined, so the guard never fired.
It now reads `result.data.milestone`.
- The milestone was picked with `sort: due_on` and `data[0]`. Milestones
without a due date are returned by that call too, so with no due dates set
anywhere the oldest open milestone always won, regardless of which release
was actually in progress. The job now considers only milestones that have a
due date, picks the nearest one, and assigns nothing when none has one.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
The add-milestone job assigned a milestone on every pull_request_target activity, including 'synchronize'. Pushing a commit to a pull request reset a milestone that had been changed by hand, so merging main into an older pull request was enough to lose its milestone and silently undo release planning. The job is removed rather than guarded. Which release a change belongs to is a triage decision, and no heuristic available to the workflow makes it well: the milestone was picked with 'sort: due_on' and 'data[0]', but that call also returns milestones with no due date, so with none set anywhere the oldest open milestone always won regardless of which release was in progress. That is how 0.41.0 came to hold 69 open items. New pull requests now arrive with no milestone and get one during triage. The label job is unchanged and still runs on every push. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
Replaces the milestone that used to be assigned automatically with the label that already means "a maintainer needs to look at this and categorise it", so triage has a batch to work through and nothing arrives pre-sorted into a release it may not belong to. The issue templates apply status/triage already, but three paths bypass them: a blank issue, anything opened through the API or gh, and every pull request. Issues #2695, #2707, #2726, #2729, #2754, #2756, #2758, #2760 and #2761 all arrived with no labels at all and had to be labelled by hand afterwards. Anything that already carries a status/ label is left alone, so the issues the bots file for CVEs and Go upgrades keep the status/ready or status/in-progress they set themselves. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
Blank issues were enabled, which is the default, so the templates' labels were bypassed whenever someone used "Open a blank issue". That is how #2754, #2756, #2758, #2760 and #2761 arrived with no type/ label and no status/ label, and their bodies follow none of the templates. Turning blank issues off means every issue goes through Bug, Chore or Feature request and arrives with both labels set. The Questions contact link to the community discussions is unaffected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
Dependabot sets the dependencies label itself in dependabot.yml, so treat that as already categorised, the same as a status/ label. Its pull requests stay as they are and are reviewed as a group rather than one at a time through triage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
1 of 2 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1812 +/- ##
=======================================
Coverage 67.08% 67.08%
=======================================
Files 267 267
Lines 14661 14661
=======================================
Hits 9834 9834
Misses 4827 4827
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
1 of 2 tasks
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.
Summary
New contributions were sorted into a release automatically and were not flagged for triage. This swaps that around: nothing gets a milestone on its own, and everything arrives labelled
status/triageso there is one batch to work through when deciding which release it belongs to.Stop auto-assigning a milestone. The
add-milestonejob ran on everypull_request_targetactivity, includingsynchronize. Pushing a commit to a pull request reset a milestone I had changed by hand, so mergingmaininto an older pull request was enough to lose it. It also picked the milestone withsort: due_onanddata[0], but that call returns milestones with no due date too, so with none set anywhere the oldest open milestone always won regardless of which release was in progress. That is how0.41.0came to hold 69 open items, and once it closed new pull requests would have started landing in the0.40.12patch milestone. The job is removed rather than guarded: which release a change belongs to is a triage decision.For the record, the guard this branch originally added would not have helped either. It read
result.milestonefromissues.get, which returns{data: {...}}, so the value was alwaysundefinedand the job fell through to the update. That is why it looked untestable back then; it behaved exactly like no change at all.Label new issues and pull requests
status/triage. The templates apply it already, but three paths bypass them: a blank issue, anything opened through the API orgh, and every pull request. #2695, #2707, #2726, #2729, #2754, #2756, #2758, #2760 and #2761 all arrived with no labels at all. Anything that already carries astatus/label is left alone, so the issues the bots file for CVEs and Go upgrades keep thestatus/readyorstatus/in-progressthey set themselves.Require an issue template. Blank issues were enabled, which is the default, and that is the path those unlabelled issues came in through — their bodies follow none of the templates. Every issue now goes through Bug, Chore or Feature request and arrives with both a
type/and astatus/label. The Questions contact link to the community discussions is unaffected.Output
Before
After
Documentation
Maintainer-facing. I'll let the other maintainers know that new work no longer gets a milestone automatically and that
status/triageis where to find the batch.Related
No issue; found while triaging the open pull requests for
0.41.0.