-
Notifications
You must be signed in to change notification settings - Fork 173
cherrypick: do not abort on first failure #570
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
base: main
Are you sure you want to change the base?
cherrypick: do not abort on first failure #570
Conversation
✅ Deploy Preview for k8s-prow ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: valen-mascarenhas14 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @valen-mascarenhas14! |
|
Hi @valen-mascarenhas14. Thanks for your PR. I'm waiting for a github.com 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. DetailsInstructions 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-sigs/prow repository. |
|
/ok-to-test |
|
/lgtm |
|
@droslean @BenTheElder @petr-muller Any inputs on this ? |
|
@valen-mascarenhas14 sorry I forgot about this... let me know if after few days you don't hear from them I'll approve |
| } | ||
| } | ||
|
|
||
| if len(errs) > 0 { |
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.
You don't need this check. You can just return log, utilerrors.NewAggregate(errs)
|
|
||
| if err := s.handle(branchLog, ic.Comment.User.Login, &ic.Comment, org, repo, targetBranch, baseBranch, commands[targetBranch], title, body, num); err != nil { | ||
| return log, fmt.Errorf("failed to handle cherrypick for %s: %w", targetBranch, err) | ||
| branchLog.WithError(err).Error("Cherrypick failed") |
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.
In the end all of the errors should be logged since you will return them.
| testCherryPickIC(localgit.NewV2, t) | ||
| } | ||
|
|
||
| func TestCherryPickMultipleBranches_OneFailsOthersProceed(t *testing.T) { |
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.
You shouldn't need a new test function just for that specific case. Just ensure that you will add this test case to the existing tests.
Fix for #544
This change fixes the behavior in the cherrypicker plugin where processing would stop after the first cherry-pick failure, even if additional valid targets were requested in the same comment.
The logic is updated to continue processing remaining branches while aggregating and reporting all errors at the end.
Key change
This ensures that: