Cherry-picker–run without a conflicting backport?

I’ve been messing with adding basic color support to cherry-picker. All tests pass, but it seems none of them do much with the CLI. I have it installed locally, but have no conflicting backports to try it with. In the absence of any conflicting backport PRs, is there a way I can interactively run my local copy against some other conflicts which will exercise it from start to finish?

Maybe just pick any 3.13-specific PR and go through the backport process? That’s what I’ve done to test cherrypicker and my own forward-port/sync tooling

I think this is beyond my GitHub-fu. Is there a way to search for a 3.13 PR which requires a backport to 3.12 or 3.11 but which has conflicts? Isn’t that the primary use of cherry-picker? This set of filters: is:pr is:open label:"needs backport to 3.12" is good as far as it goes, but how do I further filter PRs which had conflicts and require the services of cherry-picker? Looking at the first several PRs selected by that set of filters, I saw nothing which mentioned either conflicts or the involvement of miss-islington. In my limited PR backport experience, that’s the only place where I’ve seen cherry-picker commands.

For your purpose, can’t you attempt to backport any 3.13-specific PR to 3.12 (e.g. gh-115727: Reduce confidence even on 100% predicted jumps by gvanrossum · Pull Request #115748 · python/cpython · GitHub, the most recent one on main right now)? The backport will surely fail (since the PR is on top of other 3.13-specific changes), so you get to test how cherry-picker deals with a failing backport. And if by chance you do succeed in making a PR against 3.12, you can just close the PR; no harm done.

1 Like

I see what you’re saying. That much I can do, but with a commit which clearly will never work, I can only test the first half of the process (which I have done with other PRs). I can’t exercise the second half of the process (the cherry_picker --continue part).

You could just resolve the conflict however convenient, mark it resolved and continue, no? The specifics of the actual resolution shouldn’t matter to cherry-picker’s actual operation, and if you don’t set GH_AUTH it won’t go all the way and create the PR, just open the PR creation page so you can check the output is as expected. Additionally, you could also pass --dry-run to have it output the commands it would run, and/or --no-auto-pr to skip the final PR creation step completely.

Okay, I understand now. Sorry, I’m a bit slow on the uptake sometimes…

1 Like