Skip to content

Migrate to Track's experimentation #14128

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from
Open

Conversation

wzieba
Copy link
Contributor

@wzieba wzieba commented May 30, 2025

Closes: AINFRA-660

Description

Migrate to Track's experimentation and remove deprecated internal FluxC implementation. Additionally, remove any mention of external FluxC.

Testing information

There's no test steps required. Currently, there are no tests running for woocommerce and on trunk, ExPlat was not initialized.

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

wzieba added 3 commits May 30, 2025 14:03
Address breaking changes on `experimentation` module. It no longer depends on FluxC.
It's now handled by Automattic Track's library (`experimentation` module)
It doesn't have `fluxc` as dependency anymore. Remove obsolete inclusions for dependencies in `settings.gradle`
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 30, 2025

Project manifest changes for WooCommerce

The following changes in the WooCommerce's merged AndroidManifest.xml file were detected (build variant: vanillaRelease):

--- ./build/reports/diff_manifest/WooCommerce/vanillaRelease/base_manifest.txt	2025-06-02 09:35:23.485234325 +0000
+++ ./build/reports/diff_manifest/WooCommerce/vanillaRelease/head_manifest.txt	2025-06-02 09:35:33.735320467 +0000
@@ -697,12 +697,12 @@
             </intent-filter>
         </receiver>
 
-        <uses-library
-            android:name="androidx.window.extensions"
-            android:required="false" />
-        <uses-library
-            android:name="androidx.window.sidecar"
-            android:required="false" /> <!-- 'android:authorities' must be unique in the device, across all apps -->
+        <meta-data
+            android:name="io.sentry.auto-init"
+            android:value="false" />
+        <meta-data
+            android:name="io.sentry.breadcrumbs.user-interaction"
+            android:value="false" /> <!-- 'android:authorities' must be unique in the device, across all apps -->
         <provider
             android:name="io.sentry.android.core.SentryInitProvider"
             android:authorities="com.woocommerce.android.SentryInitProvider"
@@ -713,6 +713,13 @@
             android:exported="false"
             android:initOrder="200" />
 
+        <uses-library
+            android:name="androidx.window.extensions"
+            android:required="false" />
+        <uses-library
+            android:name="androidx.window.sidecar"
+            android:required="false" />
+
         <activity
             android:name="com.stripe.stripeterminal.internal.common.usb.UsbEventReceiverActivity"
             android:excludeFromRecents="true"
@@ -749,12 +756,6 @@
         <meta-data
             android:name="com.google.android.gms.version"
             android:value="@integer/google_play_services_version" />
-        <meta-data
-            android:name="io.sentry.auto-init"
-            android:value="false" />
-        <meta-data
-            android:name="io.sentry.breadcrumbs.user-interaction"
-            android:value="false" />
 
         <provider
             android:name="com.squareup.picasso.PicassoProvider"

Go to https://buildkite.com/automattic/woocommerce-android/builds/29607/canvas?sid=01972ffb-388d-4b88-aec3-779265a380f3, click on the Artifacts tab and audit the files.

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 30, 2025

Project manifest changes for WooCommerce-Wear

The following changes in the WooCommerce-Wear's merged AndroidManifest.xml file were detected (build variant: vanillaRelease):

--- ./build/reports/diff_manifest/WooCommerce-Wear/vanillaRelease/base_manifest.txt	2025-06-02 09:35:43.175399199 +0000
+++ ./build/reports/diff_manifest/WooCommerce-Wear/vanillaRelease/head_manifest.txt	2025-06-02 09:35:48.015439337 +0000
@@ -14,6 +14,7 @@
     <uses-permission android:name="android.permission.WAKE_LOCK" />
     <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.BLUETOOTH" />
 
     <queries>
         <intent>
@@ -29,7 +30,6 @@
         android:protectionLevel="signature" />
 
     <uses-permission android:name="com.woocommerce.android.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" />
-    <uses-permission android:name="android.permission.BLUETOOTH" />
 
     <application
         android:name="com.woocommerce.android.app.WooCommerceWear"
@@ -181,6 +181,13 @@
             </intent-filter>
         </activity>
 
+        <meta-data
+            android:name="io.sentry.auto-init"
+            android:value="false" />
+        <meta-data
+            android:name="io.sentry.breadcrumbs.user-interaction"
+            android:value="false" />
+
         <uses-library
             android:name="wear-sdk"
             android:required="false" />
@@ -324,13 +331,6 @@
             android:name="androidx.window.sidecar"
             android:required="false" />
 
-        <meta-data
-            android:name="io.sentry.auto-init"
-            android:value="false" />
-        <meta-data
-            android:name="io.sentry.breadcrumbs.user-interaction"
-            android:value="false" />
-
         <receiver
             android:name="androidx.profileinstaller.ProfileInstallReceiver"
             android:directBootAware="false"

Go to https://buildkite.com/automattic/woocommerce-android/builds/29607/canvas?sid=01972ffb-388d-4b88-aec3-779265a380f3, click on the Artifacts tab and audit the files.

@wpmobilebot
Copy link
Collaborator

Project dependencies changes

list
+ New Dependencies
io.sentry:sentry-android-navigation:7.17.0
io.sentry:sentry-compose-android:7.17.0

- Removed Dependencies
io.sentry:sentry-android:7.8.0
io.sentry:sentry-android-ndk:7.8.0
io.sentry:sentry-android-okhttp:7.8.0

! Upgraded Dependencies
com.automattic.tracks:crashlogging:6.0.3, (changed from 5.0.0)
com.automattic.tracks:experimentation:6.0.3, (changed from 5.0.0)
com.automattic:Automattic-Tracks-Android:6.0.3, (changed from 5.0.0)
io.sentry:sentry:7.17.0, (changed from 7.8.0)
io.sentry:sentry-android-core:7.17.0, (changed from 7.8.0)
io.sentry:sentry-android-fragment:7.17.0, (changed from 7.8.0)
io.sentry:sentry-bom:7.17.0, (changed from 7.8.0)
io.sentry:sentry-okhttp:7.17.0, (changed from 7.8.0)
tree
-+--- com.automattic.tracks:experimentation:5.0.0
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2 -> 1.8.1 (*)
-|    +--- org.wordpress:utils:2.3.0 -> 3.15.0 (*)
-|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21 -> 1.9.10 (*)
++--- com.automattic.tracks:experimentation:6.0.3
+|    +--- com.squareup.okhttp3:okhttp:4.12.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 -> 2.1.10 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21 -> 1.9.10 (*)
+|    +--- com.squareup.moshi:moshi:1.15.1
+|    |    +--- com.squareup.okio:okio:3.7.0 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21 -> 1.9.10 (*)
+|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 -> 1.8.1 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.24 -> 2.1.10 (*)
-+--- com.automattic:Automattic-Tracks-Android:5.0.0
-|    +--- androidx.annotation:annotation:1.1.0 -> 1.9.1 (*)
-|    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.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 -> 2.1.10 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21 -> 1.9.10 (*)
-|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21 -> 1.9.10 (*)
++--- com.automattic:Automattic-Tracks-Android:6.0.3
+|    +--- androidx.annotation:annotation:1.1.0 -> 1.9.1 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.24 -> 2.1.10 (*)
-+--- com.automattic.tracks:crashlogging:5.0.0
-|    +--- io.sentry:sentry-bom:7.8.0
-|    |    +--- io.sentry:sentry-android:7.8.0 (c)
-|    |    +--- io.sentry:sentry-android-fragment:7.8.0 (c)
-|    |    +--- io.sentry:sentry-android-okhttp:7.8.0 (c)
-|    |    +--- io.sentry:sentry-android-core:7.8.0 (c)
-|    |    +--- io.sentry:sentry-android-ndk:7.8.0 (c)
-|    |    +--- io.sentry:sentry:7.8.0 (c)
-|    |    \--- io.sentry:sentry-okhttp:7.8.0 (c)
-|    +--- io.sentry:sentry-android -> 7.8.0
-|    |    +--- io.sentry:sentry-android-core:7.8.0
-|    |    |    +--- io.sentry:sentry:7.8.0
-|    |    |    +--- androidx.lifecycle:lifecycle-process:2.2.0 -> 2.8.7 (*)
-|    |    |    +--- androidx.lifecycle:lifecycle-common-java8:2.2.0 -> 2.8.7 (*)
-|    |    |    \--- androidx.core:core:1.3.2 -> 1.13.1 (*)
-|    |    \--- io.sentry:sentry-android-ndk:7.8.0
-|    |         +--- io.sentry:sentry:7.8.0
-|    |         \--- io.sentry:sentry-android-core:7.8.0 (*)
-|    +--- io.sentry:sentry-android-okhttp -> 7.8.0
-|    |    +--- io.sentry:sentry:7.8.0
-|    |    +--- io.sentry:sentry-okhttp:7.8.0
-|    |    |    +--- io.sentry:sentry:7.8.0
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0 -> 1.9.10 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0 -> 1.9.10 (*)
-|    +--- io.sentry:sentry-android-fragment -> 7.8.0
-|    |    \--- io.sentry:sentry:7.8.0
-|    +--- androidx.annotation:annotation:1.1.0 -> 1.9.1 (*)
-|    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 (*)
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 -> 1.8.1 (*)
-|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21 -> 1.9.10 (*)
++--- com.automattic.tracks:crashlogging:6.0.3
+|    +--- io.sentry:sentry-bom:7.17.0
+|    |    +--- io.sentry:sentry-android-core:7.17.0 (c)
+|    |    +--- io.sentry:sentry-android-fragment:7.17.0 (c)
+|    |    +--- io.sentry:sentry-compose-android:7.17.0 (c)
+|    |    +--- io.sentry:sentry-okhttp:7.17.0 (c)
+|    |    +--- io.sentry:sentry:7.17.0 (c)
+|    |    \--- io.sentry:sentry-android-navigation:7.17.0 (c)
+|    +--- io.sentry:sentry-android-core -> 7.17.0
+|    |    +--- androidx.lifecycle:lifecycle-process:2.2.0 -> 2.8.7 (*)
+|    |    +--- androidx.lifecycle:lifecycle-common-java8:2.2.0 -> 2.8.7 (*)
+|    |    +--- androidx.core:core:1.3.2 -> 1.13.1 (*)
+|    |    \--- io.sentry:sentry:7.17.0
+|    +--- io.sentry:sentry-okhttp -> 7.17.0
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0 -> 1.9.10 (*)
+|    |    \--- io.sentry:sentry:7.17.0
+|    +--- io.sentry:sentry-android-fragment -> 7.17.0
+|    |    \--- io.sentry:sentry:7.17.0
+|    +--- io.sentry:sentry-compose-android -> 7.17.0
+|    |    +--- io.sentry:sentry:7.17.0
+|    |    +--- io.sentry:sentry-android-navigation:7.17.0
+|    |    |    \--- io.sentry:sentry:7.17.0
+|    |    \--- androidx.lifecycle:lifecycle-common-java8:2.2.0 -> 2.8.7 (*)
+|    +--- androidx.annotation:annotation:1.1.0 -> 1.9.1 (*)
+|    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 (*)
+|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 -> 1.8.1 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.24 -> 2.1.10 (*)
 \--- project :libs:cardreader
      \--- com.stripe:stripeterminal-taptopay:4.3.1
           \--- com.squareup.wire:wire-moshi-adapter:4.9.11
-               \--- com.squareup.moshi:moshi:1.15.0 -> 1.15.1
-                    +--- com.squareup.okio:okio:3.7.0 (*)
-                    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21 -> 1.9.10 (*)
+               \--- com.squareup.moshi:moshi:1.15.0 -> 1.15.1 (*)

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 30, 2025

📲 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
Commita5ebc4f
Direct Downloadwoocommerce-wear-prototype-build-pr14128-a5ebc4f.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 30, 2025

📲 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
Commita5ebc4f
Direct Downloadwoocommerce-prototype-build-pr14128-a5ebc4f.apk

@codecov-commenter
Copy link

codecov-commenter commented May 30, 2025

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 37.64%. Comparing base (9d4ca7b) to head (a5ebc4f).

Files with missing lines Patch % Lines
...org/wordpress/android/fluxc/utils/AppLogWrapper.kt 0.00% 4 Missing ⚠️
...n/kotlin/com/woocommerce/android/AppInitializer.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #14128      +/-   ##
============================================
- Coverage     37.69%   37.64%   -0.05%     
+ Complexity     8863     8852      -11     
============================================
  Files          1944     1941       -3     
  Lines        108601   108504      -97     
  Branches      14185    14178       -7     
============================================
- Hits          40932    40846      -86     
+ Misses        63932    63924       -8     
+ Partials       3737     3734       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from move_media_picker_source_wordpress_to_woocommerce to trunk June 2, 2025 09:25
Comment on lines -313 to -316
// Force Flipper to use the okhttp version defined in the fluxc module
// okhttp versions higher than 3.9.0 break handling for self-signed SSL sites
// See https://github.com/wordpress-mobile/WordPress-FluxC-Android/issues/919
exclude group: 'com.squareup.okhttp3'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We use okhttp in version 4.12 anyway, the exclusion and comment are no longer relevant.

import javax.inject.Singleton

@InstallIn(SingletonComponent::class)
@Module
class ExperimentationModule {
@Provides
@Singleton
fun provideExPlat(
experimentStore: ExperimentStore,
fun provideExperimentationRepository(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wzieba wzieba added the type: technical debt Represents or solves tech debt of the project. label Jun 2, 2025
@wzieba wzieba added this to the 22.6 milestone Jun 2, 2025
@wzieba wzieba requested a review from ParaskP7 June 2, 2025 09:31
@wzieba wzieba marked this pull request as ready for review June 2, 2025 09:31
@wzieba wzieba requested a review from a team as a code owner June 2, 2025 09:31
@wzieba wzieba requested review from kidinov and removed request for a team June 2, 2025 09:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: technical debt Represents or solves tech debt of the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants