Page MenuHomePhabricator

[services] Tunnelbroker - Removing the old API
ClosedPublic

Authored by max on Nov 10 2022, 7:27 AM.
Tags
None
Referenced Files
F3509244: D5596.id18791.diff
Sat, Dec 21, 2:51 AM
F3509236: D5596.id18584.diff
Sat, Dec 21, 2:46 AM
F3509224: D5596.id18564.diff
Sat, Dec 21, 2:40 AM
F3509036: D5596.diff
Sat, Dec 21, 12:38 AM
Unknown Object (File)
Thu, Dec 19, 9:35 PM
Unknown Object (File)
Thu, Dec 19, 9:35 PM
Unknown Object (File)
Thu, Dec 19, 9:35 PM
Unknown Object (File)
Thu, Dec 19, 9:35 PM

Details

Summary

This diff removes the old legacy API methods from the Tunnelbroker API including the proto file and calls from the native codebase.
Old legacy API methods that should be removed:

  • CheckIfPrimaryDeviceOnline
  • BecomeNewPrimaryDevice
  • SendPong

These methods were added prior 0.1 and are not used anymore.

These diff changes take place in:

  • The protobuff file and its generated ones - by removing the API calls;
  • Native C++ network client-related codebase - by removing the API-related methods;
  • Tunnelbroker Rust gRPC server - by removing the empty handlers for the old API.

Linear task: ENG-1334

Test Plan

Services and native iOS and Android builds are successful.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

max held this revision as a draft.
max retitled this revision from [services] Tunnelbroker - Removing deprecated gRPC API to [services] Tunnelbroker - Removing the old API from the native client.Nov 18 2022, 4:14 AM

Removing the old API calls from the native client and network side.

max edited the test plan for this revision. (Show Details)
max edited reviewers, added: atul, tomek; removed: jon.

Removing the old API from the Tunnelbroker's gRPC Rust handlers.

max retitled this revision from [services] Tunnelbroker - Removing the old API from the native client to [services] Tunnelbroker - Removing the old API.Nov 18 2022, 4:32 AM
max edited the summary of this revision. (Show Details)
max published this revision for review.Nov 18 2022, 4:38 AM

Removing of the old structs from the protofile.

tomek added inline comments.
native/android/app/src/cpp/GlobalNetworkSingletonJNIHelper.cpp
1–8 ↗(On Diff #18593)

I'm wondering if it makes sense to keep these empty files. On one hand we might need them again at some point, but reintroducing them shouldn't be expensive and maybe it is a better idea to delete them now.

services/tunnelbroker/src/server/mod.rs
46–47 ↗(On Diff #18593)

Is this comment still relevant?

Didn't do a super thorough review, but looks reasonable.

native/android/app/src/cpp/GlobalNetworkSingletonJNIHelper.cpp
1–8 ↗(On Diff #18593)

Agree that it'd be better to remove file altogether... it can always be found in the git history in the future if needed.

At a minimum I think we can remove GlobalNetworkSingleton.h since it's no longer being used?

This revision is now accepted and ready to land.Nov 21 2022, 2:22 PM
max added inline comments.
native/android/app/src/cpp/GlobalNetworkSingletonJNIHelper.cpp
1–8 ↗(On Diff #18593)

I'm wondering if it makes sense to keep these empty files.

it can always be found in the git history in the future if needed.

I'm thinking the same, we can always roll back in a git, so it's not a problem to remove it now.

At a minimum I think we can remove GlobalNetworkSingleton.h since it's no longer being used?

Yes, the GlobalNetworkSingleton.h and network-related C++ code is removed because it uses reactors and C++ gRPC which is removed later.

services/tunnelbroker/src/server/mod.rs
46–47 ↗(On Diff #18593)

Is this comment still relevant?

Yep, I'll remove it along with the send and get in a following D5684.

max marked 2 inline comments as done.

Rebasing on master.