-
Notifications
You must be signed in to change notification settings - Fork 301
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
Merge release 2.34 into trunk
#1695
Conversation
Clearly the change adding Simplenote Android has not been deployed yet.
`publish_release` does it for us now.
@@ -169,64 +169,6 @@ platform :android do | |||
trigger_release_build(branch_to_build: release_branch_name) | |||
end | |||
|
|||
desc 'Updates store metadata and runs the release checks' | |||
lane :finalize_release do |skip_confirm: false| |
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.
Moved to release.rb
Generated by 🚫 Danger |
environment: { RELEASE_VERSION: release_version } | ||
) | ||
end | ||
end |
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.
Deleted as discussed in Automattic/simplenote-ios#1655 (comment). See also wordpress-mobile/WordPress-iOS#23589
base: base_branch, | ||
labels: 'Releases' | ||
) | ||
def create_backmerge_pr! |
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.
What do you think of what I did here?
create_backmerge_pr!
does exactly what is says, returns the URL of the PR or crashes if something went wrong. This allows callers to declare they expect a single backmerge PR, like in this repo for a code freeze or a release finalization.create_backmerge_prs!
below allows for more backmerge PRs, like when we finalize a hotfix. It also has the!
suffix because if something goes wrong it will callUI.user_error!
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.
I wrote a short comment about this in another PR but I guess it got lost amidst all PRs and discussions currently happening.
My main question is whether we can be sure the validation on create_backmerge_pr!
is guaranteed to be semantically correct, meaning: I think there may be cases when a previous release might take a bit longer or there is a hotfix in progress, then you "unexpectedly" will have a backmerge.
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.
I see... 🤔
So, for example if finalize_code_freeze
for 1.2
runs when 1.1
hasn't landed yet? Or if we are code freezing 1.2
while 1.1.1
is still in progress?
I'm tempted to say that 1) that should not happen because one should not run a code freeze before having finalized the previous release and 2) the action should only create backmerges in branches that are from later releases (e.g. 1.2.1 or 1.3). That to me suggests that if we have more than one backmerge then something went wrong and we should abort.
Having said that... Maybe it's best to be flexible (and account for me not being able to predict every future possible case in which this action should run) and let release manager deal with multiple backmerge PRs when only one should be there.
In fact, now that I think about it, the release manager would have to deal with them anyway because the failure implemented here is after the PRs have been created.
Here's what I might do:
- Remove the
create_backmerge_pr!
- Move the logic to print to STDOUT annotate CI into
create_backmerge_prs!
(I am keen on keeping the plural form to make it clear at call site that more than one might be opened) - Add a
warn_on_multiple_prs_opened: false
parameter that lanes such asfinalize_code_freeze
can use to change the STDOUT and CI annotation to include a warning if more than one backmerge was create
What do you think @iangmaia ?
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.
Actually @iangmaia sorry I'm going to merge this before you have a chance to reply to this because I had to make a few more changes to the release branch and will need to submit a new build. As such, it's convenient to have this PR on trunk
before the publish_release
task will open a new integration PR (because of the new changes).
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.
So, for example if finalize_code_freeze for 1.2 runs when 1.1 hasn't landed yet? Or if we are code freezing 1.2 while 1.1.1 is still in progress?
Yeah, in that case the PR would be created from 1.1.1 to 1.2 on finalize_hotfix
, but I guess it's just a matter of using the plural method in this case.
In fact, now that I think about it, the release manager would have to deal with them anyway because the failure implemented here is after the PRs have been created.
Makes sense to me 👍 I'm still a bit on the fence on what's best to do but annotating a warning sounds like a good compromise.
sorry I'm going to merge this before you have a chance to reply to this because I had to make a few more changes to the release branch and will need to submit a new build
No worries!
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.
A minor followup:
Move the logic to print to STDOUT annotate CI into create_backmerge_prs! (I am keen on keeping the plural form to make it clear at call site that more than one might be opened)
I run into the case of using create_backmerge_pr
expecting it to return a single URL in this Simplenote iOS build (all my own doing). There result was a buggy UX where the link to the PR in the build annotation didn't work. The reason? The markup had an array in the URL with got rendered as empty:
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.
Following up via #1698
📲 You can test the changes from this Pull Request in Simplenote Android by scanning the QR code below to install the corresponding build.
|
source use-bot-for-git wpmobilebot | ||
|
||
echo '--- :git: Checkout Release Branch' | ||
.buildkite/commands/checkout-release-branch.sh |
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.
I plan to followup with a dedicated PR that surfaces RELEASE_VERSION
here and remove reading it from the environment in the script.
I think by doing that we might also make the script more portable and possibly move it to the CI plugin. Being such a simple script, I wonder what's the value, but then again, it would make the implementation, the error handling, and the messages it print consistent across project, which I think is desirable for us.
It would also make the implementation consistent with the recent changes accessing RELEASE_VERSION
in the pipeline command
that we made in some iOS projects.
Admin merging as discussed above, #1695 (comment) |
cc @Automattic/apps-infrastructure to have a look at the automation changes. Context paaHJt-6Zx-p2