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)
Mon, Mar 31, 1:34 AM
Unknown Object (File)
Thu, Mar 20, 4:09 AM
Unknown Object (File)
Mar 1 2025, 11:13 AM
Unknown Object (File)
Mar 1 2025, 10:56 AM
Unknown Object (File)
Mar 1 2025, 10:56 AM
Unknown Object (File)
Mar 1 2025, 10:56 AM
Unknown Object (File)
Mar 1 2025, 9:35 AM
Unknown Object (File)
Feb 16 2025, 6:39 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

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
This revision is now accepted and ready to land.Nov 3 2023, 2:54 AM
keyserver/src/creators/update-creator.js
539–540

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.