Project

Profile

Help

Task #5795

closed

Automatically cherry pick bug fixes to the latest release branch

Added by daviddavis almost 5 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
CI/CD
Sprint:
Sprint 63
Quarter:

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

Related to Pulp - Task #5808: Have travis email us when a build failsCLOSED - WONTFIX

Actions
Actions #1

Updated by bmbouter almost 5 years 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.

Actions #2

Updated by daviddavis almost 5 years ago

  • Related to Task #5808: Have travis email us when a build fails added
Actions #3

Updated by fao89 almost 5 years ago

  • Tracker changed from Issue to Task
  • % Done set to 0
  • Sprint set to Sprint 62
Actions #4

Updated by ipanova@redhat.com almost 5 years ago

  • Groomed changed from No to Yes
Actions #5

Updated by rchan almost 5 years ago

  • Sprint changed from Sprint 62 to Sprint 63
Actions #6

Updated by daviddavis almost 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis
Actions #7

Updated by daviddavis almost 5 years ago

  • Tags CI/CD added
Actions #8

Updated by daviddavis almost 5 years ago

  • Status changed from ASSIGNED to POST

Added by daviddavis almost 5 years ago

Revision 84d63def | View on GitHub

Adding an automated cherry pick job

fixes #5795 https://pulp.plan.io/issues/5795

Actions #9

Updated by daviddavis almost 5 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

Added by daviddavis almost 5 years ago

Revision 2d150c79 | View on GitHub

Adding automated cherry picking

ref #5795

Actions #10

Updated by daviddavis almost 5 years 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.

Actions #11

Updated by daviddavis almost 5 years ago

  • Status changed from ASSIGNED to POST

Here is the fix to handle squashes and rebases. Warning, it's ugly.

https://github.com/pulp/plugin_template/pull/159

Added by daviddavis almost 5 years ago

Revision 79144250 | View on GitHub

Update cherry pick processor to handle rebases and squashes

fixes #5795

Actions #12

Updated by daviddavis almost 5 years ago

  • Status changed from POST to MODIFIED

Added by daviddavis almost 5 years ago

Revision c1b43b91 | View on GitHub

Updating the cherry pick script.

ref #5795

Actions #13

Updated by bmbouter almost 5 years ago

  • Sprint/Milestone set to 3.1.0
Actions #14

Updated by bmbouter almost 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF