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)
Mar 5 2024, 3:34 PM
Unknown Object (File)
Mar 5 2024, 3:34 PM
Unknown Object (File)
Mar 5 2024, 3:34 PM
Unknown Object (File)
Mar 5 2024, 3:34 PM
Unknown Object (File)
Mar 5 2024, 3:34 PM
Unknown Object (File)
Mar 5 2024, 3:34 PM
Unknown Object (File)
Jan 4 2024, 11:44 PM
Unknown Object (File)
Dec 30 2023, 12:48 AM
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.