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)
Thu, Mar 20, 4:09 AM
Unknown Object (File)
Sat, Mar 1, 11:13 AM
Unknown Object (File)
Sat, Mar 1, 10:56 AM
Unknown Object (File)
Sat, Mar 1, 10:56 AM
Unknown Object (File)
Sat, Mar 1, 10:56 AM
Unknown Object (File)
Sat, Mar 1, 9:35 AM
Unknown Object (File)
Feb 16 2025, 6:39 PM
Unknown Object (File)
Feb 2 2025, 4:50 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.