Skip to content

Remove deprecated, unused actions #337

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

Merged
merged 7 commits into from
Feb 9, 2022

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented Feb 7, 2022

A little cleanup in preparation for the 3.0.0 release, see #334 (comment).

All the removed actions were unused in our projects (WordPress, WooCommerce, Simplenote, and PocketCasts. I don't have access to Day One and AFAIK Tumblr doesn't yet use the release toolkit), or used only in Simplenote Android which is currently paused.

There's another deprecated action still in the codebase: ios_localized_project. It's used in WooCommerce (e.g. here) and Simplenote (which is less pressing because that's on pause).

I've decided not to remove it to make the 3.0.0 adoption easier. I think Buildkite trigger support and trunk as default are useful things that we should rollout ASAP, and wouldn't want the friction —hoverer small— of addressing the ios_localized_project deprecation to block that.

@mokagio mokagio force-pushed the remove-deprecated-actions branch from b454157 to 45d20b7 Compare February 7, 2022 08:58
@mokagio mokagio marked this pull request as draft February 7, 2022 09:00
@mokagio mokagio changed the title Remove deprecated android_merge_translators_strings and ios_merge_translators_strings actions Remove deprecated, unused actions Feb 7, 2022
I also verified that this wasn't used in WordPress, WooCommerce, or
Simplenote.
I verified that is not used in WordPress, WooCommerce, or Simplenote.
Interestingly, neither is the suggested alternative,
`ios_merge_strings_file`.
@mokagio mokagio force-pushed the remove-deprecated-actions branch from 45d20b7 to fdc15c4 Compare February 7, 2022 09:14
@mokagio mokagio requested a review from a team February 7, 2022 09:33
@mokagio mokagio marked this pull request as ready for review February 7, 2022 09:34
Copy link
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

Don't forget to remove the helper method associated with the action as well 🙃

def self.run(params)
require_relative '../../helper/android/android_git_helper'

Fastlane::Helper::Android::GitHelper.update_metadata(ENV['validate_translations'])
Copy link
Contributor

Choose a reason for hiding this comment

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

The corresponding method in the android_git_helper.rb should also be removed in parallel to removing the action.

Note that this helper method is also marked as @todo so the fact that you missed it makes me wonder if you used case-sensitive search when looking for TODOs/FIXMEs. We should definitively try to be consistent in using @TODO/@FIXME in all uppercase everywhere (I think that's the ruby convention?) but 🤷‍♂️


PS: As a bonus it would be nice to remove the ./tools/update-translations.sh script (which is the script the update_matadata helper ends up calling) from client repos in parallel to that PR

Copy link
Contributor Author

@mokagio mokagio Feb 8, 2022

Choose a reason for hiding this comment

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

@mokagio mokagio requested a review from AliSoftware February 8, 2022 10:50
#
# @deprecated This method is only used by the `ios_localize_project` action, which is itself deprecated
# in favor of the new `ios_generate_strings_file_from_code` action
# @todo [Next Major] Remove this method once we fully remove `ios_localize_project`
Copy link
Contributor

@AliSoftware AliSoftware Feb 8, 2022

Choose a reason for hiding this comment

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

Isn't ios_localize_project still used though (not for long, but until we finish our work on the Localization Tooling Modernization and finally migrate all client apps to the new actions)?

There's another deprecated action still in the codebase: ios_localized_project. It's used in WooCommerce (e.g. here) and Simplenote (which is less pressing because that's on pause).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ouch! I'm so glad we have code review 😓

I did run the tests after removing this, but I guess it was a naive of just being happy with that given how old this code is.

@mokagio mokagio requested a review from AliSoftware February 8, 2022 19:09
@mokagio mokagio dismissed AliSoftware’s stale review February 9, 2022 10:18

Dismissing because the changes have been implemented.

Copy link
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

All good now 🎉 :shipit:

@AliSoftware AliSoftware merged commit 1668708 into release/3.0.0 Feb 9, 2022
@AliSoftware AliSoftware deleted the remove-deprecated-actions branch February 9, 2022 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants