chore: Update module go.k6.io/k6 to v0.55.0 #1103
Open
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.54.0
->v0.55.0
Warning
Some dependencies could not be looked up. Check the warning logs for more information.
Release Notes
grafana/k6 (go.k6.io/k6)
v0.55.0
Compare Source
k6
v0.55.0
is here 🎉! This release includes:k6/experimental/tracing
module has been removed.await
support.k6/experimental/webcrypto
.Breaking changes
k6/experimental/tracing
module removed#3855
The experimental
k6/experimental/tracing
module has been removed, in favor of a replacement jslib polyfill, please consult our guide on how to migrate,#3855
.StatsD output removed
#3849
The StatsD output was deprecated in k6 v0.47.0 and is now removed. You could still output results to StatsD using the community xk6 extension LeonAdato/xk6-output-statsd. Thanks, @LeonAdato for taking over the extension!
open
will have a breaking change in the future.Currently,
open
opens relative files based on an unusual root, similar to howrequire
behaved before it was updated for ESM compatibility. To make k6 more consistent,open
and other functions like it will start handling relative paths in the same way as imports andrequire
.For a more in-depth explanation, please refer to the related issue.
With this version, k6 will start emitting warnings when it detects that in the future, this will break. We recommend using
import.meta.resolve()
as a way to make your scripts future proof.http.file#data
now truly has the same type as the provided data#4009
Previously
http.file#data
was always a slice of byte ([]byte
) - which was very likely a bug and a leftover from years past.The original aim (also documented) was to have the same type as the data provided when creating the
http.file
object, and it is now effectively the case.New features
Top-level await support
4007
After the initial native support for ECMAScript modules, k6 can now load those modules asynchronously which also allows
await
to be used in the top-level of a module. That is you can writeawait someFunc()
directly in the top most level of a module instead of having to make an async function that you call that can than useawait
.Until now, you had to wrap your code in an async function to use
await
in the top-level of a module. For example, the following code:Can now be written as:
This should make using the increasing number of async APIs in k6 easier in the init context.
This is not allowed in case of using the CommonJS modules, only ECMAScript modules, as CommonJS modules are synchronous by definition.
Complete[^1] RSA support for
k6/experimental/webcrypto
#4025
This update includes support for the RSA family of algorithms, including
RSA-OAEP
,RSA-PSS
andRSASSA-PKCS1-v1_5
. You can use these algorithms with thecrypto.subtle
API in the same way as the other algorithms, precisely forgenerateKey
,importKey
,exportKey
,encrypt
,decrypt
,sign
, andverify
operations.By implementing RSA support, we make our WebCrypto API implementation more complete and useful for a broader range of use cases.
[^1]: Since under the hood we do fully rely on the Golang's SDK, our implementation doesn't support zero salt lengths for the
RSA-PSS
sign
/verify
operations.Example usage
Expand to see an example of generation RSA-PSS key pair.
page.on('metric)
to group urls browser#371, browser#1487Modern websites are complex and make a high number of requests to function as intended by their developers. These requests no longer serve only content for display to the end user but also retrieve insights, analytics, advertisements, and for cache-busting purposes. Such requests are usually generated dynamically and may contain frequently changing IDs, posing challenges when correlating and analyzing your k6 test results.
When load testing a website using the k6 browser module, these dynamic requests can result in a high number of similar-looking requests, making it difficult to correlate them and extract valuable insights. This can also lead to test errors, such as a "too-many-metrics" error, due to high cardinality from metrics tagged with similar but dynamically changing URLs.
This issue also affects synthetic tests. While you may not encounter the "too-many-metrics" error, you may end up with a large amount of uncorrelated metric data that cannot be tracked effectively over time.
To address this in the browser module, we have implemented
page.on('metric')
, which allows you to define URL patterns using regex for matching. When a match is found, the URL and name tags for the metric are replaced with the new name.Example usage
Expand to see an example of working with `page.on('metric')`.
ControlOrMeta
support in the keyboard browser#1457This approach enables tests to be written for all platforms, accommodating either
Control
orMeta
for keyboard actions. For example,Control+click
on Windows andMeta+click
on Mac to open a link in a new window.Example usage
Expand to see an example usage of `ControlOrMeta`
UX improvements and enhancements
waitForSelector
error message to better reflect why a selector doesn't resolve to an element.experimental-prometheus-rw
output. This allows users to authenticate with AWS services that require SigV4 signing. Thanks, @obanby for the contribution!OTEL_SERVICE_NAME
environment variable for theexperimental-opentelemetry
output. This aligns better with standard OTEL practices. Thanks, @TimotejKovacka for the contribution!page.waitForTimeout
with tracing which will allow it to be displayed in the timeline.Bug fixes
page.on
.locator.waitFor
so it waits between navigations and doesn't throw an error.await
statement.Maintenance and internal improvements
check
helper.page.on
event code to streamline the addition and running of additional events.downloadsPath
option to specify the download directory. The browser module doesn't yet respect this option, but it will in the next release.check
polyfill, for the async checks.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 is behind base branch, 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 Renovate Bot.