-
Notifications
You must be signed in to change notification settings - Fork 21
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
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This is a bit strange but it turns out that if you have replacements go change how it resolves modules a bit and will try to get the latest versions of some dependencies. Also if you have one extension and you are building it from local sources we would not run `go mod tidy` reliably. This doesn't really matter in practice as we do run it almost every other command, but was getting in the way of smaller fix. Both of those are fixed with this commit and now we do definitely run `go mod tidy` once we have requested all extensions and put down the files needing them. And also only write a file requesting k6 directly at the very end so it only try to get it's version at this point - and at that point we should already have requested through an extension.
Needed a bigger fix for when you do Can you guys please test this locally as well - I did a bunch of tests, but still will help if other people try it as well |
This was as there was *possibly* nothing requesting k6 at the time it was setup. Replaces on the other hand stick so XK6_K6_REPO always worked.
Co-authored-by: Ivan Mirić <ivan@loadimpact.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It worked fine in my local tests 🤞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤞
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.