Project

Profile

Help

Task #5795

Automatically cherry pick bug fixes to the latest release branch

Added by daviddavis 6 months ago. Updated 4 months ago.

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

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
No
Tags:
CI/CD
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 63

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 fails NEW Actions

Associated revisions

Revision 84d63def View on GitHub
Added by daviddavis 6 months ago

Adding an automated cherry pick job

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

Revision 2d150c79 View on GitHub
Added by daviddavis 6 months ago

Adding automated cherry picking

ref #5795

Revision 79144250 View on GitHub
Added by daviddavis 6 months ago

Update cherry pick processor to handle rebases and squashes

fixes #5795

Revision c1b43b91 View on GitHub
Added by daviddavis 6 months ago

Updating the cherry pick script.

ref #5795

History

#1 Updated by bmbouter 6 months 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 6 months ago

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

#3 Updated by fao89 6 months ago

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

#4 Updated by ipanova@redhat.com 6 months ago

  • Groomed changed from No to Yes

#5 Updated by rchan 6 months ago

  • Sprint changed from Sprint 62 to Sprint 63

#6 Updated by daviddavis 6 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis

#7 Updated by daviddavis 6 months ago

  • Tags CI/CD added

#8 Updated by daviddavis 6 months ago

  • Status changed from ASSIGNED to POST

#9 Updated by daviddavis 6 months ago

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

#10 Updated by daviddavis 6 months 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 6 months 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

#12 Updated by daviddavis 6 months ago

  • Status changed from POST to MODIFIED

#13 Updated by bmbouter 4 months ago

  • Sprint/Milestone set to 3.1.0

#14 Updated by bmbouter 4 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF