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

[Tooling/Fastlane] Delete unused helpers #13965

Merged
merged 2 commits into from
Feb 18, 2021
Merged

Conversation

AliSoftware
Copy link
Contributor

@AliSoftware AliSoftware commented Feb 4, 2021

Part of wordpress-mobile/release-toolkit#204

This only removes the helpers that were either unused or are already present in release-toolkit.

Does not seem like much of a diff, but that change required me to compare each helper from this repo with the helpers from release-toolkit to ensure that even if they diverged over time and the diff wasn't empty, removing the local copies would not break anything.

For this first step I let the helpers and actions related to screenshots as they seem to only be present in WPAndroid. A separate step / PR will move those remaining ones into the release-toolkit and then remove them from the WPAndroid repo, but that's a larger piece of work (especially for screenshots we still need repo-specific files locally, like the .ini files, so the split won't be that trivial if we want it to be flexible and adapt to multiple repos in the future)

To test:

  • Ensure the various actions still work (they should use the helpers from the release-toolkit now)

@AliSoftware AliSoftware requested a review from a team February 4, 2021 13:40
@AliSoftware AliSoftware self-assigned this Feb 4, 2021
@AliSoftware AliSoftware requested review from oguzkocer, jkmassel and loremattei and removed request for a team February 4, 2021 13:40
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Feb 4, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Feb 4, 2021

You can test the changes on this Pull Request by downloading the APK here.

Copy link
Contributor

@loremattei loremattei left a comment

Choose a reason for hiding this comment

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

Removing android_git_helper and android_version_helper look good to me. I briefly tested it on a modified version of new_beta_release and it worked as expected.

I can't find android_virtual_device_helper.rb in release-toolkit tho 🤔 Am I blind or missing something?

@AliSoftware
Copy link
Contributor Author

I can't find android_virtual_device_helper.rb in release-toolkit tho 🤔 Am I blind or missing something?

It's not, but iirc it's also not used anywhere (at least I couldn't find a reference to any of the methods in that helper anywhere in WPiOS, but would love a confidence check on that too)

@jkmassel
Copy link
Contributor

iirc it's also not used anywhere

It looks like it's used in TakeAndroidEmulatorScreenshotsAction still, though it's quite possible that they could be replaced by things built into fastlane at some point?

@AliSoftware
Copy link
Contributor Author

AliSoftware commented Feb 12, 2021

It looks like it's used in TakeAndroidEmulatorScreenshotsAction still, though it's quite possible that they could be replaced by things built into fastlane at some point?

Ah! You're right indeed! Not sure how I missed it (my guess is because there was multiple modules in that file, which is unusual and not idiomatic in Ruby, I might have only searched for references of the first one… 🤷 )… thank god for peer reviews! 😉

Fixed, so we should be all good now!

@AliSoftware
Copy link
Contributor Author

Note: the Detekt linter failure is not coming from this PR, and in fact also fails in develop. [p1613163870090800/1613130377.085000-slack-C02QANACA]

Copy link
Contributor

@jkmassel jkmassel left a comment

Choose a reason for hiding this comment

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

This is ok in my view – I've verified both these helpers are now present over in the release toolkit (and freshly refactored!)

IMHO we can leave it to @JavonDavis to press merge on this, since he'd be the one dealing with any breakage 😁

(including when we open just the fastlane/ subfolder in RubyMine…)
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Feb 17, 2021

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

@AliSoftware
Copy link
Contributor Author

AliSoftware commented Feb 17, 2021

I've rebased the branch on top of develop to fix the CI issue during lint, so should soon be green again.

@JavonDavis please merge whenever you're ready (and CI is green) 🙂 – preferably before next release so you can test the changes on it

@AliSoftware AliSoftware added this to the 16.8 milestone Feb 17, 2021
@JavonDavis JavonDavis merged commit 4c523d0 into develop Feb 18, 2021
@JavonDavis JavonDavis deleted the fastlane-cleanup/step1 branch February 18, 2021 14:36
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.

4 participants