-
Notifications
You must be signed in to change notification settings - Fork 399
Integrate bot for cherry-picking / backporting commits to release branches #1767
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
Integrate bot for cherry-picking / backporting commits to release branches #1767
Conversation
…nches Signed-off-by: Karthik Vetrivel <kvetrivel@nvidia.com>
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.
Made a quick first pass. This is a great start!
Signed-off-by: Karthik Vetrivel <kvetrivel@nvidia.com>
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.
Awesome initiative! left some comments
Signed-off-by: Karthik Vetrivel <kvetrivel@nvidia.com>
32320fc
to
e1ae960
Compare
![]() @tariq1890 Updated the backport bot to cherry-pick individual commits instead of merge commits. Tested with a 2-commit PR to verify it handles multiple commits correctly. |
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.
Not a JS expert, just a few comments from what I can remember from my early days with JS
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 @karthikvetrivel. This is great.
Is this something that we want to publish as an action at some point, or what options do we have to share this to other repos we own?
Maybe as a follow up: What does the landscape of available actions for doing this look like?
++ To this, since @karthikvetrivel implementation is already in JS, we could have this JS code at k8s-test-infra and from there export it as a GitHub Action so we can reuse in all our repos |
@ArangoGutierrez @elezar thanks for the review! Regarding rollout, I see a few options.
These seems the simplest to me.
This gives repos more flexibility to add custom steps before/after, but our bot needs full job isolation for git operations (script will fail if initial starting state is incorrect), so option 1 seems better.
It seems like option 1 is the best to me but would to leave hear your thoughts. |
Signed-off-by: Karthik Vetrivel <kvetrivel@nvidia.com>
7dbcd48
to
87e9703
Compare
As you recommend option 1, lets go with that. I think we can finish the review here and once we all agree with the implementation, we can talk about a centralized GitHub action so other repos can benefit from this tool |
@ArangoGutierrez Thanks! @elezar @cdesiniotis @tariq1890 what do you think about the current plan? As next steps, we can:
|
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.
Overall, the PR looks good to me.
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 @karthikvetrivel. I haven't given this an in-depth review.
I think a more pragmatic approach w.r.t how to move forward would be to merge this to the GPU Operator repo and collect experience with how this behaves before we try to centralize the functionality. This will give us a tighter development cycle and allow us to iron out any initial issues before making this more generally available (should we choose to do so).
One question that has just popped into my head is whether this command checks for properties of the user issuing the command at all?
@elezar That sounds good to me re: merging this into GPU Operator and seeing what we'd like to change/keep. This command does not check for properties of the user issuing the command. I originally thought about checking membership (to NVIDIA org) but that is difficult because not everyone sets the organization's membership to public. I had a chat with @rahulait and it doesn't seem strictly necessary for a security perspective. |
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. Let's get this in an collect data.
🤖 Backport PR created for |
🤖 Backport PR created for |
Usage
Add a
/cherry-pick
comment to your PR specifying target release branches:When to add the comment:
What Happens
backport
+auto-backport
(clean) orneeds-manual-resolution
(conflicts)Example
Example of a PR where you specify the target release branch:
Example of new PR opened:
Conflict Handling
If cherry-pick has conflicts:
needs-manual-resolution
labelBranch Naming
Release branches must follow the pattern:
release-X.Y
Examples:
release-25.3
,release-24.9.1
,release-23.9
Example