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)
Tue, Sep 3, 9:10 PM
Unknown Object (File)
Fri, Aug 16, 2:49 AM
Unknown Object (File)
Aug 7 2024, 11:43 PM
Unknown Object (File)
Aug 5 2024, 11:42 PM
Unknown Object (File)
Aug 5 2024, 11:42 PM
Unknown Object (File)
Aug 5 2024, 11:42 PM
Unknown Object (File)
Aug 5 2024, 11:42 PM
Unknown Object (File)
Aug 5 2024, 11:42 PM
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."