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
F1633903: 689785.png
Mon, Apr 22, 1:28 PM
F1633901: 96324a.png
Mon, Apr 22, 1:28 PM
Unknown Object (File)
Mon, Apr 8, 3:52 PM
Unknown Object (File)
Apr 2 2024, 3:21 PM
Unknown Object (File)
Apr 1 2024, 2:14 AM
Unknown Object (File)
Mar 31 2024, 4:24 PM
Unknown Object (File)
Mar 28 2024, 7:42 PM
Unknown Object (File)
Mar 26 2024, 2:18 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.Mon, Apr 22, 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)