Page MenuHomePhabricator

[services] Move tools to their namespace
ClosedPublic

Authored by karol on May 13 2022, 2:28 AM.
Tags
None
Referenced Files
F2008755: D4033.id12994.diff
Thu, Jun 13, 2:19 PM
F2004787: D4033.id12630.diff
Thu, Jun 13, 1:33 AM
Unknown Object (File)
Tue, Jun 11, 11:57 PM
Unknown Object (File)
Mon, Jun 10, 9:57 PM
Unknown Object (File)
Thu, Jun 6, 1:20 PM
Unknown Object (File)
Wed, May 29, 10:58 AM
Unknown Object (File)
Wed, May 29, 10:58 AM
Unknown Object (File)
Wed, May 29, 10:58 AM

Details

Summary

Depends on D4032

Move all tools to the ::tools namespace

Test Plan

Services still build

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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