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

go.mod: sync grpc dependencies with k6 core #332

Merged
merged 1 commit into from
Sep 7, 2023
Merged

Conversation

roobre
Copy link
Collaborator

@roobre roobre commented Sep 7, 2023

Description

At some point during the latest dependency additions, we upgraded google.golang.org/genproto to a version different to what k6 core is using. The new version we introduced carried a refactor of the paths of a number of submodules in this package. This caused builds to break when the go toolchain detected that the same package was provided by multiple modules:

k6 imports
	github.com/grafana/xk6-disruptor imports
	go.k6.io/k6/js/modules imports
	go.k6.io/k6/loader tested by
	go.k6.io/k6/loader.test imports
	go.k6.io/k6/lib/testutils/httpmultibin imports
	google.golang.org/grpc/status imports
	google.golang.org/genproto/googleapis/rpc/status: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/status in multiple modules:
	google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 (/go/pkg/mod/google.golang.org/genproto@v0.0.0-20230410155749-daa745c078e1/googleapis/rpc/status)
	google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 (/go/pkg/mod/google.golang.org/genproto/googleapis/rpc@v0.0.0-20230525234030-28d5490b6b19/status)

These changes were tested to be working by means of:

docker run --rm -it -u "$(id -u):$(id -g)" -v "${PWD}:/xk6" grafana/xk6 build v0.46.0 --with github.com/grafana/xk6-disruptor@e1e50d5c92cf5eb799614769e088e12625f2c0cb

Reported in #330

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run linter locally (make lint) and all checks pass.
  • I have run tests locally (make test) and all tests pass.
  • I have run relevant e2e test locally (make e2e-xxx for agent, disruptors, kubernetes or cluster related changes)
  • Any dependent changes have been merged and published in downstream modules

@@ -42,7 +41,7 @@ require (
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/tools v0.7.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the conflicting dependency

@@ -8,7 +8,7 @@ require (
github.com/google/go-cmp v0.5.9
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.5.0
github.com/testcontainers/testcontainers-go v0.23.0
github.com/testcontainers/testcontainers-go v0.21.0
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Apparently, testcontainers-go v0.23.0 pulled the updated version.

@roobre roobre merged commit c7e40b2 into main Sep 7, 2023
7 checks passed
@roobre roobre deleted the sync-k6-dependencies branch September 7, 2023 13:29
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.

None yet

1 participant