From 9488773b30ef0a820230f02f7e27032f96e0c729 Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Thu, 27 Mar 2025 11:00:20 +0100 Subject: [PATCH 01/10] Bootstrap the v1.0.0 release notes --- release notes/v1.0.0.md | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 release notes/v1.0.0.md diff --git a/release notes/v1.0.0.md b/release notes/v1.0.0.md new file mode 100644 index 00000000000..26205aa46d8 --- /dev/null +++ b/release notes/v1.0.0.md @@ -0,0 +1,47 @@ +k6 `v1.0.0` is here 🎉! This release includes: + +- (_optional_) `` +- `` (_one or multiple bullets_) + +## Breaking changes + +- `#pr`, `` +- `#pr`, `` + +### (_optional h3_) `` `#pr` + +## New features + +_optional intro here_ + +### `` `#pr` + +_what, why, and what this means for the user_ + +### `` `#pr` + +_what, why, and what this means for the user_ + +## UX improvements and enhancements + +_Format as ` . `_: + +- _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ +- `#pr` `` +- `#pr` `` + +## Bug fixes + +_Format as ` . `_: + +- _`#111` Fixes race condition in runtime_ + +## Maintenance and internal improvements + +_Format as ` . `_: + +- _`#2770` Refactors parts of the JS module._ + +## _Optional_ Roadmap + +_Discussion of future plans_ From 2de3a585c440f33963bd9192e5b3fa1ba0abbb2a Mon Sep 17 00:00:00 2001 From: codebien <2103732+codebien@users.noreply.github.com> Date: Wed, 23 Apr 2025 20:06:21 +0200 Subject: [PATCH 02/10] A very primitive version of release notes --- release notes/v1.0.0.md | 59 ++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/release notes/v1.0.0.md b/release notes/v1.0.0.md index 26205aa46d8..f9638f02806 100644 --- a/release notes/v1.0.0.md +++ b/release notes/v1.0.0.md @@ -1,47 +1,50 @@ -k6 `v1.0.0` is here 🎉! This release includes: +k6 `v1.0.0` is here 🎉! -- (_optional_) `` -- `` (_one or multiple bullets_) +After 9 years, 9k+ commits and 58 releases from the first commit in 2015, we're excited to announce that we're going to leave behind the `v0.x` series. Starting from now k6 aligns with the industry standard of following the semantic versioning scheme and will release this and future versions by following its new stability policy. -## Breaking changes +This release includes: -- `#pr`, `` -- `#pr`, `` - -### (_optional h3_) `` `#pr` +- Native support for extensions in the Cloud +- New test failure control with `execution.test.fail` +- Documentation for the stability guarantees ## New features -_optional intro here_ +### Native support for extensions in the Cloud [#4670](https://github.com/grafana/k6/pull/4671) -### `` `#pr` +The new Binary provisioning feature automatically requests and uses custom k6 binaries with the required extensions for your tests. This allows you to run scripts that use extensions without manually rebuilding k6 as it was in the past by depending on tools like `xk6`. The system caches binaries locally for efficiency, and any additional runs with the same dependencies will use the same binary and will run faster. -_what, why, and what this means for the user_ +Binary provisioning is available for all k6 Cloud users (free and paid plans), and it's enabled by opt-in with the feature flag `K6_BINARY_PROVISIONING=true`. -### `` `#pr` +Binary provisioning is a limited set of extensions that are supported, and it's not available for the `k6 run` command that might be added in the future. However, local development is supported with the `k6 cloud --local-execution` command if a cloud token is provided by the canonical login methods. -_what, why, and what this means for the user_ +### Test failure control with `execution.test.fail` [#4672](https://github.com/grafana/k6/pull/4672) -## UX improvements and enhancements +The new `execution.test.fail` function allows you to explicitly fail a test while letting it continue execution until completion. This gives you more control over test outcomes while still collecting all metrics and completing necessary cleanup tasks. -_Format as ` . `_: -- _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ -- `#pr` `` -- `#pr` `` +## UX improvements and enhancements -## Bug fixes +- [#4698](https://github.com/grafana/k6/pull/4698) Displays threshold values even when are not configured in `summaryTrendStats` option. +- [#4699](https://github.com/grafana/k6/pull/4699) Drops the link of the legacy k6 website from the user agent. -_Format as ` . `_: +## Bug fixes -- _`#111` Fixes race condition in runtime_ +- [undefined] Safeguards against `pressedKeys` being updated concurrently in browser module. +- [undefined] Uses empty struct instead of a bool for a set in browser module. +- [#4665](https://github.com/grafana/k6/pull/4665) Prevents race condition between `Ended` & `Interrupted` execution states. +- [undefined] Makes `secretsource` also redact `float32` and `float64` values. ## Maintenance and internal improvements -_Format as ` . `_: - -- _`#2770` Refactors parts of the JS module._ - -## _Optional_ Roadmap - -_Discussion of future plans_ +- [undefined] Move several packages to `internal` as preparations for v0.0.0 stabilization +- [#4686](https://github.com/grafana/k6/pull/4686) Drops the redundant `NO_COLOR` detection. +- [undefined] Uses native JavaScript objects in browser module. +- [#4726](https://github.com/grafana/k6/pull/4726) Unifies the internal/cmd.Execute methods. +- [#4693](https://github.com/grafana/k6/pull/4693) Bumps OTel dependency. +- [#4691](https://github.com/grafana/k6/pull/4691) Bumps x509roots/fallback dependency. +- [undefined] Makes wptTests run without tags or skip if repos not checkout. +- [undefined] Fixes WebCrypto errors not propagating from the tests. +- [#4674](https://github.com/grafana/k6/pull/4674) Bumps the golangx group across 1 directory with 6 updates. +- [#4673](https://github.com/grafana/k6/pull/4673) Bumps google.golang.org/grpc in the googles group. +- [#4663](https://github.com/grafana/k6/pull/4663) Bumps github.com/evanw/esbuild from 0.25.1 to 0.25.2. From aeec317967b51736a6b7a489b7306eb204ab88a9 Mon Sep 17 00:00:00 2001 From: oleiade Date: Thu, 24 Apr 2025 11:10:24 +0200 Subject: [PATCH 03/10] Document execution.test.fail --- release notes/v1.0.0.md | 80 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/release notes/v1.0.0.md b/release notes/v1.0.0.md index f9638f02806..cc72fbd560c 100644 --- a/release notes/v1.0.0.md +++ b/release notes/v1.0.0.md @@ -20,8 +20,84 @@ Binary provisioning is a limited set of extensions that are supported, and it's ### Test failure control with `execution.test.fail` [#4672](https://github.com/grafana/k6/pull/4672) -The new `execution.test.fail` function allows you to explicitly fail a test while letting it continue execution until completion. This gives you more control over test outcomes while still collecting all metrics and completing necessary cleanup tasks. - +The new `execution.test.fail` function enables controlled test failure reporting without interrupting the test execution. When called, this method marks the entire test run as failed while allowing all iterations to complete normally. The test will exit with code `110`, making failures detectable by external systems. This provides graceful error handling for scenarios akin to [functional testing](https://github.com/grafana/k6-jslib-testing). + +For example, the following script: +```javascript +import http from "k6/http"; +import exec from "k6/execution"; + +export const options = { + iterations: 10, +}; + +export default function () { + http.get("https://quickpizza.grafana.com"); + + if (exec.vu.iterationInInstance === 3) { + exec.test.fail(`iteration ${exec.vu.iterationInInstance}: marked the test as failed`); + } + + console.log(`iteration ${exec.vu.iterationInInstance} executed`); +} +``` + +When ran: +```bash +k6 run script.js; echo $? +``` + +Will display the following and return with exit code `110`: +``` + /\ Grafana /‾‾/ + /\ / \ |\ __ / / + / \/ \ | |/ / / ‾‾\ + / \ | ( | (‾) | + / __________ \ |_|\_\ \_____/ + + execution: local + script: script.js + output: - + + scenarios: (100.00%) 1 scenario, 1 max VUs, 10m30s max duration (incl. graceful stop): + * default: 10 iterations shared among 1 VUs (maxDuration: 10m0s, gracefulStop: 30s) + +INFO[0000] iteration 0 executed source=console +INFO[0000] iteration 1 executed source=console +INFO[0000] iteration 2 executed source=console +ERRO[0000] iteration 3: marked the test as failed +INFO[0000] iteration 3 executed source=console +INFO[0001] iteration 4 executed source=console +INFO[0001] iteration 5 executed source=console +INFO[0001] iteration 6 executed source=console +INFO[0001] iteration 7 executed source=console +INFO[0001] iteration 8 executed source=console +INFO[0001] iteration 9 executed source=console + + + █ TOTAL RESULTS + + HTTP + http_req_duration.......................................................: avg=129.22ms min=127.9ms med=129.17ms max=130.83ms p(90)=130.51ms p(95)=130.67ms + { expected_response:true }............................................: avg=129.22ms min=127.9ms med=129.17ms max=130.83ms p(90)=130.51ms p(95)=130.67ms + http_req_failed.........................................................: 0.00% 0 out of 10 + http_reqs...............................................................: 10 5.763858/s + + EXECUTION + iteration_duration......................................................: avg=173.46ms min=128.07ms med=129.43ms max=569.82ms p(90)=174.89ms p(95)=372.36ms + iterations..............................................................: 10 5.763858/s + vus.....................................................................: 1 min=1 max=1 + vus_max.................................................................: 1 min=1 max=1 + + NETWORK + data_received...........................................................: 32 kB 19 kB/s + data_sent...............................................................: 1.0 kB 601 B/s + +running (00m01.7s), 0/1 VUs, 10 complete and 0 interrupted iterations +default ✓ [======================================] 1 VUs 00m01.7s/10m0s 10/10 shared iters +ERRO[0001] test run was marked as failed +k6 exited with status: 110 +``` ## UX improvements and enhancements From 5218be80f8e550de773ed82281ac854c19f2f320 Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Thu, 24 Apr 2025 17:54:07 +0300 Subject: [PATCH 04/10] update my PRs --- release notes/v1.0.0.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/release notes/v1.0.0.md b/release notes/v1.0.0.md index cc72fbd560c..09bc76fab27 100644 --- a/release notes/v1.0.0.md +++ b/release notes/v1.0.0.md @@ -106,21 +106,21 @@ k6 exited with status: 110 ## Bug fixes -- [undefined] Safeguards against `pressedKeys` being updated concurrently in browser module. -- [undefined] Uses empty struct instead of a bool for a set in browser module. +- [#4717](https://github.com/grafana/k6/pull/4717) Safeguards against `pressedKeys` being updated concurrently in browser module. Also empty struct instead of a bool for a set in browser module. - [#4665](https://github.com/grafana/k6/pull/4665) Prevents race condition between `Ended` & `Interrupted` execution states. -- [undefined] Makes `secretsource` also redact `float32` and `float64` values. +- [#4677](https://github.com/grafana/k6/pull/4677) Makes `secretsource` also redact `float32` and `float64` values. ## Maintenance and internal improvements -- [undefined] Move several packages to `internal` as preparations for v0.0.0 stabilization +- [#4675](https://github.com/grafana/k6/pull/4675), [#4676](https://github.com/grafana/k6/pull/4676), [#4678](https://github.com/grafana/k6/pull/4678) Move several packages to `internal` as preparations for v1.0.0 stabilization - [#4686](https://github.com/grafana/k6/pull/4686) Drops the redundant `NO_COLOR` detection. - [undefined] Uses native JavaScript objects in browser module. - [#4726](https://github.com/grafana/k6/pull/4726) Unifies the internal/cmd.Execute methods. +- [#4669](https://github.com/grafana/k6/pull/4669) Do not report runs during tests. - [#4693](https://github.com/grafana/k6/pull/4693) Bumps OTel dependency. - [#4691](https://github.com/grafana/k6/pull/4691) Bumps x509roots/fallback dependency. -- [undefined] Makes wptTests run without tags or skip if repos not checkout. -- [undefined] Fixes WebCrypto errors not propagating from the tests. +- [#4701](https://github.com/grafana/k6/pull/4701) Fixes WebCrypto errors not propagating from the tests. +- [#4703](https://github.com/grafana/k6/pull/4703) Makes wptTests run without tags or skip if repos not checkout. - [#4674](https://github.com/grafana/k6/pull/4674) Bumps the golangx group across 1 directory with 6 updates. - [#4673](https://github.com/grafana/k6/pull/4673) Bumps google.golang.org/grpc in the googles group. - [#4663](https://github.com/grafana/k6/pull/4663) Bumps github.com/evanw/esbuild from 0.25.1 to 0.25.2. From 4413aac8e24d8d9ef6cc56c7234f4b4a66c1c0b2 Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Thu, 24 Apr 2025 18:59:41 +0200 Subject: [PATCH 05/10] Amend 4709 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: İnanç Gümüş --- release notes/v1.0.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v1.0.0.md b/release notes/v1.0.0.md index 09bc76fab27..de912a92693 100644 --- a/release notes/v1.0.0.md +++ b/release notes/v1.0.0.md @@ -114,7 +114,7 @@ k6 exited with status: 110 - [#4675](https://github.com/grafana/k6/pull/4675), [#4676](https://github.com/grafana/k6/pull/4676), [#4678](https://github.com/grafana/k6/pull/4678) Move several packages to `internal` as preparations for v1.0.0 stabilization - [#4686](https://github.com/grafana/k6/pull/4686) Drops the redundant `NO_COLOR` detection. -- [undefined] Uses native JavaScript objects in browser module. +- [#4709](https://github.com/grafana/k6/pull/4709) Fixes JS native objects override to avoid a page under the test from overwriting native JavaScript objects, like `Set` and `Map`. - [#4726](https://github.com/grafana/k6/pull/4726) Unifies the internal/cmd.Execute methods. - [#4669](https://github.com/grafana/k6/pull/4669) Do not report runs during tests. - [#4693](https://github.com/grafana/k6/pull/4693) Bumps OTel dependency. From 73278923d48fc9823c16fd076ee8985d02994d53 Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Fri, 25 Apr 2025 10:20:27 +0300 Subject: [PATCH 06/10] Add #4716 --- release notes/v1.0.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/release notes/v1.0.0.md b/release notes/v1.0.0.md index de912a92693..9f373e19593 100644 --- a/release notes/v1.0.0.md +++ b/release notes/v1.0.0.md @@ -109,6 +109,7 @@ k6 exited with status: 110 - [#4717](https://github.com/grafana/k6/pull/4717) Safeguards against `pressedKeys` being updated concurrently in browser module. Also empty struct instead of a bool for a set in browser module. - [#4665](https://github.com/grafana/k6/pull/4665) Prevents race condition between `Ended` & `Interrupted` execution states. - [#4677](https://github.com/grafana/k6/pull/4677) Makes `secretsource` also redact `float32` and `float64` values. +- [#4716](https://github.com/grafana/k6/pull/4716) Fix race where browser worker were added/removed concurrently. ## Maintenance and internal improvements From 22166d7313f5483643fdb624b55af4394dad59e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Fri, 25 Apr 2025 12:10:17 +0200 Subject: [PATCH 07/10] Update release notes/v1.0.0.md Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v1.0.0.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/release notes/v1.0.0.md b/release notes/v1.0.0.md index 9f373e19593..e163d3a12cd 100644 --- a/release notes/v1.0.0.md +++ b/release notes/v1.0.0.md @@ -47,7 +47,12 @@ When ran: k6 run script.js; echo $? ``` -Will display the following and return with exit code `110`: +Will return with exit code `110` and it display the following output: + +ERRO[0001] test run was marked as failed +k6 exited with status: 110 + +Expand below to see the full output for the example: ``` /\ Grafana /‾‾/ /\ / \ |\ __ / / From 397ae49c3900607952776edf7d5b5bfcf529d229 Mon Sep 17 00:00:00 2001 From: oleiade Date: Fri, 25 Apr 2025 12:16:10 +0200 Subject: [PATCH 08/10] Apply pull request review suggestions --- release notes/v1.0.0.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/release notes/v1.0.0.md b/release notes/v1.0.0.md index e163d3a12cd..ef6cbe419a3 100644 --- a/release notes/v1.0.0.md +++ b/release notes/v1.0.0.md @@ -47,12 +47,16 @@ When ran: k6 run script.js; echo $? ``` -Will return with exit code `110` and it display the following output: - +Will return with exit code `110` and the ending of its output will display the following messages: +``` ERRO[0001] test run was marked as failed k6 exited with status: 110 +``` + +
+ +Expand below to see the full output for the example: -Expand below to see the full output for the example: ``` /\ Grafana /‾‾/ /\ / \ |\ __ / / @@ -104,6 +108,8 @@ ERRO[0001] test run was marked as failed k6 exited with status: 110 ``` +
+ ## UX improvements and enhancements - [#4698](https://github.com/grafana/k6/pull/4698) Displays threshold values even when are not configured in `summaryTrendStats` option. From 8893e1415415b04c7c8a31329de55fc5a3ced0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 25 Apr 2025 07:43:59 -0400 Subject: [PATCH 09/10] Add 4739 --- release notes/v1.0.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/release notes/v1.0.0.md b/release notes/v1.0.0.md index ef6cbe419a3..1173d414c9f 100644 --- a/release notes/v1.0.0.md +++ b/release notes/v1.0.0.md @@ -136,3 +136,4 @@ k6 exited with status: 110 - [#4674](https://github.com/grafana/k6/pull/4674) Bumps the golangx group across 1 directory with 6 updates. - [#4673](https://github.com/grafana/k6/pull/4673) Bumps google.golang.org/grpc in the googles group. - [#4663](https://github.com/grafana/k6/pull/4663) Bumps github.com/evanw/esbuild from 0.25.1 to 0.25.2. +- [4739](https://github.com/grafana/k6/pull/4739) Removes deprecated `GetLayoutMetrics.VisualViewport` CDP usage. From d6951369d59b7fe00ccc344cda71c3ffdbbdd543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 25 Apr 2025 07:44:50 -0400 Subject: [PATCH 10/10] Fix 4739 dash --- release notes/v1.0.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v1.0.0.md b/release notes/v1.0.0.md index 1173d414c9f..c7581d8564c 100644 --- a/release notes/v1.0.0.md +++ b/release notes/v1.0.0.md @@ -136,4 +136,4 @@ k6 exited with status: 110 - [#4674](https://github.com/grafana/k6/pull/4674) Bumps the golangx group across 1 directory with 6 updates. - [#4673](https://github.com/grafana/k6/pull/4673) Bumps google.golang.org/grpc in the googles group. - [#4663](https://github.com/grafana/k6/pull/4663) Bumps github.com/evanw/esbuild from 0.25.1 to 0.25.2. -- [4739](https://github.com/grafana/k6/pull/4739) Removes deprecated `GetLayoutMetrics.VisualViewport` CDP usage. +- [#4739](https://github.com/grafana/k6/pull/4739) Removes deprecated `GetLayoutMetrics.VisualViewport` CDP usage.