Page MenuHomePhabricator

[web] start persisting `updatesCurrentAsOf`
ClosedPublic

Authored by kamil on Nov 22 2023, 4:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 6, 8:41 AM
Unknown Object (File)
Wed, Nov 6, 8:41 AM
Unknown Object (File)
Wed, Nov 6, 8:41 AM
Unknown Object (File)
Wed, Nov 6, 8:37 AM
Unknown Object (File)
Sat, Oct 26, 8:32 AM
Unknown Object (File)
Sep 28 2024, 9:30 PM
Unknown Object (File)
Sep 28 2024, 9:30 PM
Unknown Object (File)
Sep 28 2024, 9:30 PM
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