grafana / xk6-output-influxdb

k6 extension to output real-time test metrics to an InfluxDB 2.x database.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

google.golang.org/genproto/googleapis/rpc/status: ambiguous import issue

sfat opened this issue · comments

Hi,

Am trying to build locally k6 with xk6-output-influxdb

Command I am running:

docker run --rm -e GOOS=darwin -e CGO_ENABLED=1 -u "$(id -u):$(id -g)" -v "$PWD:/xk6" \
            xk6-andrei build master \
            --with github.com/grafana/xk6-output-influxdb@latest

But seems I get this error:

2023/11/20 09:19:29 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod edit -require github.com/grafana/xk6-output-influxdb@latest
2023/11/20 09:19:29 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -compat=1.17
go: downloading github.com/grafana/xk6-output-influxdb v0.4.1
go: downloading github.com/influxdata/influxdb-client-go/v2 v2.12.2
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/deepmap/oapi-codegen v1.12.4
go: downloading github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/apapsch/go-jsonmerge/v2 v2.0.0
go: downloading gopkg.in/guregu/null.v3 v3.5.0
go: downloading github.com/spf13/afero v1.9.5
go: downloading google.golang.org/genproto v0.0.0-20210226172003-ab064af71705
k6 imports
	github.com/mostafa/xk6-kafka 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-20210226172003-ab064af71705 (/go/pkg/mod/google.golang.org/genproto@v0.0.0-20210226172003-ab064af71705/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)

The image xk6-andrei is just a docker image that I've built for myself to verify m1 compatibility (native xk6 docker image is not).

I can confirm that v0.3.0 is not giving me this error,v0.4.0 is giving the same error as above

I don't think it's related to the custom docker image I've created, as it highlighted here, where the image is built against ubuntu: https://github.com/sfat/xk6/actions/runs/6919193432/job/18842123451

(I am trying to modify existing xk6 to also build for arm64 (M1) in order for the docker container to run faster)

commented

Hey @sfat,
I've pushed a fix in the current linked branch. It will be under review and we will merge it ASAP. In the meantime, you can test it by running the following command:

xk6 build v0.47.0 \
  --with github.com/grafana/xk6-output-influxdb@bump-k6 \
  --with github.com/mostafa/xk6-kafka@latest

Thanks for reporting. 🙇