Page MenuHomePhabricator

DRAFT [lib/native/web] introduce migration to populate community store
Changes PlannedPublic

Authored by ginsu on Feb 28 2024, 12:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 4, 7:01 PM
Unknown Object (File)
Thu, Apr 4, 6:43 PM
Unknown Object (File)
Tue, Apr 2, 9:43 AM
Unknown Object (File)
Mar 13 2024, 4:27 AM
Unknown Object (File)
Mar 11 2024, 5:21 AM
Unknown Object (File)
Mar 4 2024, 2:41 PM
Unknown Object (File)
Mar 4 2024, 11:29 AM
Unknown Object (File)
Mar 2 2024, 1:30 PM
Subscribers

Details

Reviewers
None
Summary

Native migration is still having issues, wanted to put this diff up tho since other diffs will depend on this
To populate our new community store we need to create a script that will add all the threads that are community root to this store

Linear task: https://linear.app/comm/issue/ENG-7056/create-script-to-populate-community-store-with-all-the-threads-that

Depends on D11190

Test Plan

Confirmed web worked + native is still having some issues...

Will update test plan when out of draft stage

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu retitled this revision from [lib/native/web] introduce migration to populate community store to DRAFT [lib/native/web] introduce migration to populate community store.Feb 28 2024, 12:19 AM
ginsu edited the summary of this revision. (Show Details)
ginsu edited the test plan for this revision. (Show Details)
ginsu edited the summary of this revision. (Show Details)
ginsu published this revision for review.Feb 28 2024, 12:28 AM
ginsu planned changes to this revision.

native migration not working correctly

I know it's in progress but I want to flag two things early, could be helpful.

web/redux/persist.js
59

we don't need that - communityStore should only be on SQLite, this whitelist is for redux-persist

on the other hand, we should add communityStore to persistBlacklist on native

273

This code looks okay but it's not enough, in D10826 there is some context on what the state of threads persists on the web.

In short:
When we have threads in DB we use it (and that's the case where your migration works).
When we don't have threads we get them from InitialReduxStateResponder here and dispatch them to the store. So I think you also have to make changes here to compute communityStore based on threads from keyserver received in InitialReduxStateResponder