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

Download store metadata when generating beta build #21623

Merged
merged 4 commits into from
Jan 28, 2025

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented Jan 28, 2025

Plus, remove code that automatically pushed when running the metadata download lane.

Downloading store metadata when generating beta build should provide earlier feedback on the metadata translation, at
least for the portion that has already been translated at the time a beta is made.

The approach is consistent with what we do in iOS, see https://github.com/wordpress-mobile/WordPress-iOS/blob/b9a0deaf091739f33051f20cffdbe9a2097f645e/fastlane/lanes/release.rb#L219

As for the push removal, automatically pushing from lanes other than the root-release lanes (code
freeze, new beta, finalize release, etc.) can result in undesired pushes, like it happened to me in edcd40a .

Granted, I should have looked at the lane parameters before running it, but I think a case can be made for making the default behavior the desired one and for the desired behavior of a lane that "downloads metadata strings" to not include pushing to the remote.

Moreover, not pushing to the remote is consistent with what iOS does, see https://github.com/wordpress-mobile/WordPress-iOS/blob/b9a0deaf091739f33051f20cffdbe9a2097f645e/fastlane/lanes/localization.rb#L394-L466

Important

@wordpress-mobile/apps-infrastructure I operated on the above under the assumption that the automation script is as is because we never got to update it, and that there is no reason for skipping downloading the metadata during the beta process. Having never been the release manager for WordPress Android, I might be missing something obvious here, so please do let me know if that's the case. Thanks!


To Test:

These changes will be tested in the real world during the next release cycle, that is 25.7.

You can test the new lane behavior by running bundle exec fastlane download_metadata_strings and noticing it does not push to the remote.

Example here's a screenshot of the run on my local, where you can see the logs do not include a git push and my terminal prompt shows 2⬆ which indicates my local branch is two commits ahead of the remote: the two metadata strings update commits, one for WP and one for JP.


Regression Notes

  1. Potential unintended areas of impact

    • N.A.
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • N.A.
  3. What automated tests I added (or what prevented me from doing so)

    • N.A.

PR Submission Checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes. - N.A.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary. - N.A.

Testing Checklist (strike-out the not-applying and unnecessary ones):

Not an app source PR.

This should provide earlier feedback on the metadata translation, at
least for the portion that has already been translated at the time a
beta is made.

This is consistent with what we do in iOS, see
https://github.com/wordpress-mobile/WordPress-iOS/blob/b9a0deaf091739f33051f20cffdbe9a2097f645e/fastlane/lanes/release.rb#L219
Automatically pushing from lanes other than the root-release lanes (code
freeze, new beta, finalize release, etc.) can result in undesired
pushes, like it just happened to me in
edcd40a
@mokagio mokagio added this to the 25.7 milestone Jan 28, 2025
@mokagio mokagio self-assigned this Jan 28, 2025
@mokagio mokagio requested a review from a team January 28, 2025 00:20
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 28, 2025

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr21623-83a65be
Commit83a65be
Direct Downloadjetpack-prototype-build-pr21623-83a65be.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 28, 2025

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr21623-83a65be
Commit83a65be
Direct Downloadwordpress-prototype-build-pr21623-83a65be.apk
Note: Google Login is not supported on these builds.

@@ -174,7 +174,7 @@
#
# @return [void]
#
lane :download_metadata_strings do |app: nil, version: current_release_version, skip_release_notes: false, skip_commit: false, skip_git_push: false|
lane :download_metadata_strings do |app: nil, version: current_release_version, skip_release_notes: false, skip_commit: false|
Copy link
Contributor

Choose a reason for hiding this comment

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

skip_git_push is still mentioned in the comments above, and I noticed it is still used here 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @iangmaia !

still mentioned in the comments above
addressed in 2cee795

I noticed it is still used here 🤔
Here's another instance in which I wish Ruby was compiled... addressed in 83a65be

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm did you push these commits?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I did... now that you mentioned it 😳

@@ -173,6 +173,7 @@

update_frozen_strings_for_translation
download_translations
download_metadata_strings(version: current_release_version)
Copy link
Contributor

Choose a reason for hiding this comment

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

Downloading store metadata when generating beta build should provide earlier feedback on the metadata translation

👍

@oguzkocer oguzkocer modified the milestones: 25.7, 25.8 Jan 28, 2025
@nbradbury nbradbury closed this Jan 28, 2025
@nbradbury nbradbury deleted the mokagio/download-metadata-during-beta branch January 28, 2025 19:53
@mokagio mokagio restored the mokagio/download-metadata-during-beta branch January 28, 2025 22:10
@mokagio
Copy link
Contributor Author

mokagio commented Jan 28, 2025

@nbradbury 👋 I'm reopening this PR because we need the fix it implements during the release process.

@oguzkocer I'm going to make it target the release branch, so that we can see if the next beta submission has the release notes that we expect.

@mokagio mokagio reopened this Jan 28, 2025
@mokagio mokagio changed the base branch from trunk to release/25.7 January 28, 2025 22:12
@oguzkocer oguzkocer modified the milestones: 25.8, 25.7 ❄️ Jan 28, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Jan 28, 2025

1 Warning
⚠️ This PR is assigned to the milestone 25.7 ❄️. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@mokagio mokagio requested a review from iangmaia January 28, 2025 22:15
@mokagio mokagio enabled auto-merge (squash) January 28, 2025 22:16
@nbradbury
Copy link
Contributor

I'm reopening this PR because we need the fix it implements during the release process.

@mokagio Apologies, I did not intend to delete that branch. I was cleaning up stale branches and apparently got carried away!

Copy link
Contributor

@iangmaia iangmaia left a comment

Choose a reason for hiding this comment

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

👍

@mokagio mokagio merged commit fc089de into release/25.7 Jan 28, 2025
22 checks passed
@mokagio mokagio deleted the mokagio/download-metadata-during-beta branch January 28, 2025 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants