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)
Sat, Nov 30, 8:23 AM
Unknown Object (File)
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
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
Branch
sockets
Lint
No Lint Coverage
Unit
No Test Coverage

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

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

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

Great find! Going to fix it

lib/shared/state-sync/threads-state-sync-spec.test.js
174

Makes sense!