Page MenuHomePhabricator

[services] Move tools to their namespace
ClosedPublic

Authored by karol on May 13 2022, 2:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 11:00 AM
Unknown Object (File)
Sun, Dec 15, 8:01 AM
Unknown Object (File)
Sun, Dec 15, 8:01 AM
Unknown Object (File)
Sun, Dec 15, 8:01 AM
Unknown Object (File)
Sun, Dec 15, 8:01 AM
Unknown Object (File)
Sun, Dec 15, 8:01 AM
Unknown Object (File)
Sun, Dec 15, 8:01 AM
Unknown Object (File)
Sun, Dec 15, 8:01 AM

Details

Summary

Depends on D4032

Move all tools to the ::tools namespace

Test Plan

Services still build

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

karol edited the test plan for this revision. (Show Details)
karol added a reviewer: tomek.
Harbormaster returned this revision to the author for changes because remote builds failed.May 13 2022, 2:51 AM
Harbormaster failed remote builds in B9084: Diff 12630!
ashoat added a subscriber: max.

Adding @geekbrother since he seems interested in this work, based on discussion in ENG-976

I think we need to distinguish service-specific namespace for tools and GlobalTools.
We already have tools:: namespace in the tunnelbroker specific tools at services/tunnelbroker/src/Tools/Tools[.cpp,.h].
The good idea is to use something like globalTools:: for the services/lib/src/GlobalTools[.cpp,.h]. Or we can change the namespace for the tunnelbroker specific tools at services/tunnelbroker/src/Tools/Tools[.cpp,.h] to tunnelbrokerTools:: and same for blob and backup services tools.

This revision now requires changes to proceed.May 14 2022, 12:38 PM
karol added reviewers: ashoat, jim, varun.

I think it's better to have the same namespace. Maybe someone else can take a vote here? Adding some people to the review

How about tools:: (or comm::tools:: or whatever) for the global tools, and tunnelbroker::tools:: (or comm::tunnelbroker::tools:: or whatever) for Tunnelbroker-specific tools?

ashoat requested changes to this revision.May 16 2022, 1:09 PM

Looks like we have comm::network::tools here, does that really make the most sense for something like services/lib/src/GlobalTools.h? Not sure what it has to do with "network"... passing back to @karol-bisztyga with this question

This revision now requires changes to proceed.May 16 2022, 1:09 PM

AFAIR network was introduced when we started working on services. I think we agreed that comm::network would be a good namespace for them. Tomek already pointed out that we may want to refactor this. This is the task for that: https://linear.app/comm/issue/ENG-1162/think-of-the-best-namespace-name.

As for the tools, looks like I'm outvoted. So let's go with tools for global tools and tunnelbroker::tools for tunnelbroker.

Okay fair point, this is best covered as a separate task/diff since it impacts other diffs / other files. Accepting to unblock, and thanks for creating a task!

This revision now requires review to proceed.May 19 2022, 12:34 PM

Thanks, Karol! Following the ENG-1162.

This revision is now accepted and ready to land.May 19 2022, 12:47 PM
max requested changes to this revision.May 23 2022, 4:34 AM
max added inline comments.
services/tunnelbroker/test/DatabaseManagerTest.cpp
137 ↗(On Diff #12997)

I think we need to use tools::generateUUID() here.

This revision now requires changes to proceed.May 23 2022, 4:34 AM
This revision is now accepted and ready to land.May 25 2022, 3:23 AM