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

grafana/k6-for-sql doesn't seem to exist #19

Closed
APWHY opened this issue May 12, 2022 · 4 comments
Closed

grafana/k6-for-sql doesn't seem to exist #19

APWHY opened this issue May 12, 2022 · 4 comments

Comments

@APWHY
Copy link

APWHY commented May 12, 2022

I was trying to run this plugin via docker, but it seems as though the image doesn't exist in dockerhub anymore. Is there a new name or has the image been taken down?

@APWHY
Copy link
Author

APWHY commented May 12, 2022

I've also tried to run the dockerfile myself and have run into this error, if this is of any use:

go: downloading gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7  
go: downloading github.com/fsnotify/fsnotify v1.4.9  
2022/05/12 03:35:48 [INFO] Pinning versions  
2022/05/12 03:35:48 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod edit -require go.k6.io/k6@latest   
2022/05/12 03:35:48 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -compat=1.17   
2022/05/12 03:35:48 [INFO] Build environment ready  
2022/05/12 03:35:48 [INFO] Building k6  
2022/05/12 03:35:48 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -compat=1.17   
go: finding module for package github.com/grafana/xk6-sql  
k6 imports  
        github.com/grafana/xk6-sql: module github.com/grafana/xk6-sql@latest found (v0.0.0-20220505143442-9c6ae906d6ea,  
 replaced by /go/src/go.k6.io/k6), but does not contain package github.com/grafana/xk6-sql  
2022/05/12 03:35:49 [INFO] Cleaning up temporary folder: /tmp/buildenv_2022-05-12-0335.3016591874  
2022/05/12 03:35:49 [FATAL] exit status 1
The command '/bin/sh -c CGO_ENABLED=1 xk6 build     --with github.com/grafana/xk6-sql=.     --output /tmp/k6' returned a non-zero code: 1

EDIT: Changing the run command to not use the c compiler (and use master) seemed to work, since I'm using postgresql anyway.

RUN xk6 build master\ --with github.com/grafana/xk6-sql \ --output /tmp/k6

@imiric
Copy link
Contributor

imiric commented May 12, 2022

Hi there!

There is no Docker image for this project on Docker Hub or elsewhere yet. The instructions in the README are to simplify building the extension in order to avoid having to setup Go on your host system, but the recommended approach is still to use xk6 directly.

What command did you run to get that error? I'm not able to reproduce it with the commands from the README and the image builds fine for me.

CGO_ENABLED=1 is only needed for SQLite support, but it won't cause issues with other RDBMSs. Only the build time will be slightly longer.

Building with k6 master is also not necessary. The extension builds fine with the latest k6 as well (v0.38.2). Actually v0.38.2 and master currently point to the same commit (grafana/k6@5c35728), so there's no difference which is used.

@APWHY
Copy link
Author

APWHY commented May 15, 2022

If I recall correctly the command was just docker build -t testk6 -f <filelocation> .. I'm not sure what was causing the issue since if changing my RUN command didn't actually change anything I have no idea what caused this issue to go away.

@APWHY
Copy link
Author

APWHY commented May 15, 2022

Also, reading your comment made me notice that you did mention in the README that the docker image is supposed to be built from local files, so I'm happy to mark this as closed since that was the initial point of my question. Thanks for the help!

@APWHY APWHY closed this as completed May 15, 2022
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