fix(deps): update module go.k6.io/k6/v2 to v2.2.0 - #233
Open
renovate-sh-app[bot] wants to merge 1 commit into
Open
renovate-sh-app[bot] wants to merge 1 commit into
renovate-sh-app[bot] wants to merge 1 commit into
Conversation
renovate-sh-app
Bot
requested review from
carles-grafana,
electron0zero,
ie-pham,
javiermolinar,
mapno,
mattdurham,
mdisibio,
ruslan-mikhailov,
stoewer,
yvrhdn,
zalegrala and
zhxiaogg
as code owners
July 7, 2026 15:02
Contributor
Author
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
| datasource | package | from | to | | ---------- | -------------- | ------ | ------ | | go | go.k6.io/k6/v2 | v2.0.0 | v2.2.0 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
renovate-sh-app
Bot
force-pushed
the
renovate/go.k6.io-k6-v2-2.x
branch
from
August 13, 2026 15:02
2b52dc3 to
ed9e5cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
v2.0.0→v2.2.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
grafana/k6 (go.k6.io/k6/v2)
v2.2.0Compare Source
k6
v2.2.0is here 🎉! This release includes:k6 cloud run --local-executionnow streams k6's logs to Grafana Cloud, so the test run's log view works for local execution too.chromium.connectOverCDP(), which connects browser tests to an already-running Chromium instance.TextEncoderandTextDecoderavailable as globals, andWritableStreamsupport ink6/experimental/streams.k6 cloud load-zone listcommand.merge-run-tagsandfreeze-env.Breaking changes
There are no breaking changes in this release.
New features
k6 cloud run --local-executionstreams logs to Grafana Cloud #6171When a cloud test runs locally with
k6 cloud run --local-execution, k6's logs now stream to the Grafana Cloud test run, so the run's log view is populated the same way it is for cloud execution. Previously, local-execution logs stayed on the machine running k6 and never reached the cloud. Work with Grafana's secrets management to safely work with secrets and redact them if they're accidentally leaked into logs are pushed. Use the new--no-cloud-logsflag opts out to opt out of streaming of logs when working with--local-execution:Connect to a running browser with
chromium.connectOverCDP()#6165The browser module can now attach to an existing Chromium-based browser over the Chrome DevTools Protocol, mirroring Playwright's
browserType.connectOverCDP(). Pass the browser's WebSocket endpoint and k6 manages the returned browser's connection — it's auto-closed at the end of the iteration, though you can callclose()earlier to release the connection on demand.Unlike the
K6_BROWSER_WS_URLenvironment variable, the endpoint is a runtime value — you can, for example, request a fresh session URL from a browser provider's API insetup()and connect to it from the iterations.TextEncoderandTextDecoderglobals #6182TextEncoderandTextDecoderare now available as standard globals in both the init and VU contexts, no import required — matching how they are exposed in browsers and other JavaScript runtimes.WritableStreamink6/experimental/streams#6132The experimental streams module now implements
WritableStreamandWritableStreamDefaultWriterfollowing the WHATWG Streams specification, complementing the existingReadableStreamand paving the way for a futureTransformStreamimplementation.k6 cloud load-zone listcommand #6142A new
k6 cloud load-zone listsubcommand lists the load zones — public and private — available in the configured Grafana Cloud k6 stack, mirroring the existingk6 cloud project listcommand. Output defaults to a human-readable table; pass--jsonto emit a JSON array instead.Configurable
handleSummary()timeout #5854The time budget for the
handleSummary()callback — previously hardcoded to 120 seconds — is now configurable through thehandleSummaryTimeoutoption or theK6_HANDLE_SUMMARY_TIMEOUTenvironment variable, so long-running tests with heavy summaries no longer fail withhandleSummary() execution timed out. Thanks, @LBaronceli!New experimental feature flags:
merge-run-tagsandfreeze-envTwo new experimental flags join the feature-flag system introduced in v2.1.0:
merge-run-tagsmerges run tags per key across config layers, sooptions.tagsin a script is no longer silently discarded when--tagorK6_TAGSis also used — higher-priority layers win on conflicting keys instead of replacing the whole map. Thanks, @yordis!freeze-envfreezes the__ENVobject, so modifications from script code throw aTypeError(in strict mode) instead of silently persisting across iterations and scenarios. Thanks, @lohitkolluri!UX improvements and enhancements
response.allHeaders(),headerValue(),headerValues(), andheadersArray()— return the raw wire headers (includingSet-Cookieand security-related headers), correctly paired with each hop of a redirect chain instead of Chrome's provisional headers. As part of this,headerValues()now matches header names case-insensitively and splits repeated values on newlines rather than commas, and thebrowser_data_sent/browser_data_receivedmetrics now include the raw header bytes and no longer vary run-to-run with CDP event ordering.k6 cloudreject the run flags (for example,--vus) with anunknown flagerror and a non-zero exit code. Previouslyk6 cloud --vus 10 script.jsaccepted the flags, printed the help text, and exited 0 — running tests withk6 clouddirectly was deprecated in v2.0.0 in favor ofk6 cloud run.K6_CLOUD_SECRETS_TOKENandK6_CLOUD_SECRETS_ENDPOINTwhen a test run is reused viaK6_CLOUD_PUSH_REF_IDunder--local-execution, instead of suggesting the--local-executionflag the user is already using.catchblocks to the browser examples so a failing iteration reports the original error instead of a subsequentpage.close()failure. Thanks, @locker95!Bug fixes
error_codemetric tag stays correct when k6 is built with Go 1.27 (whosex/net/http2delegates to the standard library), and explicitly enables HTTP/2 negotiation on VU transports.--out lokiand cloud log streaming no longer lose the final batch, and emits ak6 dropped N log messageswarning when the cloud log buffer overflows instead of dropping logs silently.fs.open()calls on the same file no longer read zero or truncated bytes.Sec-WebSocket-Protocolheader when tailing Grafana Cloud logs; spec-strict servers rejected the handshake withwebsocket: bad handshake.rateunset when the observed duration is zero, instead of computing+Infand spuriously failingratethresholds. Thanks, @samarth70!max=0. Thanks, @Solaris-star!K6_OTEL_HEADERS. Thanks, @lukdz!SharedArraydeep-freezing JS primitives, which needlessly wrapped large strings inStringobjects — cutting memory usage in the reported reproduction from roughly 1 GB to 100 MB.Maintenance and internal improvements
k6/x/modules, output extensions selected with--out, andk6 xsubcommands). Private and unlisted extensions are never reported, and the existing--no-usage-reportopt-out covers it.WeakMap/WeakSetentries garbage-collectable, improving string and typed-array correctness and performance, and bounding regular-expression backtracking memory.k6 cloud run --local-executionfrom the legacy v1 cloud API to the v6 and provisioning APIs, and quietens its status polling logs. User-facing behavior is unchanged, andk6 run --out cloudstays on the legacy API.k6 cloud run --local-executionvia theK6_CLOUD_METRICS_PUSH_URLandK6_CLOUD_TEST_RUN_TOKENenvironment variables.github.com/grafana/k6-cloud-openapi-client-go, consuming the upstream retry body-reset fix (dropping the k6-side workaround) and the int64 resource-ID widening.go.k6.io/k6/v2module move..github/go-versions.env.get-vault-secretsv2.google.golang.org/grpctov1.83.0[security].golang.org/x/nettov0.56.0andgolang.org/x/texttov0.39.0in the gRPC server example [security].golang.org/xpackages,klauspost/compress,mattn/go-isatty,mccutchen/go-httpbin, the OpenTelemetry and Prometheus protobufs,andybalholm/brotli, andevanw/esbuild.1.26.5, Alpine to3.24.1, Debian totrixie-20260623).actions/checkouttov7,golangci/golangci-lint-actiontov9.3.0, and thegrafana/shared-workflowsactions.External contributors
A huge thank you to the external contributors who helped during this release: @LBaronceli, @yordis, @lohitkolluri, @locker95, @rohan-patnaik, @somak2kai, @samarth70, @Solaris-star, @lukdz, @the-onewho-knocks, @hyuraku, and @Martonveghcode! 🙏
v2.1.0Compare Source
k6
v2.1.0is here 🎉This release includes:
--features, theK6_FEATURESenvironment variable, and ak6 featuresdiscovery command — shipping with experimental native histograms for trend metrics as its first flag.proxyoption for browser contexts.k6 x, so binaries can report which extension commands they expose.Breaking changes
There are no breaking changes in this release.
New features
k6 cloud test listcommand #6007A new
k6 cloud testcommand group has been added, with ak6 cloud test listsubcommand that lists the load tests of a Grafana Cloud k6 project. It complements thek6 cloud project listcommand introduced in v2.0.0.The project to list tests for is resolved in the following order:
--project-idflag.K6_CLOUD_PROJECT_IDenvironment variable (cloud configprojectID).k6 cloud login.Output defaults to a human-readable table. Pass
--jsonto emit a JSON array instead, mirroring the format established byk6 cloud project list.Feature flags and experimental native histograms #6055, #6056
k6 now has an opt-in feature-flag mechanism for trialing new, not-yet-stable behavior without affecting existing runs. Flags can be enabled on
k6 runandk6 cloud runthrough the--featuresflag (comma-separated or repeated), theK6_FEATURESenvironment variable, or thefeatureskey inconfig.json. Enabled flags are surfaced as metric tags and propagated into archives and cloud workers so a run behaves consistently wherever it executes.Use
k6 features(ork6 features --json) to discover the available flags and their lifecycle:The first flag shipped is
native-histograms, an experimental flag that makes k6 use native histograms for trend metrics:k6 run --features native-histograms script.js # or K6_FEATURES=native-histograms k6 run script.jsSubcommand discovery in
k6 x#5972Running
k6 xnow lists the available subcommands — both the ones baked into the binary and those advertised by the extension registry (official and community). Tab-completion surfaces the same set once the catalog has been cached locally by a priork6 xrun, so completion never blocks on the network.This makes a k6 binary self-describing — particularly useful for AI agents driving k6, which previously had no way to introspect which extension subcommands were available.
Browser context proxy option #5924
Browser contexts can now be configured with a context-level
proxyoption, letting you route a context's traffic through a proxy without launching a custom-built binary or relying on environment proxy variables (which only affected k6's DevTools WebSocket connection). The option is wired to Chromium throughTarget.createBrowserContext, and invalid proxy configuration now fails early whenproxy.serveris missing. Thanks, @nightt5879!Browser
locator.isInViewport()#6023A new
locator.isInViewport()method reports whether an element intersects the browser viewport. It accepts an optionalratio(0 to 1) that sets how much of the element must be visible, defaulting to0so any visible pixel counts, matching Playwright'stoBeInViewportsemantics. The call waits for the element to attach, honoring thetimeoutoption, then measures the intersection once. Thanks, @Anuragp22!Basic auth for the OpenTelemetry HTTP exporter #5997
The OpenTelemetry output's HTTP exporter can now send HTTP Basic Auth credentials. Set them through the
K6_OTEL_HTTP_EXPORTER_USERNAMEandK6_OTEL_HTTP_EXPORTER_PASSWORDenvironment variables, or theusernameandpasswordkeys in the output config.single()selection helper ink6/html#6002Selection.single(selector)returns at most one matching element, backed by goquery'sSinglematcher for a faster lookup thanfind()when you only need the first match. Thanks, @rohan-patnaik!UX improvements and enhancements
module=browserso that browser errors surfaced in Grafana Cloud Logs can be filtered separately from other log sources.Bug fixes
--vusflag work as a standalone execution shortcut instead of being silently ignored when a script defines scenarios. Runningk6 run script.js --vus Nnow creates ashared-iterationsscenario withNVUs andNiterations, overriding any script-defined scenarios with a warning — consistent with how--iterations,--duration, and--stagesalready behave. Thanks, @Reranko05!NaN) now fails parsing with a clear message instead of being silently accepted. Thanks, @immanuwell!0o600, inside a0o700directory). The file can hold the Grafana Cloud API token (collectors.cloud.token), so tightening it keeps other local users on shared hosts (CI runners, multi-user boxes, sidecar containers) from reading the token. Existing configs are upgraded on the next write, for example the nextk6 cloud login.Maintenance and internal improvements
s3cmdviaaptinstead ofpipto fix thek6packagerimage build.logrus, improving test isolation.TestPageScreenshotFullpagebrowser test.setup-goworkflows.golang.org/x/nettov0.55.0[security].golang.org/x/cryptotov0.52.0[security].google.golang.org/grpctov1.81.1.grafana/shared-workflows/get-vault-secretstov1.3.2.grafana/shared-workflows/azure-trusted-signingtov1.0.2.github/codeql-actiontov4.35.4.grafana/shared-workflows/dockerhub-logintov1.0.4.PageScreenshotOptionsparsing into the mapping layer.openspec/.x/net/http2implementation on thegotipCI test job.Dockerfileon the v1.x branch.go.opentelemetry.io/oteltov1.44.0.golang.org/xdependencies (cryptotov0.53.0,nettov0.56.0,termtov0.44.0).golang.org/x/synctov0.21.0.github.com/tidwall/gjsontov1.19.0.github.com/mccutchen/go-httpbin/v2tov2.23.0.github.com/mattn/go-colorabletov0.1.15.1.26.4.3.24.0.trixie-20260518.External contributors
A huge thank you to the external contributors who helped during this release: @nightt5879, @Reranko05, @rohan-patnaik, @immanuwell, and @Anuragp22! 🙏
Configuration
📅 Schedule: (UTC)
* 0-3 1 * *)🚦 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.
Need help?
You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.