Page MenuHomePhabricator

[native] Don't call handleReduxMigrationFailure for legacy migrations
ClosedPublic

Authored by ashoat on May 7 2024, 8:00 PM.
Tags
None
Referenced Files
F3253607: D11928.id39939.diff
Fri, Nov 15, 7:15 PM
F3252190: D11928.diff
Fri, Nov 15, 6:06 PM
Unknown Object (File)
Sun, Nov 10, 10:55 AM
Unknown Object (File)
Sun, Nov 10, 10:28 AM
Unknown Object (File)
Sun, Nov 10, 9:32 AM
Unknown Object (File)
Sun, Nov 10, 12:08 AM
Unknown Object (File)
Mon, Oct 21, 8:01 AM
Unknown Object (File)
Oct 11 2024, 12:21 AM
Subscribers

Details

Summary

@kamil explains this well in D11887. Most calls to unshimClientDB (all except for the new one introduced in that diff) get passed an older version of the Redux state, where cookie is a top-level field instead of being inside the KeyserverStore.

This diff changes the default behavior of unshimClientDB so that it clears that top-level field, instead of calling handleReduxMigrationFailure, which assumes that the cookie field has been migrated to inside the KeyserverStore.

Passing this as a third param might not be the most ideal way of doing this, but it's consistent with how we do it elsewhere.

Test Plan
  1. Flow
  2. Careful review of the code
  3. Observation that the same approach is already used elsewhere in the codebase

I considered trying to run the actual migrations, but they are very old and this would be rather time-consuming and likely to have issues. The change here is simple enough that I think the above three things, plus code review should be sufficient

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/migrations
Lint
No Lint Coverage
Unit
No Test Coverage