Page MenuHomePhabricator

[native] Redux migration to support minimally encoded permissions
ClosedPublic

Authored by atul on Dec 11 2023, 4:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 3, 9:58 AM
Unknown Object (File)
Tue, Nov 26, 7:26 PM
Unknown Object (File)
Nov 23 2024, 4:56 AM
Unknown Object (File)
Nov 23 2024, 4:51 AM
Unknown Object (File)
Nov 23 2024, 4:33 AM
Unknown Object (File)
Nov 6 2024, 1:54 PM
Unknown Object (File)
Oct 25 2024, 6:30 PM
Unknown Object (File)
Oct 25 2024, 6:16 PM
Subscribers
None

Details

Summary

Redux migration that pulls out existing RawThreadInfos from SQLite DB, "migrates" them to MinimallyEncodedRawThreadInfos (if they aren't already, but we're assuming they aren't), and then translates them back to ClientDBThreadInfo which gets persisted back into SQLite.

I'm fairly sure the logic in this migration is correct, but I still need to do additional testing. In initial testing I found some incorrect logic in convertClientDBThreadInfoToRawThreadInfo that was a little tricky because flow trusts that anything you JSON.parse(...) is the type you assign it to, which isn't always the case... Like with keyserverDB, we need to be careful about what external "raw string data" we're bringing "into the application." I will fix the logic errors, write some tests, and add some runtime validators to make sure the interface between "raw string data" stored in SQLite DB and our application is robust. I'll also just do another pass of the ClientDBThreadInfo <=> RawThreadInfo code to make sure everything is correct.


Depends on D10296

Test Plan

Will run through migration and ensure that before/after is as expected. I found the issue mentioned in the description during this testing:

Screenshot 2023-12-11 at 6.46.32 PM.png (1×2 px, 946 KB)

Will make sure this migration is fully working before unmarking as DRAFT and definitely before landing.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul published this revision for review.Dec 11 2023, 4:11 PM
This revision is now accepted and ready to land.Dec 11 2023, 8:34 PM
atul retitled this revision from [DRAFT][native] Redux migration to support minimally encoded permissions to [native] Redux migration to support minimally encoded permissions.Dec 14 2023, 12:57 PM