-
Notifications
You must be signed in to change notification settings - Fork 9
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
Remove skip_glotpress
and related cleanup
#443
Remove skip_glotpress
and related cleanup
#443
Conversation
lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb
Outdated
Show resolved
Hide resolved
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.
@iangmaia Thanks for the PR. Took a quick look but then got pre-empted by another task so couldn't finish my review, so I'll just submit the few comments / thoughts I wrote but note that this is not a full review yet 😅 I'll try to look into it in more details tomorrow or the next day.
I liked that you added tests, though I wonder if they might not be testing more the implementation details than the final results? Though it's a tricky balance to find, also because most of the actions you're testing involve git operations (including push) and we definitively want to mock them. But still, I wondered what your thoughts were on that.
Also it feels like this PR packs many different things. I don't mind having a single PR to add the tests and do the changes, that makes sense, but I wonder if some of the small changes in that PR unrelated to the action removal—e.g. the small refactorings like env_project_root()
instead of ENV['PROJDCT_ROOT_FOLDER']
etc—couldn't have been extracted in a separate PR stacked/built on top of this one, to not mix refactorings and removal of deprecated code.
Again, that's sometimes a tough balance to find because if the refactorings are very small renaming that doesn't warrant a dedicated PR just for so little. But my first impression when I read the PR and the PR description was "wow, 4 different things packed in one single PR" and then the diff shown by GitHub doesn't always help (depending on how it chooses to decide where to split the diffs of added/removed lines) + me being EOD already… probably didn't help 😄 Yet, if you think splitting in the changes in separate PR is doable and makes sense to you, then please do.
And of course, given the breakcrumbs of comments I left already (about Deliverfile
and maybe more of the code also being obsolete), we will likely have subsequent PRs to also clean some more anyway, so…
lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb
Outdated
Show resolved
Hide resolved
# | ||
def self.commit_version_bump(include_deliverfile: true, include_metadata: true) | ||
files_list = [File.join(ENV['PROJECT_ROOT_FOLDER'], 'config', '.')] | ||
def self.commit_version_bump(include_deliverfile: true) |
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.
Thought: at that point I'm also wondering if the commit_version_bump
is going to be useful very long.
I'm not sure we have many projects left that contain the version number as part of their Deliverfile
(and that thus gets bumped there) instead of the more modern way we have of doing it in client projects that don't involve the version to be in Deliverfile
anymore.
If we get rid of that too in a subsequent PR very soon, we won't need the include_deliverfile
either, which will make that helper method kinda pointless if the remaining of its implementation is just "commit ./config/* files" (and that path to ./config/*.xcconfig
should not be assumed/hardcoded in that helper anyway…)
Definitively not for this PR because its scope is already large enough, but to keep in mind in a subsequent cleanup after this lands (or stacked on top)
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.
Got it! Yes, definitely for a subsequent PR. This is something more obviously in another domain as we're not talking about removing deprecated localisation related code, but anyway, relates to the affected files, thanks for pointing it out 👍
@AliSoftware thanks for the feedback, looking forward to the rest but this already gives me a few things to think about 🙂
It's indeed a tricky balance to find. I actually thought about this after sending the PR. My general line of thought, in this case, was that the dependencies could have their own unit tests and that these were unit tests for the method/action logic (checking the different scenarios, error cases, how data was going out to dependencies, etc) as opposed to something closer to an integration test (e.g. focused more on final results with all or mostly the real dependencies).
To me each change kinda led to the next one and they're all related (but not strictly dependent, as you point out) -- this small refactoring of
Yes, when I checked the comment on Deliverfile, this made even more sense. I agree it's a difficult balance sometimes, and different teams / companies may have different "thresholds" on what is considered a big PR or not. As I said, in the beginning I thought "everything is related, so fine to keep it here", but the fact that they are independent changes with different goals is a good argument to split them into different PRs, IMO. So I'm now thinking of keeping changes 1 & 2 here in this PR (so the main work fixing the issue is here) and 3 & 4 & any further cleanups can go to their own PRs. |
37868dd
to
32d3d8e
Compare
If there's time left in the trial, it might be fun to remove |
In regards to PR size and scope
It's a bit of a science and a bit of an art, isn't it? I find that in the context of a highly-distributed, async-first team like ours, it's best to err on the size of smaller PRs, ideally independent and parallel ones. When the feedback cycle on a PR can take a full day because of the relative location of author and reviewer, having a single PR with various items in it might result in all the items being blocked from merging because of an issue found in only one of them. Splitting them allows unrelated changes not to block each other. |
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.
Overall looks good, nice isolated PR, and adding tests that we were crucially missing 👍
I guess the next step will be to continue the cleanup by getting back on Gio's Draft PR you found earlier, then lastly check there are no other leftovers (of the our old way of relying on scripts that were expected to be in the client repo) to clean up after all that.
I'll let @mokagio confirm (here on or the P2 where you asked the question) if the blocker for his Draft PR back in the day (PocketCasts-iOS) is now lifted and let him tell you if it makes sense for you to take over his Draft PR 🙂
I like that rationale, great answer, and I agree 👍
Sounds like a good plan 👍 |
Thanks for your comments, @mokagio.
That would be interesting, yes, I hope there will be some time left 😬
Exactly, very good point -- larger PRs can potentially take much longer to be merged due to eventual issues found in the review, specially in an async fashion. |
Pocket Casts iOS no longer uses the legacy APIs. @iangmaia I don't think you can push to #370 directly not being a contributor. Maybe it's easier to cherry-pick those changes and make a new PR from there. Or, given #370 is showing conflicts, only look at the diff as a starting point. |
EDIT:
The initial PR had a few other related changes, but independent, so we decided to break it down into smaller PRs built on top of this one. See Related PRs.
What does it do?
1️⃣ Removes the
skip_glotpress
parameter from theios_bump_version_release
actionFixing #372, this PR goes on the route of completely removing the
skip_glotpress
config item, given the latest localisation tooling doesn't rely on a localdownload_metadata.swift
in the hosted project anymore.2️⃣ Adds basic tests to
ios_bump_version_release
In order to test the changes, a suite of basic unit tests were added to the
ios_bump_version_release
action.Related PRs
Checklist before requesting a review
bundle exec rubocop
to test for code style violations and recommendationsspecs/*_spec.rb
) if applicablebundle exec rspec
to run the whole test suite and ensure all your tests passCHANGELOG.md
file to describe your changes under the approprioate existing###
subsection of the existing## Trunk
section.