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
F2149039: D9660.id.diff
Sun, Jun 30, 6:58 AM
Unknown Object (File)
Sat, Jun 29, 3:31 PM
Unknown Object (File)
Tue, Jun 25, 2:55 PM
Unknown Object (File)
Thu, Jun 13, 12:33 AM
Unknown Object (File)
Tue, Jun 11, 8:47 PM
Unknown Object (File)
May 31 2024, 4:41 AM
Unknown Object (File)
May 24 2024, 5:45 PM
Unknown Object (File)
May 13 2024, 8:13 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
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.