Update module go.k6.io/k6 to v0.47.0 #354
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.46.0
->v0.47.0
Release Notes
grafana/k6 (go.k6.io/k6)
v0.47.0
Compare Source
k6
v0.47.0
is here 🎉! This release includes:Deprecations
statsd
output option has been deprecated, and users should use the xk6-output-statsd extension instead. See #2982 for future plans.https://
. Before, k6 would try to resolve importing remote modules by prependinghttps://
if it was missing. This behavior has been deprecated and will be fully removed in the next release (v0.48.0).New features
Add gRPC's binary metadata support #3234, xk6-grpc#46
The k6 gRPC modules (
k6/net/grpc
andk6/experimental/grpc
) now support handling binary metadata that uses the-bin
postfix, according to the gRPC specification.Thanks to @sapphire-janrain for the contribution!
Add gRPC's reflection metadata support #3343, xk6-grpc#46
The k6 gRPC modules (
k6/net/grpc
andk6/experimental/grpc
) now support adding metadata to reflection requests by using a new connection parameterreflectMetadata
.Higher precision for Trend metrics in Grafana Cloud k6 #3302
Grafana Cloud k6 is now able to store and visualize Trend metrics up to 3 digits of precision for decimal numbers.
Docker support for browser-based tests #3199
k6 is now publishig Docker images that include Chromium web browser. This allows k6 users to run tests that use Browser API without having to install Chrome first. Check the "A note on running browser tests" section of the Overview page on DockerHub for details.
Docker images for ARM64 architecture #3320
The k6's release process now builds and pushes dedicated Docker images for ARM64. Check k6's tags page on DockerHub for details.
New authentication methods and HTTP headers API for Prometheus remote write output xk6-output-prometheus-remote#143, xk6-output-prometheus-remote#145, xk6-output-prometheus-remote#147
The experimental Prometheus remote write output now supports two new authentication methods: Bearer token and TLS certificates. Check out the documentation to learn more about how to define them using the new environment variables.
We've also added the
K6_PROMETHEUS_RW_HTTP_HEADERS
that defines a new and more convenient way to set custom HTTP headers to pass through each flush metrics' request.Improved the browser module's cookie API
The browser module now provides a more complete and robust API for handling cookies. The cookie API was stabilized by defining a new
Cookie
class (browser#1008, browser#1030) that can be used while creating and retrieving cookies. This enabled us to add a newbrowserContext.cookies([urls])
method (browser#1005) that returns all cookies from the current browser context. The new API also supports filtering cookies by URL (browser#1016).That led to fixing a bug where the
expires
field was not being set correctly while adding cookies using thecontext.addCookie()
method (browser#1031). Lastly, the existingcontext.clearCookies()
method was fixed to clear all cookies from the current browser context (browser#1040).Add support for browser module's
page.on('console')
browser#1006Allows users to register a handler to be executed every time the
console
API methods are called from within the page's JavaScript context. The arguments passed into the handler are defined by the ConsoleMessage class.UX improvements and enhancements
setup
andteardown
via REST API. Thanks to @kmtym1998 for the contribution!k6 version
.*-with-browser
Docker images to automatically set theno-sandbox
environment variable.k6
object (window.k6 = {};
) to help identify k6 browser module tests.check
inexamples/fillform.js
so that it matches the type definitions and documentation forcheck
.Bug fixes
goja
version, and fixes a compiler bug when a class is declared in a function with an argument.goja
conversions while adding and retrieving cookies.page.reload
&page.setContent
to use the default navigation timeout over the default timeout.page
timeouts so it is actually used after being set.Maintenance and internal improvements
interfacebloat
linter.goja
, includes runtime initialization speed-up and a fix for source indexes.alpine
image version that is used as the base of the k6 Docker image.int64
timeout totime.Duration
, to help avoid confusion as to whether a timeout is in milliseconds or seconds.Roadmap
Native ECMAScript Modules support
Work on this epic issue has been picked up and there is some progress in the underlying implementation.
One of the main internal changes will be dropping Babel, which is currently used to transpile ESM code to CommonJS.
For users, it will mean better JavaScript support as this change will automatically get object spread working and likely faster startup for big scripts. In the future, this also means JavaScript compatibility will be easier to add, since it'll only need to be supported in the JavaScript VM we use - goja.
There's a risk that some k6 tests using both CommonJS and ECMAScript modules syntax will change in behavior. In practice, using both should never really be done as they're not compatible.
Because there are risks involved, we are going to do this very carefully and only once we have done a lot of tests. That means this is currently planned for v0.49.0, but with the majority of the remaining work done in the v0.48.0 cycle.
This way, we will also be able to have most of our users test these changes from our
master
branch, using Docker images, for example.Future breaking changes
There are several changes in the next release that are entering the final stage of their deprecation period. That means the next release will include the following breaking changes:
k6 converter
command will be removed.headers
param for the gRPC module will be removed. Users should use the metadata property instead.https://
protocol in their URLs, otherwise it will return an error.file_name
).--logformat
flag for defining the Log format option will be removed. --log-format should be used instead.We recommend checking this list to see if you are impacted, and updating your scripts or CI/CD processes to avoid any issues. If you have any feedback, please open an issue.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.