Page MenuHomePhabricator

[services] Tunnelbroker - Moving directories according to the Rust app structure
ClosedPublic

Authored by max on Oct 20 2022, 7:33 AM.
Tags
None
Referenced Files
F2191848: D5428.id18108.diff
Thu, Jul 4, 5:48 PM
Unknown Object (File)
Wed, Jul 3, 10:21 AM
Unknown Object (File)
Wed, Jul 3, 2:48 AM
Unknown Object (File)
Sun, Jun 30, 12:09 AM
Unknown Object (File)
Sat, Jun 29, 6:09 PM
Unknown Object (File)
Wed, Jun 26, 12:20 AM
Unknown Object (File)
Wed, Jun 26, 12:20 AM
Unknown Object (File)
Wed, Jun 26, 12:20 AM

Details

Summary

This diff is a part of the flat diffs stack to transform the current Tunnelbroker project into a Rust app by calling the current C++ codebase from Rust. The related transition task is ENG-1072.

In this diff we are moving the directories of the project to be according to the following directory structure:

src/
  libcpp/
    src/
      ... (current Tunnelbroker C++ codebase)
    test/
      ... (current unit tests for C++ codebase)
    tunnelbroker.h (header file with CXX adapters and exposed functions to Rust)
    CMakeLists.txt (cmake file for building, running current unit tests out of Cargo)
  notifications/
    ... (current Rust notifications codebase)
  server/
    ... (future Rust gRPC Tonic related codebase)
  main.rs (main server entrypoint)
docker/
  ... (current Docker scripts)
build.rs (Cargo build)
Cargo.toml
Cargo.lock
Dockerfile

The project directory structure task and discussion: ENG-2083

CI Notice:
The CI will fail on this and further diffs until the D5461 where the changes to CI build commands are made.
This stack will be landed all in one to prevent CI from failing on diffs out of this stack.

Test Plan

1. CI Testing:
These diff changes are included as a part of the stack in the later D5461 diff, where the changes to CI build commands are made. The CI succeded on the D5461 which reflects that this changes are passing the build.

2. Manually testing:
These diff changes can be tested in the middle of the stack at D5436. To test it patch to D5436 using arc patch D5436, run nix develop. Go to tunnelbroker service directory services/tunnelbroker and run the Cargo building process cargo build or cargo run.
The Rust application will be 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 edited the test plan for this revision. (Show Details)
max added reviewers: varun, marcin. max added 1 blocking reviewer(s): jon.
max published this revision for review.Oct 20 2022, 8:20 AM

The CI gates should be updated as part of this as well, having two failing gates isn't good.

I would also be fine with some additional diffs later in the stack which fix the builds later on, however, delaying being "green to green" also means that we will have a lot of intermediate diffs which fail to build or pass tests :(

In D5428#161080, @jon wrote:

The CI gates should be updated as part of this as well, having two failing gates isn't good.

I would also be fine with some additional diffs later in the stack which fix the builds later on, however, delaying being "green to green" also means that we will have a lot of intermediate diffs which fail to build or pass tests :(

The CI fixes diffs will be after the D5436 so we can successfully run cargo build/run after this. Putting the CI changes before isn't a good idea because if we land it before D5436 all diffs will be failing until the stack will be landed (it will take some time to review it), so this is a better solution, in this case, to go with the failing CI for now, until D5436 and below is landed.
The diffs were presented to the review now to unblock. There is a CI Notes also in a diff description.

max edited the test plan for this revision. (Show Details)
In D5428#161080, @jon wrote:

The CI gates should be updated as part of this as well, having two failing gates isn't good.

I would also be fine with some additional diffs later in the stack which fix the builds later on, however, delaying being "green to green" also means that we will have a lot of intermediate diffs which fail to build or pass tests :(

Update:
I've added D5461 (for Nix), D5458 (Docker) CI building commands changes.
As this diff is a part of the stack in these further diffs, these changes will be checked by the CI gate.

CI gates are fixed later. Don't want perfect to be the enemy of better. I'm good with the changes as long as they all land as once

This revision is now accepted and ready to land.Oct 25 2022, 5:38 PM
This revision now requires review to proceed.Oct 26 2022, 2:22 AM
This revision is now accepted and ready to land.Oct 27 2022, 4:01 AM

Rebasing on master changes.

This revision was landed with ongoing or failed builds.Nov 7 2022, 5:51 AM
This revision was automatically updated to reflect the committed changes.