Page MenuHomePhabricator

[lib] Update `convertClientDBThreadInfoToRawThreadInfo` to validate `RoleInfo`s
ClosedPublic

Authored by atul on Dec 12 2023, 12:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 15, 9:19 PM
Unknown Object (File)
Tue, Oct 15, 9:19 PM
Unknown Object (File)
Tue, Oct 15, 9:19 PM
Unknown Object (File)
Tue, Oct 15, 9:19 PM
Unknown Object (File)
Tue, Oct 15, 9:19 PM
Unknown Object (File)
Tue, Oct 15, 9:19 PM
Unknown Object (File)
Mon, Oct 14, 6:32 PM
Unknown Object (File)
Mon, Oct 14, 3:06 PM
Subscribers
None

Details

Summary

Similarly to D10298, this addresses what we learned when testing D10297 that it's important that we validate the stringified JSON that we retrieve from ClientDBThreadInfo. Specifically, it's possible for ClientDBThreadInfo to have either stringified MinimallyEncodedRoleInfos or LegacyEncodedRoleInfos stored in the .roles field, and we should A. valdidate that the data is correctly formed B. determine which format the data is in.


Depends on D10298

Test Plan

Will be tested along with changes in D10297 and D10298

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul published this revision for review.Dec 12 2023, 12:13 PM
atul added inline comments.
lib/utils/thread-ops-utils.js
61–80 ↗(On Diff #34537)

Will rebase and update this diff and D10298 based on feedback from D10298 I'm just seeing now:

ea0cad.png (760×1 px, 148 KB)

This revision is now accepted and ready to land.Dec 12 2023, 7:05 PM

shorter invariant message

This revision was landed with ongoing or failed builds.Dec 13 2023, 1:34 PM
This revision was automatically updated to reflect the committed changes.