woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
257 stars 108 forks source link

[Dashboard] Remove `WaitingTimeTracker` to avoid crash #12616

Closed selanthiraiyan closed 2 weeks ago

selanthiraiyan commented 2 weeks ago

Closes: #12610

Description

Remove WaitingTimeTracker usage from DashboardViewModel to avoid a thread related crash.

This WaitingTimeTracker usage from DashboardViewModel will be removed as part of this PR https://github.com/woocommerce/woocommerce-ios/pull/12602. But to avoid bringing that large PR as a beta fix I am raising this PR which only removes WaitingTimeTracker usage from DashboardViewModel.

Internal - p1714405823152069-slack-C03L1NF1EA3

Testing instructions

Smoke test that the Dashboard or My Store screen works as expected.

Screenshots

NA


dangermattic commented 2 weeks ago
1 Warning
:warning: This PR is assigned to the milestone 18.4 ❄️. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by :no_entry_sign: Danger

wpmobilebot commented 2 weeks ago

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr12616-5e9a4a2
Version18.4
Bundle IDcom.automattic.alpha.woocommerce
Commit5e9a4a29808bb132ac510d693a1cd88b19fd8a9b
App Center BuildWooCommerce - Prototype Builds #8905

Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

selanthiraiyan commented 2 weeks ago

I just see also another WaitingTimeTracker in StorePerformanceViewModel.

We can keep that, as it doesn't create any threading-related crashes. It looks like the idea is to keep a WaitingTimeTracker for each analytics related card view model like TopPerformersDashboardViewModel and StorePerformanceViewModel. Previously this used to live in DashboardViewModel.

pmusolino commented 2 weeks ago

I see the unit tests failing

selanthiraiyan commented 2 weeks ago

I see the unit tests failing

Cherry picking a commit from this PR to fix unit tests. https://github.com/woocommerce/woocommerce-ios/pull/12594

selanthiraiyan commented 2 weeks ago

@rachelmcr 👋 Could you kindly release a new beta build? Thank you! 🙇

rachelmcr commented 2 weeks ago

Could you kindly release a new beta build?

Beta version 18.4.0.1 has been released on TestFlight, with these changes. 👍