Page MenuHomePhabricator

[web] start persisting `updatesCurrentAsOf`
ClosedPublic

Authored by kamil on Nov 22 2023, 4:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 7:55 PM
Unknown Object (File)
Tue, Nov 26, 5:27 PM
Unknown Object (File)
Mon, Nov 18, 4:52 PM
Unknown Object (File)
Mon, Nov 18, 3:41 PM
Unknown Object (File)
Thu, Nov 7, 10:48 PM
Unknown Object (File)
Thu, Nov 7, 8:12 PM
Unknown Object (File)
Wed, Nov 6, 8:41 AM
Unknown Object (File)
Wed, Nov 6, 8:41 AM
Subscribers

Details

Summary

Some context is here: ENG-5316.

We want to use the proper timestamp to allow the app to receive updates for data that will be stored in SQLite and longer received on initial load using getInitialReduxStateResponder.

This is a breaking change that could cause some issues, so launching this only for staff for now, putting this function in lib because later in the stack it is used also on a keyserver.

Test Plan
  1. For non-staff users make sure updatesCurrentAsOf is updated on each reload
  2. For staff users, make sure it's persisted and updated after receiving an update
  3. Check if the policies mechanism still works (it was connected, we used this to fetch all data after acknowledgment).

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Nov 22 2023, 5:56 AM
lib/shared/web-database.js
6 ↗(On Diff #33481)

Why is this in lib instead of web?

lib/shared/web-database.js
6 ↗(On Diff #33481)

As I said in the summary in the paragraph about staff: "putting this function in lib because later in the stack it is used also on a keyserver" - but I probably should've added also inline comment 😄

On keyserver, it's used to differentiate return the entire state vs return only data that is not in the database in InitialReduxStateResponder.

This revision is now accepted and ready to land.Nov 23 2023, 12:54 AM
This revision was automatically updated to reflect the committed changes.
web/redux/persist.js
267

You missed updating this type, but the new Flow caught it

web/redux/persist.js
267