Page MenuHomePhabricator

[keyserver] Move merging of updates to a spec
ClosedPublic

Authored by tomek on Oct 31 2023, 9:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 21, 2:09 PM
Unknown Object (File)
Mon, Dec 16, 8:03 PM
Unknown Object (File)
Mon, Dec 16, 8:03 PM
Unknown Object (File)
Mon, Dec 16, 8:03 PM
Unknown Object (File)
Sat, Dec 14, 8:08 PM
Unknown Object (File)
Fri, Dec 13, 9:52 PM
Unknown Object (File)
Fri, Dec 13, 7:54 PM
Unknown Object (File)
Wed, Dec 11, 6:11 PM
Subscribers

Details

Summary

Introduce a const into specs defining which updates should be merged.

Depends on D9659

Test Plan

Generate some updates, reintroduce old code, and compare new with old result using _.isEqual.

Diff Detail

Repository
rCOMM Comm
Branch
master7
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil added inline comments.
keyserver/src/creators/update-creator.js
539–540 ↗(On Diff #32560)

I am not sure if it is possible to have updates that weren't listed in the previous condition, but if we need to add a check to early return when typesOfReplacedUpdatesForMatchingKey is null

lib/shared/updates/update-spec.js
90–93 ↗(On Diff #32560)
This revision is now accepted and ready to land.Nov 3 2023, 2:54 AM
keyserver/src/creators/update-creator.js
539–540 ↗(On Diff #32560)

We can't do that because if !currentUpdateInfo we want to keep an update regardless of its type - it means that it's the first update with this key and we don't want to replace it.