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

google.golang.org/grpc/xds has dependency on "testing" #6015

Closed
aaronbee opened this issue Feb 10, 2023 · 4 comments · Fixed by #6052
Closed

google.golang.org/grpc/xds has dependency on "testing" #6015

aaronbee opened this issue Feb 10, 2023 · 4 comments · Fixed by #6052
Assignees

Comments

@aaronbee
Copy link

What version of gRPC are you using?

v1.53.0

What version of Go are you using (go version)?

v1.19.5

What operating system (Linux, Windows, …) and version?

N/A

What did you do?

We check for imports of unexpected dependencies for our production binaries. Upgrading to grpc v1.53.0 added an import to the standard library "testing" package.

What did you expect to see?

Production libraries should not depend on "testing".

What did you see instead?

This is one dependency path seen:

google.golang.org/grpc/xds/googledirectpath ->
google.golang.org/grpc/xds ->
google.golang.org/grpc/xds/internal/balancer ->
google.golang.org/grpc/xds/internal/balancer/cdsbalancer ->
google.golang.org/grpc/xds/internal/balancer/clusterresolver ->
google.golang.org/grpc/internal/testutils ->
testing

"google.golang.org/grpc/xds/internal/balancer/clusterresolver" likely is not supposed to depend on "google.golang.org/grpc/internal/testutils". In This #5852 resource_resolver_dns.go added a call to testutils.MustParseURL.

@dfawley
Copy link
Member

dfawley commented Feb 10, 2023

Sounds right. Thanks for catching this!

@dfawley
Copy link
Member

dfawley commented Feb 10, 2023

@easwars could you take a look please?

@gm42
Copy link

gm42 commented Feb 16, 2023

google.golang.org/grpc/channelz/service is also importing google.golang.org/grpc/internal/testutils, which in turn imports testing; I'll try to come up with a PR.

@gm42
Copy link

gm42 commented Feb 16, 2023

Opened PR #6027; if someone could fix the missing label/milestone and review it, that'd be appreciated. Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants