Skip to content

Update compileSdkVersion (from 29 to 31) for All Modules - #16891

Merged
oguzkocer merged 4 commits into
trunkfrom
build/update-compile-sdk-version-to-31
Jul 22, 2022
Merged

oguzkocer merged 4 commits into
trunkfrom
build/update-compile-sdk-version-to-31

Conversation

@ParaskP7

Copy link
Copy Markdown
Contributor

Parent #16562

This PR updates the compileSdkVersion (from 29 to 31) for all modules. No changes were needed to make this update possible. compileSdkVersion = 31 is the default and root level compileSdkVersion that all modules should be pointing to from now. This is done in order to make sure that there is no discrepancy in relation to compile SDK versions being different for different modules. Also, and just as an FYI, for minSdkVersion and targetSdkVersion this is already the case.

Obviously, the main WordPress module was already pointing to compileSdkVersion = 31, but so was the image-editor module. As such, the below 4 remaining modules got updated in the end:

  • mocks
  • analytics
  • networking
  • editor

To test:

  • Smoke test the app.
    • For the mocks module, you could run the UI Tests and verify correctness.
    • For the analytics module, you could launch the app and verify that you see the 🔵 Tracked: logs in logcat.
    • For the networking module, you could launch the app and verify that Reader -> DISCOVER tab works as expected (pull-to-refresh, scrolling and pagination, etc).
    • For the editor module, you could launch the app and add a new Post/Story post and Site page.

Regression Notes

  1. Potential unintended areas of impact

App is not compiling as expected.

  1. What I did to test those areas of impact (or what existing automated tests I relied on)

See To test section above.

  1. 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.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

ParaskP7 added 4 commits July 12, 2022 11:50
PS: No changes were needed to make this update possible.

This is the default and root level 'compileSdkVersion' that all modules
should be pointing to from now.

This is done in order to make sure that there is no discrepancy in
relation to compile SDK versions being different for different modules.

Also, and just as an FYI, for 'minSdkVersion' and 'targetSdkVersion'
this is already the case.
PS: No changes were needed to make this update possible.

This is the default and root level 'compileSdkVersion' that all modules
should be pointing to from now.

This is done in order to make sure that there is no discrepancy in
relation to compile SDK versions being different for different modules.

Also, and just as an FYI, for 'minSdkVersion' and 'targetSdkVersion'
this is already the case.
PS: No changes were needed to make this update possible.

This is the default and root level 'compileSdkVersion' that all modules
should be pointing to from now.

This is done in order to make sure that there is no discrepancy in
relation to compile SDK versions being different for different modules.

Also, and just as an FYI, for 'minSdkVersion' and 'targetSdkVersion'
this is already the case.
PS: No changes were needed to make this update possible.

This is the default and root level 'compileSdkVersion' that all modules
should be pointing to from now.

This is done in order to make sure that there is no discrepancy in
relation to compile SDK versions being different for different modules.

Also, and just as an FYI, for 'minSdkVersion' and 'targetSdkVersion'
this is already the case.
@ParaskP7 ParaskP7 added this to the 20.4 milestone Jul 12, 2022
@ParaskP7
ParaskP7 requested a review from oguzkocer July 12, 2022 09:20
@ParaskP7 ParaskP7 self-assigned this Jul 12, 2022
@peril-wordpress-mobile

Copy link
Copy Markdown

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

@wpmobilebot

Copy link
Copy Markdown
Contributor
You can test the WordPress changes on this Pull Request by downloading an installable build (wordpress-installable-build-pr16891-2e7b516.apk), or scanning this QR code:

@wpmobilebot

Copy link
Copy Markdown
Contributor
You can test the Jetpack changes on this Pull Request by downloading an installable build (jetpack-installable-build-pr16891-2e7b516.apk), or scanning this QR code:

@ParaskP7 ParaskP7 modified the milestones: 20.4, 20.5, Future Jul 22, 2022
@ParaskP7

Copy link
Copy Markdown
Contributor Author

I am shameless pinging you again on this PR review @oguzkocer as I am not sure if you missed it by now. 😊 If you don't have the capacity to review this PR at this point, or even next week, just let me know and I'll make sure to assign it to a WPAndroid engineer instead. 🙏

PS: This is not urgent, not at all, so don't feel the need to get it done asap. I just pinged you to make sure that you are aware of it. 🙇

@oguzkocer oguzkocer modified the milestones: Future, 20.4 Jul 22, 2022

@oguzkocer oguzkocer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ParaskP7 I was sick when you opened this PR and it looks like I missed it when I got back. Sorry about that!

P.S: Similar to an earlier feedback I've shared, in my opinion 4 commits where each commit change a single line for the exact same thing (compileSdkVersion) is counter productive.

@oguzkocer
oguzkocer merged commit 6462fe6 into trunk Jul 22, 2022
@oguzkocer
oguzkocer deleted the build/update-compile-sdk-version-to-31 branch July 22, 2022 18:57
@ParaskP7

Copy link
Copy Markdown
Contributor Author

@ParaskP7 I was sick when you opened this PR and it looks like I missed it when I got back. Sorry about that!

Hey, please don't apologize @oguzkocer , not at all, I was totally aware of that, I was just making sure that this was still on your radar for exactly this reason. This wasn't urgent so it could have waited anyway. Thank you for doing the review and actually merging it to trunk! ❤️ 🤗 🙇

P.S: Similar to an earlier feedback I've shared, in my opinion 4 commits where each commit change a single line for the exact same thing (compileSdkVersion) is counter productive.

First of all, thank you so much for sharing your feedback on my commits and structure, please keep them coming, they are totally welcome as I am always trying to become better and more productive when it comes to that! ❤️

Secondly, and please take this will me be curious about it and trying to understand the feedback more so that trying to fight it, so, are 4 commit counter productive for (a) the author, (b) the reviewer or (c) the engineers afterwards (who are going to come back to this and read the change)?

  • For (a) the author, I can say that adding an extra commit per change, is a 5'' secs work as, and in case everything works out as expected, then I am just updating the module name in the title (from ie mocks to analytics) and then create a new commit.
  • For (b) the reviewer, I can understand that, but to me this still depends on whether you are doing the review using the GitHub interface, an IDE (like AS) or a Git client (Sourcetree). Me, doing almost always my reviews on the IDE (AS), I find it easy to just navigate up and down the commits, select all to start with and see the overall change, then I start again, selecting commit-by-commit to review the individual commit. However, I understand, doing the same from the GitHub interface, where one needs to open each commit as a link separate, might not feel as productive due to the waiting time for each commit webpage to load.
  • For (c) the engineers afterwards, I feel that if they are stuck on a particular problem and then use blame (Git Annotate) to figure out when this change happened and why, they will be able to copy the revision number of that particular commit and see the change that is specific to this module, which isn't going to include other modules in it, thus making it easier to reason above, which if I may, I might even argue, feel more productive. And that's why I am actually choosing this approach usually (see more about it below).

Lastly, let me explain, without trying to convince you of anything, how I end up coming to that result, 4 commits instead of 1. When I started with that work, I didn't want to just change all compileSkdVersion for all modules, my style with this kind of changes, is to do them progressively. As such, I first picked the mocks module, which felt the easier one. I did the change on that module first and then built, linted and finally tested it. When I verified that everything worked as expected, I committed this change.

I didn't want to keep that change (commit) hanging for two reasons:

  • The work for updating compileSkdVersion for the mocks module is done, everything works, this work will not related to the other modules somehow, so I felt the right action is to commit it. I am in favor of frequent and atomic commits.
  • Updating the next module in line (ie analytics), in addition to the one-liner change, might have introduced code updates, compilation errors, new warnings, runtime errors, etc. If it would, I wouldn't want them to be included with the mocks change, but only as part of the analytics change.

As you can see from my above process, I didn't just create 4 commits and tested the end results, I was testing as I was progressing, which each commit going in, per module. Does this makes sense to you? Or would you have tested just the end result, just like the reviewer would do afterwards anyway, in the hope that everything is working as expected with the final change on all 4 modules and no further changes will be required afterwards anyway? 🤔

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.

3 participants