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
Unknown Object (File)
Mon, Jun 24, 10:43 AM
Unknown Object (File)
Sun, Jun 23, 5:50 AM
Unknown Object (File)
Fri, Jun 21, 9:28 AM
Unknown Object (File)
Wed, Jun 19, 2:28 AM
Unknown Object (File)
Tue, Jun 11, 4:04 PM
Unknown Object (File)
Fri, Jun 7, 6:55 PM
Unknown Object (File)
Fri, Jun 7, 6:55 PM
Unknown Object (File)
Fri, Jun 7, 6:55 PM
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!