Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize config manager packages in agent #1198

Merged
merged 3 commits into from
Nov 20, 2018

Conversation

pavolloffay
Copy link
Member

Resolves #1194

Signed-off-by: Pavol Loffay [email protected]

@pavolloffay
Copy link
Member Author

@jpkrohling would you like to have a look?

@codecov
Copy link

codecov bot commented Nov 19, 2018

Codecov Report

Merging #1198 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1198   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files         159     159           
  Lines        7136    7136           
======================================
  Hits         7136    7136
Impacted Files Coverage Δ
cmd/agent/app/configmanager/metrics.go 100% <ø> (ø)
cmd/agent/app/reporter/grpc/collector_proxy.go 100% <100%> (ø) ⬆️
cmd/agent/app/configmanager/grpc/manager.go 100% <100%> (ø)
cmd/agent/app/httpserver/server.go 100% <100%> (ø) ⬆️
cmd/agent/app/reporter/tchannel/collector_proxy.go 100% <100%> (ø) ⬆️
cmd/agent/app/configmanager/tchannel/manager.go 100% <100%> (ø)
cmd/agent/app/builder.go 100% <100%> (ø) ⬆️
cmd/agent/app/reporter/tchannel/reporter.go 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d664e6...510e01e. Read the comment docs.

Copy link
Contributor

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks quite straightforward to me, I just have some concerns about the new location of the client configuration managers, as they seem kinda misplaced under their current packages.

cmd/agent/app/reporter/grpc/collector_proxy_test.go Outdated Show resolved Hide resolved
cmd/agent/app/reporter/grpc/collector_proxy.go Outdated Show resolved Hide resolved
@@ -12,14 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package httpserver
package tchannel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of the new package structure: without looking at the code, I would expect that the packages cmd/agent/app/httpserver/[tchannel|grpc] would contain code that ties something about gRPC or TChannel with the HTTP server that the agent starts, when in reality, all these packages have are specific implementations of the ClientConfigManager interface.

Perhaps the managers deserve their own packages? cmd/agent/app/clientconfigmanager/[tchannel|grpc]? Perhaps they should even be outside of the cmd package.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manager interface is used only in httpserver package Therefore it was originally colocated there I am fine scoping it under httpserver.

Perhaps they should even be outside of the cmd package.

This applies also to reporter and probably other subpackages. It would make sense to move them if they could be reused in other cmd. This is specific to the agent only.

@pavolloffay
Copy link
Member Author

@jpkrohling I have moved the configmanager to a separate package. Is there anything more?

@pavolloffay pavolloffay merged commit 3e27a73 into jaegertracing:master Nov 20, 2018
@ghost ghost removed the review label Nov 20, 2018
@jpkrohling
Copy link
Contributor

@jpkrohling I have moved the configmanager to a separate package. Is there anything more?

No, that was it. Looks great :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants