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)
Fri, Nov 1, 7:53 PM
Unknown Object (File)
Fri, Nov 1, 6:13 PM
Unknown Object (File)
Wed, Oct 30, 2:07 PM
Unknown Object (File)
Wed, Oct 30, 2:53 AM
Unknown Object (File)
Mon, Oct 28, 9:59 PM
Unknown Object (File)
Sun, Oct 27, 10:37 AM
Unknown Object (File)
Sat, Oct 26, 1:55 PM
Unknown Object (File)
Fri, Oct 25, 8:35 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
Branch
arcpatch-D12758 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

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."