Skip to content
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

cherrypicker plugin can't process several requests in the same comment #292

Open
VannTen opened this issue Oct 8, 2024 · 4 comments
Open
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@VannTen
Copy link

VannTen commented Oct 8, 2024

I'm reposting here the original report in test-infra: kubernetes/test-infra#29666

Expected behavior:

A comment of the form:

/cherrypick release-X
/cherrypick release-Y

should trigger two answers announcing the cherry-pick for each , or alternatively one message with all the planned cherry-picks.
Then when the branch is merged both cherrypick should be created against the target branch (the behavior is consistent, I don't have a link right now but I've noted it on merged PRs as well)

Actual behavior:
Only the first cherrypick commands is acknowledged by the bot.

Examples:
For instance this comment only triggers a cherry-pick on the first mentioned branch.

This was implemented but has apparently regressed.

@petr-muller petr-muller added kind/feature Categorizes issue or PR as related to a new feature. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Oct 8, 2024
@xrstf
Copy link
Contributor

xrstf commented Oct 13, 2024

I tried to look into this and am wondering if the cherrypicker would really not have created all of the requested cherrypicks, even though it might have responded with a misleading message.

Because the handlePullRequest function does loop through all target branches and is covered by a unit test. But the handleSingleComment function only ever takes the first match and formulates a response for it.

I must admit I have never tried to ignore that message and just let the plugin do its thing once the PR merges, I also always manually created new GitHub comments for the remaining target branches.

@xrstf
Copy link
Contributor

xrstf commented Oct 14, 2024

So I tested this today and it seems I am right: kubermatic/kubermatic#13811 -- the response comment only mentioned the first branch, but ultimately cherrypicker tried to create 2 PRs.

@VannTen
Copy link
Author

VannTen commented Oct 14, 2024 via email

@xrstf
Copy link
Contributor

xrstf commented Oct 14, 2024

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants