Page MenuHomePhabricator

Rename `LegacyRoleInfo` to `ClientLegacyRoleInfo`
ClosedPublic

Authored by atul on Feb 6 2024, 10:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 11:56 AM
Unknown Object (File)
Thu, Nov 14, 7:48 PM
Unknown Object (File)
Thu, Nov 14, 5:39 PM
Unknown Object (File)
Wed, Nov 13, 10:52 AM
Unknown Object (File)
Oct 25 2024, 6:01 PM
Unknown Object (File)
Oct 4 2024, 1:12 AM
Unknown Object (File)
Oct 4 2024, 1:12 AM
Unknown Object (File)
Oct 4 2024, 1:12 AM
Subscribers
None

Details

Summary

This is to make room for a ServerLegacyRoleInfo type which will be introduced in the next diff.

The motivation for introducing ServerLegacyRoleInfo is described here: https://phab.comm.dev/D10105#316443

I modified this diff before landing to only modify RoleInfo (formerly MinimallyEncodedRoleInfo) since I figured we could ignore LegacyRoleInfo going forward...

However, as I previously realized and then forgot, we DO need the specialRole field LegacyRoleInfo because on the keyserver we're still constructing Legacy "everything" and then POSSIBLY minimally encoding for new clients. So we'll need specialRole in the LegacyRoleInfo that's being initially constructed so it's available when being converted to RoleInfo.

That said, we will never want a LegacyRoleInfo with specialRole on ANY client because that would lead to issues with validation. So what we'll want to do is:

  1. Introduce ServerLegacyRoleInfo to be used by keyserver to handle fetching from database, etc
  2. Based on codeVersion check either

Old clients: strip out specialRole field to go from ServerLegacyRoleInfo -> ClientLegacyRoleInfo
New clients: minimallyEncode* ServerLegacyRoleInfo -> RoleInfo WHILE RETAINING specialRole field.

Test Plan

This diff is just a straightforward rename. flow and will test validators later in the stack.

Diff Detail

Repository
rCOMM Comm
Branch
arcpatch-D10106 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage