Page MenuHomePhabricator

Update protos to follow style guide
ClosedPublic

Authored by bartek on Dec 21 2023, 9:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 8:42 AM
Unknown Object (File)
Mon, Dec 23, 8:42 AM
Unknown Object (File)
Mon, Dec 23, 8:42 AM
Unknown Object (File)
Mon, Dec 23, 8:42 AM
Unknown Object (File)
Mon, Dec 23, 8:41 AM
Unknown Object (File)
Mon, Dec 23, 8:41 AM
Unknown Object (File)
Mon, Dec 23, 5:44 AM
Unknown Object (File)
Sat, Dec 21, 9:56 PM
Subscribers

Details

Summary

Resolves ENG-5651.
Made our protos follow the Style Guide.

WARNING: This is a breaking change! Fortunately, we don't use protos in prod yet, except keyserver cron job to update reserved usernames. Hopefully, format of that message hasn't been changed here, so at least in theory it should be fine.
NOTE: grpc-web codegen will be updated in the next diff, once we agree on casing here (this is very cumbersome to update each time)
Test Plan

Built identity, tunnelbroker, commtest, grpc_clients, rust-node-addon and native-rust-library. All CI jobs should pass.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Dec 21 2023, 10:50 AM

I have some questions inline

shared/protos/identity_authenticated.proto
63–64 ↗(On Diff #34916)

IIRC we agreed on consistently using one of prekeys or pre_keys, but I don't remember which one it was. I'll update this diff to make this consistent across all places, now they're both mixed

shared/protos/identity_client.proto
21–26 ↗(On Diff #34916)

@varun, you asked in the Linear comment to rename login to log_in.
I renamed only RPC calls, left request/response messages unchanged.

My reasoning is that "log in" is a verb (RPC call), and "login" is a noun (a message type). I'm not a native though so correct me if I'm wrong, I'm happy to fix these as well

87–93 ↗(On Diff #34916)
222 ↗(On Diff #34916)

I also recall that we decided to use "device ID" in our codebase and "signing public key" only in Olm-related places so I renamed it here

Oops, my inline comments are in the previous revision so adding again here

shared/protos/identity_authenticated.proto
63–64 ↗(On Diff #34917)

IIRC we agreed on consistently using one of prekeys or pre_keys, but I don't remember which one it was. I'll update this diff to make this consistent across all places, now they're both mixed

shared/protos/identity_client.proto
21–26 ↗(On Diff #34917)

@varun, you asked in the Linear comment to rename login to log_in.
I renamed only RPC calls, left request/response messages unchanged.

My reasoning is that "log in" is a verb (RPC call), and "login" is a noun (a message type). I'm not a native though so correct me if I'm wrong, I'm happy to fix these as well

87–93 ↗(On Diff #34917)
222 ↗(On Diff #34917)

I also recall that we decided to use "device ID" in our codebase and "signing public key" only in Olm-related places so I renamed it here

varun added inline comments.
shared/protos/identity_authenticated.proto
63–64 ↗(On Diff #34917)

the whitepaper uses prekey so we should use that i think

shared/protos/identity_client.proto
21–26 ↗(On Diff #34917)

your reasoning is correct!

222 ↗(On Diff #34917)

good call

Fortunately, we don't use protos in prod yet, except keyserver cron job to update reserved usernames. Hopefully, format of that message hasn't been changed here, so at least in theory it should be fine.

Will we need to "sync" deploys of keyserver and Comm services after landing this diff?

shared/protos/identity_authenticated.proto
63–64 ↗(On Diff #34917)

I'd agree with this. We got this from Signal, which uses "prekey" (eg. here)

This revision is now accepted and ready to land.Dec 22 2023, 7:22 AM

Fortunately, we don't use protos in prod yet, except keyserver cron job to update reserved usernames. Hopefully, format of that message hasn't been changed here, so at least in theory it should be fine.

Will we need to "sync" deploys of keyserver and Comm services after landing this diff?

In theory, we shouldn't have to, as this RPC hasn't been changed, but it's a good idea to do so anyway. I'll ping a heads-up on "Releases and beyond" when landing this

Renamed pre_key -> prekey and PreKey -> Prekey

This revision was landed with ongoing or failed builds.Jan 9 2024, 1:23 AM
This revision was automatically updated to reflect the committed changes.