Page MenuHomePhabricator

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

Authored by max on Nov 16 2022, 3:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 3:02 PM
Unknown Object (File)
Fri, Oct 25, 5:18 PM
Unknown Object (File)
Fri, Oct 25, 5:18 PM
Unknown Object (File)
Fri, Oct 25, 5:17 PM
Unknown Object (File)
Fri, Oct 25, 5:03 PM
Unknown Object (File)
Mon, Oct 21, 11:20 AM
Unknown Object (File)
Sep 26 2024, 9:28 PM
Unknown Object (File)
Sep 5 2024, 8:16 AM

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.