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

Update for k6 org change #17

Closed
magentera opened this issue Mar 31, 2021 · 5 comments
Closed

Update for k6 org change #17

magentera opened this issue Mar 31, 2021 · 5 comments

Comments

@magentera
Copy link

I now get this error when building my docker image:

> Step 4/12 : RUN go get -u github.com/k6io/xk6/cmd/xk6 &&     xk6 build v0.29.0 --with github.com/mostafa/xk6-kafka
>  ---> Running in 3ded9e36f3a5
> 2021/03/30 18:33:27 [INFO] Temporary folder: /tmp/buildenv_2021-03-30-1833.563133095
> 2021/03/30 18:33:27 [INFO] Writing main module: /tmp/buildenv_2021-03-30-1833.563133095/main.go
> 2021/03/30 18:33:27 [INFO] Initializing Go module
> 2021/03/30 18:33:27 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init k6 
> go: creating new go.mod: module k6
> 2021/03/30 18:33:27 [INFO] Pinning versions
> 2021/03/30 18:33:27 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/k6io/[email protected] 
> go: downloading github.com/k6io/k6 v0.29.0
> go get: github.com/k6io/[email protected]: parsing go.mod:
>         module declares its path as: github.com/loadimpact/k6
>                 but was required as: github.com/k6io/k6
> 2021/03/30 18:33:30 [FATAL] exit status 1

I believe this is related to k6 moving off loadimpact to k6io?

@na--
Copy link
Member

na-- commented Mar 31, 2021

Sorry for this, I've reverted the problematic commit in master, so this should now work.

To give some background, we merged #16 yesterday with the full expectation that we'll merge grafana/k6#1935 shortly after on the k6 side. But then we decided we'll not actually use github.com/k6io/k6 as the Go module path for k6, but Go for vanity URLs instead (e.g. something like go.k6.io/k6) and forgot to revert the xk6 change 😞

@na--
Copy link
Member

na-- commented Mar 31, 2021

Btw you probably shouldn't use -u in go get, this is why it failed, you were using the master version that might be potentially unstable. And you shouldn't be using old versions of k6 unless you need to. I suggest you do something like this:

go install github.com/k6io/xk6/cmd/xk6@latest && xk6 build latest --with github.com/mostafa/xk6-kafka

This would make your Dockerfile use the latest stable versions of xk6 and k6.

@na-- na-- closed this as completed Mar 31, 2021
@magentera
Copy link
Author

@na-- Thanks for the quick response :) you're a life saver 🙏

On the topic of using versions to install a specific change, theres a small restriction on that.

With the above suggested code we aren't able to specify the version when using a path.. how unfortunate 🤕
package github.com/k6io/xk6/cmd/xk6@latest: cannot use path@version syntax in GOPATH mode

We will have to lock it a version and hope master is stable most of the time 🤞

@na--
Copy link
Member

na-- commented Mar 31, 2021

You are using Go 1.15, that's why you see this error. Switch to Go 1.16 or add the GO111MODULE=on environment variable and the error should disappear.

@magentera
Copy link
Author

ah I see. Thank you, thats working on my end 🍰

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

No branches or pull requests

2 participants