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

Don't force latest k6 when building extensions #44

Merged
merged 4 commits into from
May 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Don't force latest k6 when building extensions
an extension will always require k6 and a version of it. It makes little
sense to force newer version on users especially as we keep breaking
them and we need time to go fix them, but that can only happen after
release.

This still lets users specify the version (as latest for example) and
require the latest k6, it just isn't the default.
  • Loading branch information
mstoykov committed May 11, 2022
commit fa72d583ef96e8fd0230f0e091e954cfbca7a21a
10 changes: 7 additions & 3 deletions environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,13 @@ func (b Builder) newEnvironment(ctx context.Context) (*environment, error) {
log.Println("[INFO] Pinning versions")
if b.K6Repo == "" {
// building with the default main repo
err = env.execGoModRequire(ctx, k6ModulePath, env.k6Version)
if err != nil {
return nil, err
if env.k6Version != "" {
// don't actually specify k6 version if it wasn't specified
// the extension(s) will require a version that they work with either way
err = env.execGoModRequire(ctx, k6ModulePath, env.k6Version)
if err != nil {
return nil, err
}
}
} else {
// building with a forked repo, so get the main one and replace it with
Expand Down