Task #5795
Automatically cherry pick bug fixes to the latest release branch
100%
Description
Have Travis check for issues tagged with "Needs Cherry Pick" and create a PR with these issues against the latest release branch.
Design¶
When Travis runs its cron job, have it check for any merged PR labeled with "Needs Cherry Pick". It should create a PR with these changes if the cherry picks all succeed. Travis should also remove the label from PRs.
If any of cherry picks fail, the job should fail. PRs in this case don't get updated and the release lead should create the PR manually and remove the "Needs Cherry Pick" label.
The job should be controlled by a plugin_template variable (perhaps perform_cherry_pick?). I imagine we'll also need to have a variable to store the latest release branch name.
The Github user credentials, which are needed to open a PR and update PR labels, should be stored/encrypted in Travis settings. I think we might be able to leverage the @pulpbot account on Github.
Related issues
Associated revisions
Revision 2d150c79
View on GitHub
Adding automated cherry picking
ref #5795
Revision 79144250
View on GitHub
Update cherry pick processor to handle rebases and squashes
fixes #5795
Revision c1b43b91
View on GitHub
Updating the cherry pick script.
ref #5795
History
#1
Updated by bmbouter about 1 year ago
This looks great. As a cherry picking person, I could really use this because it would let me cherry pick at the PR level.
#2
Updated by daviddavis about 1 year ago
- Related to Task #5808: Have travis email us when a build fails added
#3
Updated by fao89 about 1 year ago
- Tracker changed from Issue to Task
- % Done set to 0
- Sprint set to Sprint 62
#4
Updated by ipanova@redhat.com about 1 year ago
- Groomed changed from No to Yes
#5
Updated by rchan about 1 year ago
- Sprint changed from Sprint 62 to Sprint 63
#6
Updated by daviddavis about 1 year ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
#7
Updated by daviddavis about 1 year ago
- Tags CI/CD added
#8
Updated by daviddavis about 1 year ago
- Status changed from ASSIGNED to POST
#9
Updated by daviddavis about 1 year ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset plugin_template|84d63defa6bd245a0e95e9682ee590f01b5cce40.
#10
Updated by daviddavis about 1 year ago
- Status changed from MODIFIED to ASSIGNED
The cherry pick process failed:
https://travis-ci.com/pulp/pulpcore/jobs/269037561
The issue is that there are three ways to "merge" PRs in github. The first is by merging and the other two are rebasing and squashing. In the merge case, the SHAs in the PR match the commits in the repository. The cherry pick code uses these SHAs to cherry pick the changes from the PR.
In the other cases however, the SHAs are different because the changes have been rebased or squashed. The cherry pick code doesn't handle this possibility and will need to.
#11
Updated by daviddavis about 1 year ago
- Status changed from ASSIGNED to POST
Here is the fix to handle squashes and rebases. Warning, it's ugly.
#12
Updated by daviddavis about 1 year ago
- Status changed from POST to MODIFIED
Applied in changeset plugin_template|7914425052c37b60d96696cc07e0b5748cf825c5.
Please register to edit this issue
Adding an automated cherry pick job
fixes #5795 https://pulp.plan.io/issues/5795