woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
277 stars 135 forks source link

Revert DataStore library version #12891

Closed ThomazFB closed 2 weeks ago

ThomazFB commented 2 weeks ago

Summary

Fix issue https://github.com/woocommerce/woocommerce-android/issues/12867 by reverting the DataStore library version back to 1.0.0.

During the project migration to the Version Catalog, we ended up migrating the DataStore from 1.0.0 to 1.1.0. Unfortunately, this upgrade introduced a current known bug from the library to our app.

To fix it, this PR reverts the app back to the version prior to the Version Catalog migration one month ago.

How to Test

Currently, 90% of the app's reliance on DataStore is related to Analytics and Stats. To properly test this downgrade, I recommend verifying if the Analytics Hub, My Store Stats, and Top Performers are all working as expected.

Update release notes:

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

dangermattic commented 2 weeks ago
1 Warning
:warning: This PR is assigned to the milestone 21.1. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by :no_entry_sign: Danger

wpmobilebot commented 2 weeks ago

Project dependencies changes

The following changes in project dependencies were detected (configuration vanillaReleaseRuntimeClasspath):

list ``` Removed Dependencies androidx.datastore:datastore-android:1.1.0 androidx.datastore:datastore-core-android:1.1.0 androidx.datastore:datastore-core-okio:1.1.0 androidx.datastore:datastore-core-okio-jvm:1.1.0 androidx.datastore:datastore-preferences-android:1.1.0 androidx.datastore:datastore-preferences-core-jvm:1.1.0 Upgraded Dependencies androidx.datastore:datastore:1.0.0, (changed from 1.1.0) androidx.datastore:datastore-core:1.0.0, (changed from 1.1.0) androidx.datastore:datastore-preferences:1.0.0, (changed from 1.1.0) androidx.datastore:datastore-preferences-core:1.0.0, (changed from 1.1.0) ```
tree ```diff -+--- androidx.datastore:datastore-preferences:1.1.0 -| \--- androidx.datastore:datastore-preferences-android:1.1.0 -| +--- androidx.datastore:datastore:1.1.0 -| | \--- androidx.datastore:datastore-android:1.1.0 -| | +--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*) -| | +--- androidx.datastore:datastore-core:1.1.0 -| | | \--- androidx.datastore:datastore-core-android:1.1.0 -| | | +--- androidx.annotation:annotation:1.7.0 -> 1.8.0 (*) -| | | +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.22 -> 1.9.25 -| | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*) -| | | | \--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.9.25 -| | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*) -| | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.25 (*) -| | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3 -> 1.8.1 (*) -| | | +--- androidx.datastore:datastore:1.1.0 (c) -| | | +--- androidx.datastore:datastore-core-okio:1.1.0 (c) -| | | +--- androidx.datastore:datastore-preferences:1.1.0 (c) -| | | \--- androidx.datastore:datastore-preferences-core:1.1.0 (c) -| | +--- androidx.datastore:datastore-core-okio:1.1.0 -| | | \--- androidx.datastore:datastore-core-okio-jvm:1.1.0 -| | | +--- androidx.datastore:datastore-core:1.1.0 (*) -| | | +--- com.squareup.okio:okio:3.4.0 -> 3.7.0 -| | | | \--- com.squareup.okio:okio-jvm:3.7.0 -| | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.21 -> 1.9.25 (*) -| | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.25 (*) -| | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3 -> 1.8.1 (*) -| | | +--- androidx.datastore:datastore:1.1.0 (c) -| | | +--- androidx.datastore:datastore-core:1.1.0 (c) -| | | +--- androidx.datastore:datastore-preferences:1.1.0 (c) -| | | \--- androidx.datastore:datastore-preferences-core:1.1.0 (c) -| | +--- com.squareup.okio:okio:3.4.0 -> 3.7.0 (*) -| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.25 (*) -| | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3 -> 1.8.1 (*) -| | +--- androidx.datastore:datastore-core:1.1.0 (c) -| | +--- androidx.datastore:datastore-core-okio:1.1.0 (c) -| | +--- androidx.datastore:datastore-preferences:1.1.0 (c) -| | \--- androidx.datastore:datastore-preferences-core:1.1.0 (c) -| +--- androidx.datastore:datastore-preferences-core:1.1.0 -| | \--- androidx.datastore:datastore-preferences-core-jvm:1.1.0 -| | +--- androidx.datastore:datastore-core:1.1.0 (*) -| | +--- androidx.datastore:datastore-core-okio:1.1.0 (*) -| | +--- com.squareup.okio:okio:3.4.0 -> 3.7.0 (*) -| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.25 (*) -| | +--- androidx.datastore:datastore:1.1.0 (c) -| | +--- androidx.datastore:datastore-core:1.1.0 (c) -| | +--- androidx.datastore:datastore-core-okio:1.1.0 (c) -| | \--- androidx.datastore:datastore-preferences:1.1.0 (c) -| +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.25 (*) -| +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3 -> 1.8.1 (*) -| +--- androidx.datastore:datastore:1.1.0 (c) -| +--- androidx.datastore:datastore-preferences-core:1.1.0 (c) -| +--- androidx.datastore:datastore-core:1.1.0 (c) -| \--- androidx.datastore:datastore-core-okio:1.1.0 (c) ++--- androidx.datastore:datastore-preferences:1.0.0 +| +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.10 -> 1.9.25 (*) +| +--- androidx.datastore:datastore:1.0.0 +| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.10 -> 1.9.25 (*) +| | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0 -> 1.8.1 (*) +| | +--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*) +| | \--- androidx.datastore:datastore-core:1.0.0 +| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.10 -> 1.9.25 (*) +| | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0 -> 1.8.1 (*) +| | \--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*) +| \--- androidx.datastore:datastore-preferences-core:1.0.0 +| +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.10 -> 1.9.25 (*) +| \--- androidx.datastore:datastore-core:1.0.0 (*) -+--- androidx.datastore:datastore:1.1.0 (*) ++--- androidx.datastore:datastore:1.0.0 (*) +--- com.automattic:Automattic-Tracks-Android:5.0.0 | \--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 -| \--- com.squareup.okio:okio:3.6.0 -> 3.7.0 (*) +| \--- com.squareup.okio:okio:3.6.0 -> 3.7.0 +| \--- com.squareup.okio:okio-jvm:3.7.0 +| \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.21 -> 1.9.25 (*) +--- org.wordpress:fluxc:2.99.1 -| \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.25 (*) +| \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.25 +| +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*) +| \--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.9.25 +| \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*) \--- org.wordpress:mediapicker:0.3.1 - \--- androidx.datastore:datastore-preferences:1.0.0 -> 1.1.0 (*) + \--- androidx.datastore:datastore-preferences:1.0.0 (*) ```
wpmobilebot commented 2 weeks ago
šŸ“² You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
PlatformāŒšļø Wear OS
FlavorJalapeno
Build TypeDebug
Commitc68f285c57cf174889b0003b0d80f3a28c7783b2
Direct Downloadwoocommerce-wear-prototype-build-pr12891-c68f285.apk
wpmobilebot commented 2 weeks ago

šŸ“² You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
PlatformšŸ“± Mobile
FlavorJalapeno
Build TypeDebug
Commitc68f285c57cf174889b0003b0d80f3a28c7783b2
Direct Downloadwoocommerce-prototype-build-pr12891-c68f285.apk
ParaskP7 commented 1 week ago

šŸ‘‹ @ThomazFB , thanks for the fix and apologies for the inconvenience! šŸ™ šŸ™‡

FYI: As part of the Version Catalogs migration I did warn (āš ļø) about such changes (see description), and also wrote a descriptive commit on it too, mentioning that WooCommerce and WooCommerce-Wear were using a different version of datastore, point to 1.0.0 and 1.1.0 correspondingly. I hope that with Version Catalogs we will avoid such inconsistencies going forward, along with all the potential problems this could create. šŸ˜ž

ThomazFB commented 1 week ago

Hey @ParaskP7, don't worry about that, and there is no need for apologies; this is not on you in any way; we can't predict that a small version bump of a library could introduce a shady crash like that one; this is a quality fault from the library itself. The Version Catalog was an amazing introduction to our app and thanks for all your work on that!