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 xk6-browser usage example #197

Closed
inancgumus opened this issue Jan 20, 2022 · 4 comments · Fixed by #198
Closed

Update xk6-browser usage example #197

inancgumus opened this issue Jan 20, 2022 · 4 comments · Fixed by #198
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@inancgumus
Copy link
Member

Installation steps in the announcement post were causing issues for our users. So we updated the example in the README before.

However, we used xk6-browser as an executable output for examples in our README and announcement blog post. @ppcano told me that we usually use a k6 executable for extensions.

After talking to @robingustafsson, we decided to use k6 executable output in both examples instead of xk6-browser:

  • It would be unfortunate to have high inflation of binary names so I’m ok with changing the readme in the xk6-browser to use k6 binary name.
  • It also aligns with the binary name we use of our releases.

So we will update the examples in our README and the announcement blog post.

@inancgumus inancgumus added the documentation Improvements or additions to documentation label Jan 20, 2022
@inancgumus inancgumus self-assigned this Jan 20, 2022
@inancgumus inancgumus changed the title Update k6 usage examples Update k6 usage examples and use k6 executable Jan 20, 2022
inancgumus added a commit that referenced this issue Jan 20, 2022
inancgumus added a commit that referenced this issue Jan 20, 2022
@inancgumus
Copy link
Member Author

inancgumus commented Feb 2, 2022

The last release (v0.1.3) is incompatible with k6 v0.36.0:

$ xk6 build v0.36.0 --output xk6-browser --with github.com/grafana/xk6-browser
2022/02/02 11:03:07 [INFO] Temporary folder: /Users/inanc/grafana/k6b/buildenv_2022-02-02-1103.1364873684
2022/02/02 11:03:07 [INFO] Writing main module: /Users/inanc/grafana/k6b/buildenv_2022-02-02-1103.1364873684/main.go
2022/02/02 11:03:07 [INFO] Initializing Go module
2022/02/02 11:03:07 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init k6
go: creating new go.mod: module k6
go: to add module requirements and sums:
	go mod tidy
2022/02/02 11:03:07 [INFO] Pinning versions
2022/02/02 11:03:07 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod edit -require go.k6.io/k6@v0.36.0
2022/02/02 11:03:07 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy
go: finding module for package github.com/grafana/xk6-browser
go: finding module for package github.com/nxadm/tail
go: found github.com/grafana/xk6-browser in github.com/grafana/xk6-browser v0.1.3
go: found github.com/nxadm/tail in github.com/nxadm/tail v1.4.8
k6 imports
	go.k6.io/k6/cmd imports
	go.k6.io/k6/js imports
	go.k6.io/k6/js/modules/k6/grpc imports
	github.com/golang/protobuf/proto tested by
	github.com/golang/protobuf/proto.test imports
	github.com/google/go-cmp/cmp loaded from github.com/google/go-cmp@v0.5.0,
	but go 1.16 would select v0.5.1
k6 imports
	go.k6.io/k6/cmd imports
	go.k6.io/k6/js imports
	go.k6.io/k6/js/modules/k6/grpc imports
	github.com/golang/protobuf/proto imports
	google.golang.org/protobuf/reflect/protoregistry tested by
	google.golang.org/protobuf/reflect/protoregistry.test imports
	github.com/google/go-cmp/cmp/cmpopts loaded from github.com/google/go-cmp@v0.5.0,
	but go 1.16 would select v0.5.1
k6 imports
	go.k6.io/k6/cmd imports
	go.k6.io/k6/js imports
	go.k6.io/k6/js/modules/k6/grpc imports
	github.com/golang/protobuf/proto tested by
	github.com/golang/protobuf/proto.test imports
	github.com/google/go-cmp/cmp imports
	github.com/google/go-cmp/cmp/internal/diff loaded from github.com/google/go-cmp@v0.5.0,
	but go 1.16 would select v0.5.1
k6 imports
	go.k6.io/k6/cmd imports
	go.k6.io/k6/js imports
	go.k6.io/k6/js/modules/k6/grpc imports
	github.com/golang/protobuf/proto tested by
	github.com/golang/protobuf/proto.test imports
	github.com/google/go-cmp/cmp imports
	github.com/google/go-cmp/cmp/internal/flags loaded from github.com/google/go-cmp@v0.5.0,
	but go 1.16 would select v0.5.1
k6 imports
	go.k6.io/k6/cmd imports
	go.k6.io/k6/js imports
	go.k6.io/k6/js/modules/k6/grpc imports
	github.com/golang/protobuf/proto tested by
	github.com/golang/protobuf/proto.test imports
	github.com/google/go-cmp/cmp imports
	github.com/google/go-cmp/cmp/internal/function loaded from github.com/google/go-cmp@v0.5.0,
	but go 1.16 would select v0.5.1
k6 imports
	go.k6.io/k6/cmd imports
	go.k6.io/k6/js imports
	go.k6.io/k6/js/modules/k6/grpc imports
	github.com/golang/protobuf/proto tested by
	github.com/golang/protobuf/proto.test imports
	github.com/google/go-cmp/cmp imports
	github.com/google/go-cmp/cmp/internal/value loaded from github.com/google/go-cmp@v0.5.0,
	but go 1.16 would select v0.5.1

To upgrade to the versions selected by go 1.16:
	go mod tidy -go=1.16 && go mod tidy -go=1.17
If reproducibility with go 1.16 is not needed:
	go mod tidy -compat=1.17
For other options, see:
	https://golang.org/doc/modules/pruning
2022/02/02 11:03:08 [INFO] Cleaning up temporary folder: /Users/inanc/grafana/k6b/buildenv_2022-02-02-1103.1364873684
2022/02/02 11:03:08 [FATAL] exit status 1

But it's compatible with xk6-browser@main:

$ xk6 build v0.36.0 --output xk6-browser --with github.com/grafana/xk6-browser=.

Should we update the README to use k6@0.35.0 until we make another release? WDYT @imiric?

@inancgumus inancgumus changed the title Update k6 usage examples and use k6 executable Update k6 usage examples Feb 2, 2022
@inancgumus inancgumus changed the title Update k6 usage examples Update xk6-browser usage example Feb 2, 2022
@robingustafsson
Copy link
Member

@inancgumus We should either update the README with accurate and working instructions or make a new release.

@inancgumus
Copy link
Member Author

inancgumus commented Feb 2, 2022

@robingustafsson If we merge this PR, we'll have working instructions until the release: #198

@robingustafsson
Copy link
Member

Ah, great, let's merge it! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants