-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Clarification on versioning and API compatibilty #2640
Comments
Hello! Thanks for this callout! You are absolutely right that this is a bit unclear. The core maintainers can give you the best answer, but I will try to provide a documentation-focused answer before sending this to the main repo. At this moment, k6 is not following SemVer. Releases happen every two months, so the version number is more a record of time. Rather, k6 versioning is more like that of React, which also is still in a In effect, k6 is 0ver (that website is a joke, but there's an element of truth).
I think this is mostly a safe assumption: if the docs don't explicitly mention something is experimental or beta, it is quite unlikely to break. If it's not marked beta, many users are probably already using the functionality in production, so a breaking change would be something that the maintainers would take quite seriously. If you'd like to see what kind of breaking changes happen, you can take a look at the Release notes. You'll see they are almost always minor. In the latest release, we also included a Roadmap to speculate on how we would deal with breaking changes. |
TLDR version of the wall of text below:
Long version 😅0ver is cool, though the biggest reason we haven't cut a k6 v1.0.0 release and adopted semver yet is probably connected to Go modules and how Go deals with major versions in dependencies. We have xk6 extensions, which are basically Go modules that import parts of k6 as a Go library and are built with the xk6 tool into a single k6 binary. If we adopted semver and released k6 v1.0.0, as soon as we make some breaking change (even in our Go API, not just the JS one!), we will need to release a v2.0.0, but that will mess up everything because of the Go module import paths being different... 😞 The solution there is to probably split apart the k6 codebase into at least 2 separate Go modules, the semver-based The second biggest reason we haven't released k6 v1.0.0 yet is that, unfortunately, sometimes we still have to make minor breaking changes in the k6 JS APIs or options... 😞 As @MattDodsonEnglish said, you can look through the release notes of previous k6 versions to see that:
We know that people use k6 in production environments and are understandably annoyed when their script breaks due to a k6 update, so we try to avoid that at almost all costs. People sometimes even rely on the bugs and undefined/undocumented behavior that k6 has (#2623 is a recent example), so we are even labeling some of these bugfixes as "breaking changes", to potentially warn people that rely on the broken behavior... 😅 As we explained in the "Roadmap and future plans" section of the k6 v0.39.0 release notes, we have quite a lot of major refactoring and big changes planned for the near future. Besides the ones explicitly mentioned there, native support for distributed execution (#140) and test suites (#1342) are also hopefully going to be started soon. I don't think we'll need to make any breaking changes for them, but we might, so it makes some sense to consider releasing k6 v1.0.0 only after they are done. Finally, as we also mention in the v0.39.0 release notes, we are trying to be more deliberate and gradual in how we develop and stabilize new APIs. We'll start developing and incubate them in an unstable xk6 extension, then move them to a The gRPC warning in the docs is probably a bit over-cautious at this point, but still somewhat relevant. The original gRPC implementation was done before we had xk6 extensions or explicitly experimental modules, so it was directly merged into the core with that warning. Because it was done before k6 had event loops, it was also merged without support for streaming RPC calls, so that still has to be added (#2020). I think we won't need to break anything in the existing APIs to support streaming, but I can't guarantee that 100%, so the warning should probably stay. Anyway, sorry for the wall of text, but I hope that detailed explanation was useful to you and anyone else sharing your concerns. |
Wow, thanks for the great reply @na-- ! That does answer my question, so I'll go ahead and close this. I recently finished my evaluation, and I'm going to recommend my team switch from JMeter to k6 for load testing. One of the reasons we've stuck with JMeter has been its relative stability: we almost never need to update our test scripts when upgrading. But JMeter doesn't have compatibility guarantees either, so it's still something we have to worry about. To me, the advantages k6 has over JMeter (particularly with respect to developer-friendliness and performance) are well worth the occasional breaking change. Hopefully I'll be able to convince the rest of my team of that! |
I'm currently evaluating if k6 is a right fit for my organization, and I really like what I've seen so far, but I haven't been able to find any information on the versioning policy or compatibility guarantees (if any) for the Javascript API. I'm guessing k6 follows semantic versioning, and since the major version is 0, that means anything can change at any point:
But the docs have a note under "k6/net/grpc" that says:
which implies that the other APIs are not considered beta, so I'm confused. Is there anything in the API that can be considered "stable", or could every release potentially force us to rewrite all our tests? If the latter, are there any plans to establish compatibility guarantees?
Thanks in advance!
The text was updated successfully, but these errors were encountered: