[rdo-list] cherry-picking with rdopkg

Jakub Ruzicka jruzicka at redhat.com
Wed Aug 24 17:25:35 UTC 2016


On 23.8.2016 00:12, Ken Dreyer wrote:
> Hi Jakub,
> 
> In the Ceph project we often have to cherry-pick GitHub Pull Requests
> downstream into RH's Ceph Storage product.

In OpenStack it's mostly gerrit @ review.openstack.org.

> Now that rdopkg supports pulling RHBZ numbers from the commits, we can
> store the BZ data in the -patches branches, and rdopkg does the rest.
> 
> To cherry-pick GitHub PRs for particular BZs, I've written the following app:
> 
>   https://github.com/ktdreyer/downstream-cherry-picker
> 
> This ensures that the cherry-picks are done correctly each time,
> enforces the RHBZ numbers, etc.

Nice, automation is the way.

> It would be cool to build this as a feature into rdopkg. It could be
> something like:
> 
>   rdopkg cherry-pick https://github.com/ceph/ceph/pull/111 12345

Looks good. Additional sources could be supported without breaking
interface a la

    rdopkg cherry-pick https://review.openstack.org/#/c/347447 12345
    rdopkg cherry-pick https://github.com/foo/bar/commit/deadbee 12345

> And it would cherry-pick GitHub PR #111 into the -patches branch,
> adding "Resolves: rhbz#12345" to each cherry-pick's log.
> 
> Do you guys in RDO often cherry-pick large branches (like 8+ commits)
> downstream at a time? If so, we could make it auto-detect GitHub vs
> Gerrit (although I'm not sure what URL you'd use for a branch in
> Gerrit)?

Not me, but possibly others?

Nonetheless, I believe auto adding RHBZ# to commit msg and being able to
supply review/commit URL instead of hash would be nice quality of life
improvement.

> What do you think?

It would be easier to maintain such functionality directly in rdopkg as
opposed to adding another requirement and interface projects but
modularity is nice, of course ;) It should be fairly easy to add to
rdopkg if we decide to.

I'd like to hear from people if they're interested in this (and the
gerrit support).


Cheers,
Jakub




More information about the dev mailing list