-
Notifications
You must be signed in to change notification settings - Fork 526
relnotes: --list-v2 lookup PR numbers by merge commits #1888
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
Conversation
…d of GitHub API call Signed-off-by: Wilson E. Husin <whusin@vmware.com>
Signed-off-by: Wilson E. Husin <whusin@vmware.com>
pkg/notes/notes_v2.go
Outdated
| // | | ||
| // * last shared commit | ||
|
|
||
| // this means the stopping point is 2 commits behind the tag pointed by opts.StartSHA |
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.
Can we ensure that we there are always only 2 commits? This would change if we decide to cherry-pick some patches right before the release, right?
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.
Ah yeah, I posted this elsewhere and I forgot to put it here -- that's correct, this approach will not work for patch releases. I think there should be some smart detection mechanism to get it, I'll put it in TODO now while explore the calculation today ish.
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.
That's great, thank you! 🙏
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.
so I looked into this again and I think trying to support patch releases at the moment would over-complicate the code. for example, in generating patch releases of 1.20, we need to find commits from the specified tag up to 1.19.0, which points to this commit. somehow, 2-level of parents from that commit has release-1.19 on the left and master on the right, which is the opposite of the convention in 1.20.
in short, I'm suggesting is that we leave this --list-v2 experimental flag until 1.20 is the oldest release line we support before deprecating the older implementation. --list-v2 will continue to work and beneficial for release team fetching minor-release notes and patch-release notes won't even get a chance to use this until later. how does that sound?
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.
Well, we could always plug the v2 list code into the krel release-notes ... invocations used by the release team.
Also, let's keep in mind that it's not just a question of kubernetes prereleases vs patch releases. We already have 3rd party consumers who are using the release-notes tool for other projects. How are those looking facing a potential change? Can we know?
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.
so I don't expect --list-v2 implementation to change the end result. it fixed a bug which exists the old implementation, and that's the only acceptable regression IMO. anything else has to be the same, just performance improvements.
one goal that I'd like to have before removing the feature flag is to have rely on git merge-base instead of hackily rewinding commits like this, because it'd be more deterministic.
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.
okay I went ahead and implemented commit resolution through merge-base and it's now working for patch releases! 🎉
puerco
left a comment
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.
The results your tests have been showing are great wilson.
A little note below and in a standalone comment 👇
|
I was running your fork and look what showed up in the MD notes, below At first, I did not think it was related but I checked and It is not in the current draft. |
🤔 Prow is not labeling as |
| logrus.Infof("No PR found for commit %s: %v", commit.GetSHA(), err) | ||
| logrus.Debugf("No PR found for commit %s: %v", commit.GetSHA(), err) |
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.
@puerco since we're talking about release logs -- is this intentional to be in Info level? because I found it to be noisy when running release notes locally, but I wonder if this is a desired feature?
alternatively, if it is desired, would it make sense to run with Debug level for releases?
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.
TBH I'm not sure when or how often this case can happen. I don't remember seeing it much scratch that, I ran a couple of tests and I see what you mean.
|
- Add structured logging as well - Set progressbar to STDOUT (STDERR is used by logger) Signed-off-by: Wilson E. Husin <whusin@vmware.com>
Signed-off-by: Wilson E. Husin <whusin@vmware.com>
Signed-off-by: Wilson E. Husin <whusin@vmware.com>
Signed-off-by: Wilson E. Husin <whusin@vmware.com>
|
okay I personally feel comfortable with this for now since it's behind a feature flag and we can iterate. let me know if you think otherwise, but I'm going to cancel the hold from my end. /hold cancel |
|
ergh on second thought... I should just implement /hold |
Signed-off-by: Wilson E. Husin <whusin@vmware.com>
Signed-off-by: Wilson E. Husin <whusin@vmware.com>
|
/hold cancel |
|
Nice job @wilsonehusin !! |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: puerco, wilsonehusin 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 |
Signed-off-by: Wilson E. Husin whusin@vmware.com
What type of PR is this?
/kind feature
What this PR does / why we need it:
This introduces an experimental change behind a feature flag
--list-v2forkrel release-notes.See release notes for details.
Some benchmarks running on
1.21.0-alpha.2:Which issue(s) this PR fixes:
None
Special notes for your reviewer:
This is initial steps towards making
krel release-notesworkflow more reliable and less manual intervention.TODO:
NONEdetection even whenrelease-notes-nonelabel is not present, case on pointDoes this PR introduce a user-facing change?
1.21 Release Notes team: Making this visible to you all -- if you're interested please give it a try and do a comparison. Same workflow, just add
--list-v2flag after you clone this./cc @ashnehete @melodychn @pmmalinov01 @soniasingla
Recent contributors to
krel release-notes: Let me know what you all think! (also hi Chris! I haven't worked with you but have seen your work around release notes JSON, making this visible to you in case it's of interest)/cc @puerco @saschagrunert @cartyc
For discussion, probably going to let this up for a while and give folks a chance to comment (if you're not mentioned above and have thoughts, please send them over!)
/hold