Repository navigation
Conversation
This change was necessary because of the 'androidx.lifecycle' update to '2.4.1' and the fact that with it the 'lifecycle-process' now uses 'androidx.startup' to initialize the 'ProcessLifecycleOwner'. As such removing all initializers are no longer an option, as it will also remove the 'ProcessLifecycleInitializer' initializer. Instead removing only the default 'WorkManagerInitializer', while keeping the rest with the 'tools:node="merge"' option, is recommended for when using a custom configuration. For more info visit: - https://developer.android.com/topic/libraries/architecture/ workmanager/advanced/custom-configuration - https://developer.android.com/jetpack/androidx/releases/ lifecycle#2.4.1
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
You can test the Jetpack changes on this Pull Request by downloading an installable build (jetpack-installable-build-pr16876-39b88d3.apk), or scanning this QR code: |
|
You can test the WordPress changes on this Pull Request by downloading an installable build (wordpress-installable-build-pr16876-39b88d3.apk), or scanning this QR code: |
ashiagr
left a comment
There was a problem hiding this comment.
Thank you for this investigation and the fix @ParaskP7, it was actually a tricky one! I am an accomplice in not having caught it in my review. 🙈
I tested post/ page/ stories upload and publishing and found them working in this PR.
Regarding your regression note:
there might be other initializer apart from WorkManagerInitializer (that is removed anyway), and ProcessLifecycleInitializer (that is needed), which we might want removed as well.
I searched for initializers and found only two WorkManagerInitilizer and ProcessLifecycleInitializer being used currently:
so seems like we're safe as of now to remove only WorkManagerInitilizer and keep the only remaining initializer which is ProcessLifecycleInitializer.
I can also see that ProcessLifecycleOwner is being used in AppInitializer to auto-start uploads using UploadStarter and for uploading media for stories.
I tested both these areas and found them working. I can't think of any other area that might be affected because of the changes and so giving my approval.
Thanks once again, for a quick investigation!
|
👋 @ashiagr ! Thank you so much for reviewing and testing this PR, you are awesome! 🥇 🙇
Oh nice, and yes, that gives me extra confidence that this change is safe indeed, thanks for searching for the available initializers like you did, nice thinking! ❤️ 💯 |
|
Thank you @ParaskP7 for working on this! I tested the following using a Redmi Note 8T:
LGTM! Nice work 👏 |
|
👋 @geriux ! This is awesome, thank you so much for reviewing and testing this PR as well! 🥇 🙇 |
Generated by 🚫 dangerJS |
|
Closing in favor of #16881 that includes these changes. |


Fixes #16867
This PR fixes the story regression.
This change was necessary because of the
androidx.lifecycleupdate to2.4.1and the fact that with it thelifecycle-processnow usesandroidx.startupto initialize theProcessLifecycleOwner. This definitely caused an issue with theStories Uploadingfunctionality, but it might also have caused other issues as well.As such removing all initializers are no longer an option, as it will also remove the
ProcessLifecycleInitializerinitializer. Instead removing only the defaultWorkManagerInitializer, while keeping the rest with thetools:node="merge"option, is recommended for when using a custom configuration.For more info visit:
PS.1: This is the PR and its specific commit that introduced this story regression.
PS.2: You will find more details about this story's regression investigation in this Slack discussion here:
C011BKNU1V5/p1657026365958239To test:
My Sitemain screen tab click on the 🔵 FAB button on the bottom right.Store postto compose and publish a story. Make sure the story isuploadingas well aspublished.Blog postto compose and publish a post. Make sure the post isuploadingas well aspublished.Page pageto compose and publish a page. Make sure the page isuploadingas well aspublished.PostsandPagesrelated screen and verify that everything works as expected.uploading,startuporwork managerrelated functionality.Regression Notes
By removing only the default initializer (using
merge) vs. removing all initializers (usingremove) there might be other initializer apart fromWorkManagerInitializer(that isremovedanyway), andProcessLifecycleInitializer(that is needed), which we might want removed as well. Thus, by not having them removed this might potentially caused us additional issues. 🤔See
To testsection above.N/A
PR submission checklist:
RELEASE-NOTES.txtif necessary.