Page MenuHomePhabricator

[Tunnelbroker] add message to set Device Token with Platform
ClosedPublic

Authored by kamil on Jul 30 2024, 3:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 7, 1:43 PM
Unknown Object (File)
Sat, Sep 7, 1:43 PM
Unknown Object (File)
Fri, Sep 6, 6:43 AM
Unknown Object (File)
Thu, Sep 5, 7:29 AM
Unknown Object (File)
Wed, Sep 4, 10:58 PM
Unknown Object (File)
Sun, Sep 1, 4:45 AM
Unknown Object (File)
Sun, Sep 1, 4:44 AM
Unknown Object (File)
Sun, Sep 1, 4:43 AM
Subscribers

Details

Summary

ENG-8903.

Adding a new message type, we can't modify the previous because of backward compatibility - this makes it easier to achieve what we want.

Depends on D12911

Test Plan

Tests

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jul 30 2024, 5:36 AM
bartek added inline comments.
shared/tunnelbroker_messages/src/messages/message_to_tunnelbroker.rs
12–20 ↗(On Diff #42950)

This is useful! I guess we might want to move this enum to comm-lib soon, as a part of https://linear.app/comm/issue/ENG-8904/stop-sending-device-type-in-device-key-upload

And use it instead of the proto enum for metadata

cc @marcin

34–38 ↗(On Diff #42950)

Do we need this trait? Isn't Display and .to_string() enough?

39–46 ↗(On Diff #42950)

There's dedicated FromStr trait for this: https://doc.rust-lang.org/std/str/trait.FromStr.html

address review

shared/tunnelbroker_messages/src/messages/message_to_tunnelbroker.rs
34–38 ↗(On Diff #42950)

It is, this some leftover

39–46 ↗(On Diff #42950)

right

This revision is now accepted and ready to land.Jul 31 2024, 3:45 AM