Page MenuHomePhabricator

[web] Redux migration to patch in `specialRole` field
ClosedPublic

Authored by atul on Feb 27 2024, 12:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 10:16 PM
Unknown Object (File)
Mon, Nov 25, 6:56 AM
Unknown Object (File)
Mon, Nov 25, 12:33 AM
Unknown Object (File)
Sun, Nov 24, 11:58 PM
Unknown Object (File)
Sun, Nov 24, 11:46 PM
Unknown Object (File)
Sun, Nov 24, 11:42 PM
Unknown Object (File)
Sun, Nov 24, 11:36 PM
Unknown Object (File)
Sun, Nov 24, 9:55 PM
Subscribers

Details

Summary

Same as D11099, but for web.


Depends on D11099

Test Plan
  1. See that specialRole field is missing before:

884de3.png (1×1 px, 310 KB)

  1. See that specialRole field is present after:

9f629f.png (1×1 px, 288 KB)

Add logging to migration to ensure that specialRole field is included and correctly formed:

4dc6d3.png (1×2 px, 498 KB)

Diff Detail

Repository
rCOMM Comm
Branch
arcpatch-D11188_2 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul requested review of this revision.Feb 27 2024, 12:24 PM
ginsu requested changes to this revision.Feb 27 2024, 11:44 PM

Question inline about updating version field

web/redux/persist.js
363 ↗(On Diff #37663)

Should this be updated too?

This revision now requires changes to proceed.Feb 27 2024, 11:44 PM
atul requested review of this revision.Feb 28 2024, 3:07 PM

Version will be bumped in "flip the switch" diff. native, web, and keyserver all need to be updated at the same time as a release.

tomek added 1 blocking reviewer(s): kamil.
tomek added inline comments.
web/redux/persist.js
315 ↗(On Diff #37663)

Does the returned state contain threads that are already "patched"?

kamil added inline comments.
web/redux/persist.js
315 ↗(On Diff #37663)

I don't think there are any threads in state which is a result of migration (threads are blacklisted)

Removing Ginsu as reviewer since he's OOO and feedback was addressed.

This revision is now accepted and ready to land.Mar 5 2024, 1:13 PM
web/redux/persist.js
363 ↗(On Diff #37663)

Gets bumped in "Flip the switch" diff

Looks like eg await databaseModule.isDatabaseSupported(); are no longer available, so this migration will need to be updated.

Will defer this until after hackathon since IMO that's probably higher priority right now.

rename databaseModule -> sharedWorker

web/redux/persist.js
462 ↗(On Diff #39351)

Will update similarly to migration 16 to address feedback about avoiding invariants.

keyserver/src/version.js
3 ↗(On Diff #39351)

Why do you need to bump this? We typically bump the web version in web/app.react.js in tandem

keyserver/src/version.js
3 ↗(On Diff #39351)

For the minCodeVersion check in rawThreadInfosFromServerThreadInfos.

Will update this diff to bump in app.react.js and remove invariants from migration before landing

remove version change from web migration

replace invariant in migration with null/undefined check, will re-test before landing

increment version after testing

atul marked 2 inline comments as done.Apr 22 2024, 1:14 PM

Did another test run and things appeared to work as expected.

Before:

96324a.png (312×822 px, 44 KB)

After:

689785.png (266×812 px, 40 KB)