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, Dec 18, 1:49 AM
Unknown Object (File)
Wed, Dec 18, 1:49 AM
Unknown Object (File)
Wed, Dec 18, 1:49 AM
Unknown Object (File)
Wed, Dec 18, 1:49 AM
Unknown Object (File)
Wed, Dec 18, 1:49 AM
Unknown Object (File)
Sun, Dec 1, 11:22 PM
Unknown Object (File)
Nov 20 2024, 11:56 AM
Unknown Object (File)
Nov 14 2024, 7:48 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable