Page MenuHomePhabricator

[native] Avoid crashing Redux migration if inviteLinksStore isn't initialized
ClosedPublic

Authored by ashoat on Sep 13 2023, 10:00 AM.
Tags
None
Referenced Files
F3140688: D9186.diff
Sun, Nov 3, 5:09 AM
Unknown Object (File)
Tue, Oct 29, 9:33 AM
Unknown Object (File)
Tue, Oct 22, 5:17 PM
Unknown Object (File)
Tue, Oct 22, 5:12 PM
Unknown Object (File)
Tue, Oct 22, 9:10 AM
Unknown Object (File)
Tue, Oct 22, 9:10 AM
Unknown Object (File)
Tue, Oct 22, 9:10 AM
Unknown Object (File)
Tue, Oct 22, 5:04 AM
Subscribers
None

Details

Summary

Normally we'd add a migration to initialize inviteLinksStore, but we can't add a migration before existing ones. Instead, I'll perform this migration step right before it's needed in migration 43.

Depends on D9185

Test Plan
  1. I checked out the latest codeVersion before migration 43: mobile-v1.0.238
  2. I deleted the Android app from the Android emulator
  3. I removed inviteLinksStore from default-state.js to simulate the effects of not having it in the store
    • To avoid this, I could have checked out an even older codeVersion, but I decided to do it this way since sometimes older codeVersions don't run anymore
  4. I ran the Android app just to set up the Redux store, and then I killed it
  5. I then went back to master + this diff and its parent
  6. I ran the app and confirmed that the issue no longer occurs. Migration 43 succeeded, but then migration 51 crashed (tracked in ENG-4930)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable