-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Deduplicating area in pr title in release notes #9186
🐛 Deduplicating area in pr title in release notes #9186
Conversation
Hi @Dhairya-Arora01. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test
@Dhairya-Arora01 hey, thanks for the PR. Can you please create a separate issue where this PR tries to tackle it, that is because we agreed to create new issues for each individual sub-tasks since #9104 is an umbrella issue. Once you create a separate issue dedicated for this PR, you can update the PR description with:
|
Sure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot!
b0898dc
to
8049f06
Compare
8049f06
to
02c7dff
Compare
/lgtm |
LGTM label has been added. Git tree hash: 579e4e67b7e89f98eba7daefbf3995add1523a8a
|
02c7dff
to
cab14a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Dhairya-Arora01
/lgtm
/cc @sbueringer @killianmuldoon
@kubernetes-sigs/cluster-api-release-team
LGTM label has been added. Git tree hash: b9520910a3b756a48fc0a376ebb629a91db29f22
|
cab14a1
to
7691f8d
Compare
hack/tools/release/notes_test.go
Outdated
}{ | ||
{ | ||
name: "PR title with area", | ||
title: "test/e2e: improve logging for a detected rollout", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this made me look at the implementation and I think it might a bit dangerous
The "search" we do is global, so if a PR title has the prefix in the middle of the string, we will "cut" from there. Instead, I think it would be better if we remove the area only when we find it at the start of the string.
example of problematic title:
Update API:Machine with new field
will be converted to
Machine with new field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@g-gaston the area that we are removing is user friendly area
cluster-api/hack/tools/release/notes.go
Line 459 in 46412f0
area, err = getAreaLabel(c.merge) |
Example in our case test/e2e:
but the user friendly area is e2e
and it makes sense to remove whole test/e2e:
Also we are searching for area + ":" to remove , and i think it doesn't makes sense to have area:
in between the PR title.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we are searching for area + ":" to remove , and i think it doesn't makes sense to have area: in between the PR title.
I don't disagree but I don't want to make that restriction for PR titles. The idea here is to cleanup PR titles for the release notes when we can, not to impose more rules over PR titles. I would prefer to restrict the cleanup to just the beginning of the title. If that means we can't automatically cleanup some titles and we do it manually, it's an ok tradeoff.
Example in our case test/e2e: but the user friendly area is e2e and it makes sense to remove whole test/e2e:
I understand what your are saying about that PR specifically, but we can't really catch all the possible variations. What if the author starts the PR title with Test/E2E
? We won't be able to catch that with the current logic, although it's still duplicated.
If what you want is to be able to catch composed prefixes with the area, why don't you use a regex? That way you can restrict it to start at the beginning of the title and maybe even make it case insensitive.
Something like (I haven't tested this btw, just a direction to explore)
`(?mi)^\S*/e2e:\s*`
eb41fc5
to
0cecd77
Compare
0cecd77
to
321c537
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, but leaving it to others take another look after suggestions
/cc @g-gaston
/lgtm
/hold
LGTM label has been added. Git tree hash: b068bf696c6ad261923479cc0a486537fbd59f01
|
/lgtm Thanks! |
What this PR does / why we need it:Deduplicating prefix in release notes as stated in #9104 Release Notes section 3rd task
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes: #9190
Part of: #9104