-
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
Warn when old k6 version is used #52
Comments
I wonder if we should just always emit the warning unless a version is provided on the command line 🤔 (irregardless of it is This way the user will know they are building with a particular version (unless they use We won't need to make any checks as well 🤷 On the other hand I guess if they just hard code |
🤔 good points... Not sure either way, but I am leaning slightly towards always warning when the version is old, even if it was explicitly specified 🤔 Just because it's in our interest to minimize the number of users with old k6 versions as much as we can... 😅 |
I would like to bring up an earlier idea of mine here: k6 extension linter and rating/badge. The extensions included in the registry would be checked and qualified by the extension linter periodically (in the case of a new version of the given extension and in the case of a new k6 release). This information could be used in the case of a k6 build, even for warning purposes. |
I think this particular issue is regarding how to communicate this to the user, not about the registry. That said, I think adding this information to the registry will be useful so that the user decide how to handle the situation. I'm not so in favor of making the build process dependent on this information, not at least until we define more clearly the policies about extensions (official, supported, etc.) |
After #44, xk6 will not always try to use the latest k6 version to build the binary, it will instead use the one specified in the extensions' go.mod file(s). However, as this forum thread has shown, this can cause problems for unmaintained extensions, when users expect to be able to access newer k6 built-in APIs.
So, it would be nice if xk6 emits a warning when we are going to use an older version of k6. It seems like we can do it by running
go list -m -json -u -mod=readonly go.k6.io/k6
for the repo, it will produce something like this:I guess we can compare the
Time
or semver-compare theVersion
attributed between the main object andUpdate
🤔 Or we can figure out some other way to detect newer k6 versions.The text was updated successfully, but these errors were encountered: