Page MenuHomePhabricator

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

Authored by max on Nov 16 2022, 3:18 AM.
Tags
None
Referenced Files
F2194521: D5640.diff
Fri, Jul 5, 5:13 AM
Unknown Object (File)
Wed, Jul 3, 7:13 PM
Unknown Object (File)
Wed, Jul 3, 7:04 PM
Unknown Object (File)
Wed, Jul 3, 6:46 AM
Unknown Object (File)
Wed, Jul 3, 12:11 AM
Unknown Object (File)
Tue, Jul 2, 9:27 PM
Unknown Object (File)
Tue, Jul 2, 8:56 AM
Unknown Object (File)
Sat, Jun 29, 8:57 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
Branch
expose-issandbox-to-rust
Lint
No Lint Coverage
Unit
No Test Coverage

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.