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
backporting: Suggest only one related commit for a backport #16907
Conversation
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.
🚀
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.
I think this is creating ambiguity where there isn't:
Found the following ambiguous commits:
edf76fb paul@cilium.io 2021-06-18 vagrant: Bump all Vagrant box versions
5bef5d7 paul@cilium.io 2021-04-21 vagrant: Bump all Vagrant box versions
4dc60e6 paul@cilium.io 2021-04-19 vagrant: Bump all Vagrant box versions
816b323 paul@cilium.io 2020-11-25 vagrant: Bump all Vagrant box versions
51826b3 paul@cilium.io 2020-11-13 vagrant: Bump all Vagrant box versions
df8238d paul@cilium.io 2020-09-30 vagrant: Bump all Vagrant box versions
a4e7bc6 paul@cilium.io 2020-07-23 vagrant: Bump all Vagrant box versions
How are those commits ambiguous? They don't have the same author date at all. If they don't have the same author dates, they are not the same, regardless of commit titles.
Printing them all is only likely to confuse backporters IMO. What are they suppose to do with that information? Check every commit? If they should just check the dates match, why not automate that part?
Recently, the check-stable script has suggested every single possible match for commits where the name does not uniquely identify the commit. This can be a bit confusing to backporters since it looks like there are many commits to backport as part of this PR, but the second and later ones are not necessary to backport. * PR: 16589 -- vagrant: Bump all Vagrant box versions (@pchaigno) -- cilium#16589 Merge with 1 commit(s) merged at: Tue, 22 Jun 2021 12:36:17 -0700! Branch: master (!) refs/pull/16589/head ---------- ------------------- v (start) | edf76fb 5bef5d7 4dc60e6 816b323 51826b3 df8238d a4e7bc6 via fb723f8 ("vagrant: Bump all Vagrant box versions") v (end) Probably within the last year of commits, we should be able to correlate the exact commit that needs backporting, so iterate through those to find the exact commit. If none of those are the correct commit, fail out and push back to the backporter to figure out. This allows us to now accurately pick the correct commit in most cases: * PR: 16589 -- vagrant: Bump all Vagrant box versions (@pchaigno) -- cilium#16589 Merge with 1 commit(s) merged at: Tue, 22 Jun 2021 12:36:17 -0700! Branch: master (!) refs/pull/16589/head ---------- ------------------- v (start) | edf76fb via fb723f8 ("vagrant: Bump all Vagrant box versions") v (end) Manually tested by substituting a known commit into 'related_commits', and by checking the current v1.8 backports which includes an ambiguous commit due to a revert+reapply in the master branch. Signed-off-by: Joe Stringer <joe@cilium.io>
2fe42ea
to
4fe4e41
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.
LGTM, with one suggestion below.
Recently, the check-stable script has suggested every single possible
match for commits where the name does not uniquely identify the commit.
This can be a bit confusing to backporters since it looks like there are
many commits to backport as part of this PR, but the second and later
ones are not necessary to backport.
Probably within the last year of commits, we should be able to correlate
the exact commit that needs backporting, so iterate through those to
find the exact commit. If none of those are the correct commit, fail out
and push back to the backporter to figure out.
This allows us to now accurately pick the correct commit in most cases:
Manually tested by substituting a known commit into 'related_commits',
and by checking the current v1.8 backports which includes an ambiguous
commit due to a revert+reapply in the master branch.
Fixes: #16572