Backport 4.1: Automatic backporting workflow from 4.1 to 4.2#16274
Merged
Backport 4.1: Automatic backporting workflow from 4.1 to 4.2#16274
Conversation
Motivation: We often backport PRs from 4.2 to 4.1. Because these branches are very similar, cherry-picking often applies cleanly. Modification: Add a workflow that triggers when a is PRs merged into 4.2 with the `needs-cherry-pick-4.1` label, or when a merged PR is labelled with `needs-cherry-pick-4.1`. The workflow triggers on `pull_request_target` so that it runs in the context of the base branch, rather than the PR, which gives it access to repository secrets – this is safe because we're not running any code that's been added or modified by the PR in question. The workflow checks out the full git history, and tries to cherry-pick the merge commit onto `4.1` and create a pull-request. Finally, the workflow adds a comment to the original PR, linking the backport PR if the cherry-pick succeeded, or reporting failure if it didn't. The back port branch are pushed back to the netty/netty repository using the same SSH key we use to push release tags. Result: Easier to keep 4.1 up to date with bug fixes we do in 4.2. This PR attempts to fix the issues encountered with #16269 and #16271 (cherry picked from commit c0c2c27)
Member
|
@chrisvest seems like the CI jobs are not triggered for it ? |
Member
|
@normanmaurer Aha, so we need a personal access token after all, for creating the backport PR. When the PR is created with GITHUB_TOKEN, it doesn't trigger other workflows: https://docs.github.com/en/actions/concepts/security/github_token#when-github_token-triggers-workflow-runs |
Member
|
Merging this one manually, then. |
Member
|
@normanmaurer Hopefully this will fix it: #16276 – unfortunately it means we need to have a personal access token configured, and these things expire. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #16273 to 4.1
Cherry-picked commit: c0c2c27
Motivation:
We often backport PRs from 4.2 to 4.1.
Because these branches are very similar, cherry-picking often applies cleanly.
Modification:
Add a workflow that triggers when a is PRs merged into 4.2 with the
needs-cherry-pick-4.1label, or when a merged PR is labelled withneeds-cherry-pick-4.1.The workflow triggers on
pull_request_targetso that it runs in the context of the base branch, rather than the PR, which gives it access to repository secrets – this is safe because we're not running any code that's been added or modified by the PR in question.The workflow checks out the full git history, and tries to cherry-pick the merge commit onto
4.1and create a pull-request. Finally, the workflow adds a comment to the original PR, linking the backport PR if the cherry-pick succeeded, or reporting failure if it didn't.The back port branch are pushed back to the netty/netty repository using the same SSH key we use to push release tags.
Result:
Easier to keep 4.1 up to date with bug fixes we do in 4.2.
This PR attempts to fix the issues encountered with #16269 and #16271