Skip to content
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

Release automation: try cherry-picking automation #62716

Merged
merged 5 commits into from
Jun 25, 2024

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Jun 21, 2024

What?

The idea is to have a designated label Backport to WP 6.6 Beta/RC and once a PR against trunk is merged with that label, it automatically cherry-picks that PR into the right release branch, removes the label, and comments on the PR. It should also work if the label is applied after merge. If there is a conflict, it will comment on the PR to make a PR against the wp/* manually.

Why?

Cherry-picking can be tedious, and it would be good to cherry-pick as soon as PRs are merged into trunk. That way conflicts can be detected and addressed early.

How?

See the workflow for details in logic.

To see it in action, this is the latest version: #62735 (comment)

Also, jobs will wait for the last one to finish so the checkout are always fresh.

image

Testing Instructions

I will attempt to create two branches that are based on this one:

Then I will create a few PRs against try/cherry-pick-automation-trunk to test if they get cherry-picked:

Testing Instructions for Keyboard

Screenshots or screencast

@ellatrix ellatrix added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Jun 21, 2024
@ellatrix ellatrix requested a review from desrosj as a code owner June 21, 2024 07:00
Copy link

github-actions bot commented Jun 21, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: vcanales <vcanales@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link

Flaky tests detected in 37d701f.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9609625039
📝 Reported issues:

ellatrix added a commit that referenced this pull request Jun 21, 2024
ellatrix added a commit that referenced this pull request Jun 21, 2024
ellatrix added a commit that referenced this pull request Jun 21, 2024
ellatrix added a commit that referenced this pull request Jun 21, 2024
ellatrix added a commit that referenced this pull request Jun 21, 2024
Copy link
Member

@vcanales vcanales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I like the requirement of creating PRs to the wp/* branch in order to merge changes that had caused conflicts.

@ellatrix ellatrix merged commit b6c5b41 into trunk Jun 25, 2024
60 checks passed
@ellatrix ellatrix deleted the try/cherry-pick-automation branch June 25, 2024 06:10
@github-actions github-actions bot added this to the Gutenberg 18.7 milestone Jun 25, 2024
@desrosj
Copy link
Contributor

desrosj commented Jun 25, 2024

This is really neat! Thanks for this, @ellatrix.

I did make one small adjustment to the syntax for the versions of third-party actions to use in #62836. When possible we should use full commit SHAs as an extra level of hardening to be safe. The actions/checkout was also a few versions behind, but Dependabot took care of that for us.

@ellatrix
Copy link
Member Author

Sounds good, thanks!

@gziolo
Copy link
Member

gziolo commented Jun 28, 2024

This is awesome! One question, who decides about adding Backport to WP 6.6 Beta/RC label? On the technical level, the commit can always get reverted from the release branch if the release squad disagrees, so maybe it is not an issue at all.

@gziolo
Copy link
Member

gziolo commented Jun 28, 2024

It could also get extended to backporting to the Gutenberg plugin release branches when there is a bug fix to land during RC or after the final release. At that point, we could delete the old bin/cherry-pick.mjs script crafted by @adamziel long time ago 😀

@ellatrix
Copy link
Member Author

Yes, anyone who can add labels can add it. Th Editor Tech Leads should double check the commits before publishing packages, revert if they disagree with something. They would have to do this previously as well, but before cherry-picking. Tbh, I don't think it's a big deal, we should put trust in people and correct/ping if needed.

@gziolo
Copy link
Member

gziolo commented Jun 28, 2024

Tbh, I don't think it's a big deal, we should put trust in people and correct/ping if needed.

Agreed. I guess it was the experience in the WP 6.6 release cycle so it's best to repeat it in the future 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
4 participants