-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mergify] backport automation to 7.x, 7.12 and 7.11 #24608
Changes from 3 commits
da361cc
edc1caa
bab54e9
254b2dd
840d99a
c1238b8
bf22c7e
ff1eaca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
pull_request_rules: | ||
- name: ask to resolve conflict | ||
conditions: | ||
- conflict | ||
actions: | ||
comment: | ||
message: | | ||
This pull request is now in conflicts. Could you fix it @{{author}}? 🙏 | ||
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/ | ||
``` | ||
git fetch upstream | ||
git checkout -b {{head}} upstream/{{head}} | ||
git merge upstream/{{base}} | ||
git push upstream {{head}} | ||
``` | ||
- name: backport patches to 7.x branch | ||
conditions: | ||
- base=master | ||
- label=v7.13.0 | ||
v1v marked this conversation as resolved.
Show resolved
Hide resolved
|
||
actions: | ||
backport: | ||
branches: | ||
- 7.x | ||
- name: backport patches to 7.12 branch | ||
conditions: | ||
- base=master | ||
- label=v7.12.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How exactly will the labels work? a. If we are about to release 7.12.0, I might want to use the label b. Will my PR be backported if I add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll answer your questions in a minute, for clarity, the initial proposal was to use the existing labels
Yes, To illustrate the above, I just tagged elastic/apm-pipeline-library#1053 with the explicit label and elastic/apm-pipeline-library#1056 was created. NOTE: for some reason the timestamp for the label does not match with when I did it, (about 7 minutes ago instead of 2 days...)
Yes, backports with mergify don't know about releases but branches and labels. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
if the mergify config is updated with that branch before you merge the PR, the PR would backported.
the backport is made on a new PR when you merge the fixed PR, if the labels and mergify configuration are in place when you merge, a new PR is made to every branch that you requested backport with the labels. There is an alternative way to make the backports manually using a GitHub comment (see https://docs.mergify.io/commands.html#backport) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe to clarify case a:
After step 5, will my old PR be picked up automatically or am I required to remember that I did have a 2 weeks old PR that I must now 'manually' backport by adding a comment to the PR (or remove + add label again). Case b is a little unfortunate as labels do not necesarrily reflect reality, but well, it's the way it is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
this happens after you merge the PR, mergify does not review old merged PRs, so the backport is not made. In this case, you have to manually backport the PR, either from the PR with a GiHub Comment or as you make now from your laptop. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIK if you fix something in branch 7.12 that has the version 7.12.0 this will be in the 7.12 branch (the same major.minor) that will contain the version 7.12.1 (different patch), so in the case you put as an example there is no backport. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To help to unblock this 🧵 Since there is no backport automation in place for this project I see the benefits of enabling it for facilitating the backporting process, but I don't know if it could cause any issues. Although, Do you think if we enable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think either behavior is a blocker and adding mergify is an improvement either way. As we have to document the backport process in our how to guides. I'm trying to figure out how it works and where we have potential gotchas that we should document as well. I did just bring up the two cases as we've seen them from time to time in the past: label does not match actual release + us holding of with backport in order to target the next patch release... cough... kafka ... cough.
v1v marked this conversation as resolved.
Show resolved
Hide resolved
|
||
actions: | ||
backport: | ||
branches: | ||
- 7.12 | ||
- name: backport patches to 7.11 branch | ||
conditions: | ||
- base=master | ||
- label=v7.11.0 | ||
v1v marked this conversation as resolved.
Show resolved
Hide resolved
|
||
actions: | ||
backport: | ||
branches: | ||
- 7.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
author
won't be resolved correctly -> Mergifyio/mergify#1096There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See v1v/apm-pipeline-library#19 (comment)