Page MenuHomePhabricator

[services] Tunnelbroker - Expose `isSandbox` to the Rust
ClosedPublic

Authored by max on Nov 16 2022, 3:18 AM.
Tags
None
Referenced Files
F2173063: D5640.id.diff
Tue, Jul 2, 9:27 PM
F2168319: D5640.id18459.diff
Tue, Jul 2, 8:56 AM
Unknown Object (File)
Sat, Jun 29, 8:57 AM
Unknown Object (File)
Wed, Jun 19, 9:32 PM
Unknown Object (File)
Mon, Jun 17, 5:14 AM
Unknown Object (File)
Mon, Jun 17, 5:14 AM
Unknown Object (File)
Mon, Jun 17, 5:14 AM
Unknown Object (File)
Tue, Jun 11, 7:00 PM

Details

Summary

In this diff, we are exposing a function to get if the server is running a sandbox mode from the C++ codebase to the Rust codebase as a isSandbox function.
This function will be used in the Rust codebase diff D5641 and forward.

Linear task: ENG-1893

Test Plan
  1. Service is successfully built.
  2. The diff D5641 where the function is used the service is successfully built.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

max held this revision as a draft.
max published this revision for review.Nov 16 2022, 4:45 AM
max edited the summary of this revision. (Show Details)
max edited the test plan for this revision. (Show Details)
max added reviewers: varun, marcin. max added 1 blocking reviewer(s): jon.

I would like to see configuration done in rust, as argument reading + argument validation is a bit nicer using crates like clap. But as a transition, I think this is fine.

From an architectural standpoint, I don't think the business logic should really be aware of whether it's running in a sandbox. We should be passing it other values (e.g. dev rabbitmq endpoints) which make the environment a sandbox.

This revision is now accepted and ready to land.Nov 16 2022, 2:50 PM
In D5640#167758, @jon wrote:

I would like to see configuration done in rust, as argument reading + argument validation is a bit nicer using crates like clap. But as a transition, I think this is fine.

From an architectural standpoint, I don't think the business logic should really be aware of whether it's running in a sandbox. We should be passing it other values (e.g. dev rabbitmq endpoints) which make the environment a sandbox.

Yeah, I agree with that. I've created a follow-up task for this.