Page MenuHomePhabricator

[lib] Introduce `memberInfoSansPermissionsValidator` and consume in `rawThreadInfoValidator`
ClosedPublic

Authored by atul on Jul 15 2024, 12:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 7:16 AM
Unknown Object (File)
Thu, Dec 19, 7:16 AM
Unknown Object (File)
Thu, Dec 19, 7:16 AM
Unknown Object (File)
Thu, Dec 19, 7:16 AM
Unknown Object (File)
Thu, Dec 19, 7:16 AM
Unknown Object (File)
Wed, Dec 11, 5:22 AM
Unknown Object (File)
Wed, Dec 4, 7:09 PM
Unknown Object (File)
Mon, Dec 2, 2:15 AM
Subscribers
None

Details

Summary

Introducing validator, unit tests, and consuming in rawThreadInfoValidator which fixes the validator test case which was failing.

This also expands validator so it'll support memberInfos both with and without permissions.


Depends on D12756

Test Plan

Unit tests

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul published this revision for review.Jul 15 2024, 1:04 PM

It looks like these validators are used on both the keyserver and the client. It's appropriate for use on the keyserver, which needs to continue supporting older clients.

But it's inappropriate for use on the client, where we don't expect the keyserver to ever respond with the legacy format.

Would love if we could separate these out into two kinds of validators, but it's probably too much work for @atul at this point.

This revision is now accepted and ready to land.Jul 17 2024, 12:17 PM

But it's inappropriate for use on the client, where we don't expect the keyserver to ever respond with the legacy format.

We actually will use this validator on the client. Specifically in convertClientDBThreadInfoToRawThreadInfo where we validate the RawThreadInfo persisted on client. Have a diff that consumes it on client in local stack.


EDIT: To clarify we will consume memberInfoSansPermissionsValidator on the client.

Going to go ahead and try cherry-picking this onto master to fix the failing validator unit test and get rest of stack "more green."