Page MenuHomePhabricator

[lib] Compare only entities from one keyserver when checking the inconsistencies
ClosedPublic

Authored by tomek on Feb 27 2024, 5:23 AM.
Tags
None
Referenced Files
F3387631: D11183.diff
Fri, Nov 29, 10:28 AM
Unknown Object (File)
Wed, Nov 13, 12:51 PM
Unknown Object (File)
Wed, Nov 13, 12:51 PM
Unknown Object (File)
Wed, Nov 13, 12:51 PM
Unknown Object (File)
Wed, Nov 13, 12:49 PM
Unknown Object (File)
Wed, Nov 13, 12:39 PM
Unknown Object (File)
Thu, Nov 7, 10:15 PM
Unknown Object (File)
Oct 10 2024, 11:47 AM
Subscribers

Details

Summary

We don't want to report inconsistencies when there are entities from different keyserver - only the ones from a keyserver performing state check should be compared.

https://linear.app/comm/issue/ENG-3915/refactor-generating-a-response-to-serverrequesttypescheck-state

Depends on D11182

Test Plan

Tests

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested review of this revision.Feb 27 2024, 5:38 AM
atul added inline comments.
lib/shared/state-sync/threads-state-sync-spec.test.js
174 ↗(On Diff #37648)

In earlier diffs we decided to use eg threadTypes.PRIVATE instead of literal for "readability" when pasting Redux state into unit tests.

Don't feel strongly personally, but figure it makes sense to be consistent.

This revision is now accepted and ready to land.Feb 27 2024, 1:19 PM
michal requested changes to this revision.Feb 28 2024, 6:00 AM
michal added inline comments.
lib/shared/state-sync/entries-state-sync-spec.test.js
56 ↗(On Diff #37648)

If we hardcode the current data into the entries but use defaultCalendarQuery here won't that mean that in a ~month we will just start filtering all entries and the tests will always pass?

This revision now requires changes to proceed.Feb 28 2024, 6:00 AM

Resigning so I won't block landing. I don't there should be any problems with fixing the tests.

This revision is now accepted and ready to land.Feb 28 2024, 8:17 AM

Use thread type const.
Update entries test by adding explicit calendar query from the past - the test failed as expected. Updated the dates in entries, which fixed the tests.

lib/shared/state-sync/entries-state-sync-spec.test.js
56 ↗(On Diff #37648)

Great find! Going to fix it

lib/shared/state-sync/threads-state-sync-spec.test.js
174 ↗(On Diff #37648)

Makes sense!