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)
Wed, Nov 20, 3:48 PM
Unknown Object (File)
Mon, Nov 18, 3:54 PM
Unknown Object (File)
Fri, Nov 1, 5:26 AM
Unknown Object (File)
Fri, Oct 25, 7:04 PM
Unknown Object (File)
Oct 4 2024, 12:08 AM
Unknown Object (File)
Oct 2 2024, 11:52 AM
Unknown Object (File)
Oct 2 2024, 11:52 AM
Unknown Object (File)
Oct 2 2024, 11:52 AM
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.