From f2a2eb1161f3f5f5c536aa161ff1c43c738b6967 Mon Sep 17 00:00:00 2001 From: codebien <2103732+codebien@users.noreply.github.com> Date: Mon, 21 Aug 2023 12:14:52 +0200 Subject: [PATCH 01/27] Init release notes v0.47.0 --- release notes/v0.47.0.md | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 release notes/v0.47.0.md diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md new file mode 100644 index 00000000000..4dcb69fe4d1 --- /dev/null +++ b/release notes/v0.47.0.md @@ -0,0 +1,47 @@ +k6 `v0.47.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 3ac4078152660f372f9d20d660ff51e0d1315fb1 Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Mon, 25 Sep 2023 09:18:15 +0200 Subject: [PATCH 02/27] gRPC related changelogs --- release notes/v0.47.0.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 4dcb69fe4d1..4167b4f72fe 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -23,23 +23,39 @@ _what, why, and what this means for the user_ _what, why, and what this means for the user_ +### Add gRPC's binary metadata support [#3234](https://github.com/grafana/k6/pull/3234), [xk6-grpc#46](https://github.com/grafana/xk6-grpc/pull/46) + +By specification gRPC metadata with the `-bin` postfix should be treated as binary data. These PRs add the support of such metadata to the `k6/net/grpc` and `k6/experimental/grpc` modules. + +```js +let resp = client.invoke("grpc.testing.TestService/EmptyCall", {}, { metadata: { "X-Load-Tester-bin": new Uint8Array([2, 200]) } }) +``` + +Thanks, @sapphire-janrain, for contribution! + +### Add the reflection metadata [#3343](https://github.com/grafana/k6/pull/3343), [xk6-grpc#46](https://github.com/grafana/xk6-grpc/pull/46) + +In some workflows the reflection call should also include some metadata. This PR adds [a new connection parameter `reflectMetadata`](https://k6.io/docs/javascript-api/k6-net-grpc/client/client-connect/#connectparams) that allows to specify the metadata to be sent with the reflection call. + ### UX improvements and enhancements _Format as ` . `_: +- [#3338](https://github.com/grafana/k6/pull/3338) and [xk6-grpc#48](https://github.com/grafana/xk6-grpc/pull/48). Adds a support of the v1 of the gRPC reflection protocol. - _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ - `#pr` `` - `#pr` `` ## Bug fixes -_Format as ` . `_: -- _`#111` fixes race condition in runtime_ +- [xk6-grpc#47](https://github.com/grafana/xk6-grpc/pull/47) fix the premature closing of the stream when a stream's client has finished sending. Thanks, @thiagodpf, for reporting! +- [#3344](https://github.com/grafana/k6/pull/3344) and [xk6-grpc#49](https://github.com/grafana/xk6-grpc/pull/49) adds (fixes) the support of google protobuf wrappers. Thanks, @zibul444, for reporting! ## Maintenance and internal improvements _Format as ` . `_: - _`#2770` Refactors parts of the JS module._ +- [#3342](https://github.com/grafana/k6/pull/3342). Updates xk6-grpc to the latest version. This change brings all the latest fixes and improvements to the experimental gRPC module. ## _Optional_ Roadmap From 547de6063fc1fdcb4248b9f27443230c0aade9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 27 Sep 2023 11:10:20 +0300 Subject: [PATCH 03/27] Add improved cookie API release notes (#3352) * Add improved cookie API release notes * Add a cookie usage example * Improve cookie docs PR links Co-authored-by: Ankur * Remove cookie list of PRs * Fix typo "retrieving" * Remove PW link Co-authored-by: ka3de --------- Co-authored-by: Ankur Co-authored-by: ka3de --- release notes/v0.47.0.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 4167b4f72fe..c7cf996ce4d 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -37,6 +37,28 @@ Thanks, @sapphire-janrain, for contribution! In some workflows the reflection call should also include some metadata. This PR adds [a new connection parameter `reflectMetadata`](https://k6.io/docs/javascript-api/k6-net-grpc/client/client-connect/#connectparams) that allows to specify the metadata to be sent with the reflection call. +### Improved the browser module's cookie API + +The browser module now provides a more complete and robust API for handling cookies. We stabilized the cookie API by defining a new [`Cookie` class](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/cookie) ([browser#1008](https://github.com/grafana/xk6-browser/pull/1008), [browser#1030](https://github.com/grafana/xk6-browser/pull/1030)) that can be used while creating and retrieving cookies. + +We added a new [`browserContext.cookies([urls])`](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/cookies/) ([browser#1005](https://github.com/grafana/xk6-browser/pull/1005)) method that returns all cookies from the current [browser context](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext). The new API also supports filtering cookies by URL ([browser#1016](https://github.com/grafana/xk6-browser/pull/1016)). We also fixed a bug where the `expires` field was not being set correctly while adding cookies using the [`context.addCookie()`](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/addcookies/) method. Lastly, we fixed the existing [`context.clearCookies()`](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/clearcookies) method to clear all cookies from the current [browser context](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext). + +```js +const context = browser.newContext(); +context.addCookies([ + {name: 'foo', value: 'bar', url: 'https://test.k6.io'}, + {name: 'baz', value: 'qux', url: 'https://grafana.com'}, +]); + +const cookies = context.cookies('https://test.k6.io'); +console.log(cookies.length); // 1 +console.log(cookies[0].name); // foo +console.log(cookies[0].value); // bar + +context.clearCookies(); +console.log(context.cookies.length); // 0 +``` + ### UX improvements and enhancements _Format as ` . `_: @@ -50,6 +72,9 @@ _Format as ` . `_: - [xk6-grpc#47](https://github.com/grafana/xk6-grpc/pull/47) fix the premature closing of the stream when a stream's client has finished sending. Thanks, @thiagodpf, for reporting! - [#3344](https://github.com/grafana/k6/pull/3344) and [xk6-grpc#49](https://github.com/grafana/xk6-grpc/pull/49) adds (fixes) the support of google protobuf wrappers. Thanks, @zibul444, for reporting! +- [browser#1040](https://github.com/grafana/xk6-browser/pull/1040) fix the `context.clearCookies()` method to clear all cookies from the current browser context. +- [browser#1031](https://github.com/grafana/xk6-browser/pull/1031) fix the `expires` field while adding cookies using the `context.addCookie()` method. +- [browser#1039](https://github.com/grafana/xk6-browser/pull/1039) fix Goja conversions while adding and retrieving cookies. ## Maintenance and internal improvements From a1646032f6a320a00dc29e8526184226ae438b3e Mon Sep 17 00:00:00 2001 From: ka3de Date: Wed, 27 Sep 2023 15:00:11 +0200 Subject: [PATCH 04/27] Add browser's `page.on('console')` to release notes (#3353) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ankur Co-authored-by: İnanç Gümüş --- release notes/v0.47.0.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index c7cf996ce4d..fced9d30f9e 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -59,6 +59,10 @@ context.clearCookies(); console.log(context.cookies.length); // 0 ``` +### Add support for browser module's `page.on('console')` [browser#1006](https://github.com/grafana/xk6-browser/pull/1006) + +Allows 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)[https://k6.io/docs/javascript-api/k6-experimental/browser/consolemessage/] class. + ### UX improvements and enhancements _Format as ` . `_: From 9772c963e99fb44abbbafb321b5721c0e5b9dbd5 Mon Sep 17 00:00:00 2001 From: ka3de Date: Wed, 27 Sep 2023 15:02:56 +0200 Subject: [PATCH 05/27] Fix browser ConsoleMessage link --- release notes/v0.47.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index fced9d30f9e..be3f8433e3b 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -61,7 +61,7 @@ console.log(context.cookies.length); // 0 ### Add support for browser module's `page.on('console')` [browser#1006](https://github.com/grafana/xk6-browser/pull/1006) -Allows 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)[https://k6.io/docs/javascript-api/k6-experimental/browser/consolemessage/] class. +Allows 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](https://k6.io/docs/javascript-api/k6-experimental/browser/consolemessage/) class. ### UX improvements and enhancements From f890f1922df1c478bd2603be19ba511628a0869f Mon Sep 17 00:00:00 2001 From: codebien <2103732+codebien@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:16:32 +0200 Subject: [PATCH 06/27] k6-core release notes --- release notes/v0.47.0.md | 53 ++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index be3f8433e3b..e4e29444d87 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -3,26 +3,14 @@ k6 `v0.47.0` is here 🎉! This release includes: - (_optional_) `` - `` (_one or multiple bullets_) - ## Breaking changes -- `#pr`, `` -- `#pr`, `` - -### (_optional h3_) `` `#pr` +- [#3347](https://github.com/grafana/k6/pull/3347) `statsd` output is now deprecated. Check out [#2982](https://github.com/grafana/k6/issues/2982) for the future plans. +- [#3335](https://github.com/grafana/k6/pull/3335) Metric names will be limited to 128 characters following the OpenTelemetry update instead of the previous limit of 63 characters. k6 will return an error from the next release (v0.48.0) if the limit is hit. +- [#3288](https://github.com/grafana/k6/pull/3288) Deprecate k6 figuring out if an import specifier is a URL by trying to resolve it by prepending `https://` in case it can't figure it out. To be fully removed v0.48.0. ## 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_ - ### Add gRPC's binary metadata support [#3234](https://github.com/grafana/k6/pull/3234), [xk6-grpc#46](https://github.com/grafana/xk6-grpc/pull/46) By specification gRPC metadata with the `-bin` postfix should be treated as binary data. These PRs add the support of such metadata to the `k6/net/grpc` and `k6/experimental/grpc` modules. @@ -37,6 +25,14 @@ Thanks, @sapphire-janrain, for contribution! In some workflows the reflection call should also include some metadata. This PR adds [a new connection parameter `reflectMetadata`](https://k6.io/docs/javascript-api/k6-net-grpc/client/client-connect/#connectparams) that allows to specify the metadata to be sent with the reflection call. +### Higher precision for Trend metrics in Cloud [#3302](https://github.com/grafana/k6/pull/3302) + +k6 Cloud is now able to store and visualize Trend metrics up to 3 digits of precision for decimal numbers. + +### Docker images for Arm64 architecture [#3320](https://github.com/grafana/k6/pull/3320) + +k6 builds and pushes dedicated Docker images for Arm64 architecture. Check k6's [tags page](https://hub.docker.com/r/grafana/k6/tags) on DockerHub for details. + ### Improved the browser module's cookie API The browser module now provides a more complete and robust API for handling cookies. We stabilized the cookie API by defining a new [`Cookie` class](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/cookie) ([browser#1008](https://github.com/grafana/xk6-browser/pull/1008), [browser#1030](https://github.com/grafana/xk6-browser/pull/1030)) that can be used while creating and retrieving cookies. @@ -65,26 +61,31 @@ Allows users to register a handler to be executed every time the `console` API m ### UX improvements and enhancements -_Format as ` . `_: - -- [#3338](https://github.com/grafana/k6/pull/3338) and [xk6-grpc#48](https://github.com/grafana/xk6-grpc/pull/48). Adds a support of the v1 of the gRPC reflection protocol. -- _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ -- `#pr` `` -- `#pr` `` +- [#3338](https://github.com/grafana/k6/pull/3338), [xk6-grpc#48](https://github.com/grafana/xk6-grpc/pull/48). Adds a support of the v1 of the gRPC reflection protocol. +- [#3290](https://github.com/grafana/k6/pull/3290) Log errors when executing `setup` and `teardown` via REST API. +- [#3327](https://github.com/grafana/k6/pull/3290) `k6 version` now prints the commit identifier for the build. +- [#3340](https://github.com/grafana/k6/pull/3340) The k6 ``*-with-browser`` Docker images set now the `no-sandbox` environment variable automatically. ## Bug fixes -- [xk6-grpc#47](https://github.com/grafana/xk6-grpc/pull/47) fix the premature closing of the stream when a stream's client has finished sending. Thanks, @thiagodpf, for reporting! -- [#3344](https://github.com/grafana/k6/pull/3344) and [xk6-grpc#49](https://github.com/grafana/xk6-grpc/pull/49) adds (fixes) the support of google protobuf wrappers. Thanks, @zibul444, for reporting! +- [xk6-grpc#47](https://github.com/grafana/xk6-grpc/pull/47) Fix the premature closing of the stream when a stream's client has finished sending. Thanks, @thiagodpf, for reporting! +- [#3344](https://github.com/grafana/k6/pull/3344), [xk6-grpc#49](https://github.com/grafana/xk6-grpc/pull/49) adds (fixes) the support of google protobuf wrappers. Thanks, @zibul444, for reporting! +- [#3346](https://github.com/grafana/k6/pull/3346) A data race when `http.batch` it is used with binary response has been fixed. +- [#3344](https://github.com/grafana/k6/pull/3344) The gRPC module supports now the Google protobuf wrappers as expected. +- [#3308](https://github.com/grafana/k6/pull/3308) `goja` version has been updated and it fixes a compiler bug when class is declared in a function with argument. - [browser#1040](https://github.com/grafana/xk6-browser/pull/1040) fix the `context.clearCookies()` method to clear all cookies from the current browser context. - [browser#1031](https://github.com/grafana/xk6-browser/pull/1031) fix the `expires` field while adding cookies using the `context.addCookie()` method. - [browser#1039](https://github.com/grafana/xk6-browser/pull/1039) fix Goja conversions while adding and retrieving cookies. ## Maintenance and internal improvements -_Format as ` . `_: -- _`#2770` Refactors parts of the JS module._ -- [#3342](https://github.com/grafana/k6/pull/3342). Updates xk6-grpc to the latest version. This change brings all the latest fixes and improvements to the experimental gRPC module. +- [#3342](https://github.com/grafana/k6/pull/3342) Updates xk6-grpc to the latest version. This change brings all the latest fixes and improvements to the experimental gRPC module. +- [#3271](https://github.com/grafana/k6/pull/3271),[#3272](https://github.com/grafana/k6/pull/3272) Updated the golangci version and added the `interfacebloat` linter. +- [#3279](https://github.com/grafana/k6/pull/3279) Fixed the CI not publishing the SBOM file on new a release. +- [#3283](https://github.com/grafana/k6/pull/3283) Updated the Go version to 1.21. +- [#3351](https://github.com/grafana/k6/pull/3351) Updated the version of Prometheus remote write output. Check the specific [release notes](https://github.com/grafana/xk6-output-prometheus-remote/releases/tag/v0.3.0). +- [#3341](https://github.com/grafana/k6/pull/3341), [#3339](https://github.com/grafana/k6/pull/3339) Updated `goja` that includes Runtime initialization speed-up and a fix for source indexes. +- [#3311](https://github.com/grafana/k6/pull/3311) Updated the `alpine` image version that is used as the base of the k6 Docker image. ## _Optional_ Roadmap From 56204c4ae8957c91051b059e9d8f151c6410eb17 Mon Sep 17 00:00:00 2001 From: codebien <2103732+codebien@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:24:52 +0200 Subject: [PATCH 07/27] Removed protobuf wrappers duplicated issue --- release notes/v0.47.0.md | 1 - 1 file changed, 1 deletion(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index e4e29444d87..97d1fdc0dc4 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -71,7 +71,6 @@ Allows users to register a handler to be executed every time the `console` API m - [xk6-grpc#47](https://github.com/grafana/xk6-grpc/pull/47) Fix the premature closing of the stream when a stream's client has finished sending. Thanks, @thiagodpf, for reporting! - [#3344](https://github.com/grafana/k6/pull/3344), [xk6-grpc#49](https://github.com/grafana/xk6-grpc/pull/49) adds (fixes) the support of google protobuf wrappers. Thanks, @zibul444, for reporting! - [#3346](https://github.com/grafana/k6/pull/3346) A data race when `http.batch` it is used with binary response has been fixed. -- [#3344](https://github.com/grafana/k6/pull/3344) The gRPC module supports now the Google protobuf wrappers as expected. - [#3308](https://github.com/grafana/k6/pull/3308) `goja` version has been updated and it fixes a compiler bug when class is declared in a function with argument. - [browser#1040](https://github.com/grafana/xk6-browser/pull/1040) fix the `context.clearCookies()` method to clear all cookies from the current browser context. - [browser#1031](https://github.com/grafana/xk6-browser/pull/1031) fix the `expires` field while adding cookies using the `context.addCookie()` method. From 9f812a30d6a458b730325d3747c7f81ddbbfb946 Mon Sep 17 00:00:00 2001 From: codebien <2103732+codebien@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:49:08 +0200 Subject: [PATCH 08/27] Fixed a link --- release notes/v0.47.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 97d1fdc0dc4..c5e2a068c26 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -63,7 +63,7 @@ Allows users to register a handler to be executed every time the `console` API m - [#3338](https://github.com/grafana/k6/pull/3338), [xk6-grpc#48](https://github.com/grafana/xk6-grpc/pull/48). Adds a support of the v1 of the gRPC reflection protocol. - [#3290](https://github.com/grafana/k6/pull/3290) Log errors when executing `setup` and `teardown` via REST API. -- [#3327](https://github.com/grafana/k6/pull/3290) `k6 version` now prints the commit identifier for the build. +- [#3327](https://github.com/grafana/k6/pull/3327) `k6 version` now prints the commit identifier for the build. - [#3340](https://github.com/grafana/k6/pull/3340) The k6 ``*-with-browser`` Docker images set now the `no-sandbox` environment variable automatically. ## Bug fixes From e71ab7303a366e5f309d8e677ecc159b71123ef4 Mon Sep 17 00:00:00 2001 From: Ankur Date: Mon, 2 Oct 2023 16:11:16 +0100 Subject: [PATCH 09/27] v0.47.0 release notes for browser (#3356) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add release notes for remaining browser updates. Co-authored-by: İnanç Gümüş Co-authored-by: Oleg Bespalov Co-authored-by: ka3de --- release notes/v0.47.0.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index c5e2a068c26..906c5c437d3 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -59,12 +59,27 @@ console.log(context.cookies.length); // 0 Allows 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](https://k6.io/docs/javascript-api/k6-experimental/browser/consolemessage/) class. +```js +page.on('console', msg => { + check(msg, { + 'assertConsoleMessageType': msg => msg.type() == 'log', + 'assertConsoleMessageText': msg => msg.text() == 'this is a console.log message 42', + 'assertConsoleMessageArgs0': msg => msg.args()[0].jsonValue() == 'this is a console.log message', + 'assertConsoleMessageArgs1': msg => msg.args()[1].jsonValue() == 42, + }); +}); + +page.evaluate(() => console.log('this is a console.log message', 42)); +``` + ### UX improvements and enhancements - [#3338](https://github.com/grafana/k6/pull/3338), [xk6-grpc#48](https://github.com/grafana/xk6-grpc/pull/48). Adds a support of the v1 of the gRPC reflection protocol. - [#3290](https://github.com/grafana/k6/pull/3290) Log errors when executing `setup` and `teardown` via REST API. - [#3327](https://github.com/grafana/k6/pull/3327) `k6 version` now prints the commit identifier for the build. - [#3340](https://github.com/grafana/k6/pull/3340) The k6 ``*-with-browser`` Docker images set now the `no-sandbox` environment variable automatically. +- [browser#1007](https://github.com/grafana/xk6-browser/pull/1007) Inject `window.k6 = {};` to help identify k6 browser module tests. +- [browser#1022](https://github.com/grafana/xk6-browser/pull/1022) Refactor the `check` in `examples/fillform.js` so that it matches the type definitions and documentation for `check`. ## Bug fixes @@ -75,6 +90,10 @@ Allows users to register a handler to be executed every time the `console` API m - [browser#1040](https://github.com/grafana/xk6-browser/pull/1040) fix the `context.clearCookies()` method to clear all cookies from the current browser context. - [browser#1031](https://github.com/grafana/xk6-browser/pull/1031) fix the `expires` field while adding cookies using the `context.addCookie()` method. - [browser#1039](https://github.com/grafana/xk6-browser/pull/1039) fix Goja conversions while adding and retrieving cookies. +- [browser#1038](https://github.com/grafana/xk6-browser/pull/1038) Fix read/write data race for edge case with remote browsers. +- [browser#1035](https://github.com/grafana/xk6-browser/pull/1035) Refactor `int64` timeout to `time.Duration` which ensures no confusion as to whether a timeout is in milliseconds or seconds. +- [browser#1034](https://github.com/grafana/xk6-browser/pull/1034) Fix `page.reload` & `page.setContent` to use the default navigation timeout over the default timeout. +- [browser#1033](https://github.com/grafana/xk6-browser/pull/1033) Fix the `page` timeouts so it is actually used after being set. ## Maintenance and internal improvements @@ -85,6 +104,11 @@ Allows users to register a handler to be executed every time the `console` API m - [#3351](https://github.com/grafana/k6/pull/3351) Updated the version of Prometheus remote write output. Check the specific [release notes](https://github.com/grafana/xk6-output-prometheus-remote/releases/tag/v0.3.0). - [#3341](https://github.com/grafana/k6/pull/3341), [#3339](https://github.com/grafana/k6/pull/3339) Updated `goja` that includes Runtime initialization speed-up and a fix for source indexes. - [#3311](https://github.com/grafana/k6/pull/3311) Updated the `alpine` image version that is used as the base of the k6 Docker image. +- [browser#1043](https://github.com/grafana/xk6-browser/pull/1043), [browser#1021](https://github.com/grafana/xk6-browser/pull/1021), [browser#1019](https://github.com/grafana/xk6-browser/pull/1019), [browser#1014](https://github.com/grafana/xk6-browser/pull/1014) Fix tests. +- [browser#1000](https://github.com/grafana/xk6-browser/pull/1000), [browser#1024](https://github.com/grafana/xk6-browser/pull/1024) Refine issue and PR templates. +- [browser#1003](https://github.com/grafana/xk6-browser/pull/1003), [browser#1009](https://github.com/grafana/xk6-browser/pull/1009), [browser#1010](https://github.com/grafana/xk6-browser/pull/1010) Internal changes. +- [browser#997](https://github.com/grafana/xk6-browser/pull/997) Update readme. +- [browser#962](https://github.com/grafana/xk6-browser/pull/962) CI fixes. ## _Optional_ Roadmap From 11edcc180f189a0c0105a573f5a69f2d6920e930 Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:39:29 +0200 Subject: [PATCH 10/27] Apply suggestions from code review Co-authored-by: Heitor Tashiro Sergent --- release notes/v0.47.0.md | 68 ++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 906c5c437d3..ff1e2377226 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -5,33 +5,33 @@ k6 `v0.47.0` is here 🎉! This release includes: ## Breaking changes -- [#3347](https://github.com/grafana/k6/pull/3347) `statsd` output is now deprecated. Check out [#2982](https://github.com/grafana/k6/issues/2982) for the future plans. -- [#3335](https://github.com/grafana/k6/pull/3335) Metric names will be limited to 128 characters following the OpenTelemetry update instead of the previous limit of 63 characters. k6 will return an error from the next release (v0.48.0) if the limit is hit. +- [#3347](https://github.com/grafana/k6/pull/3347) The built-in `statsd` output option has been deprecated, and users should use the [xk6-output-statsd](https://github.com/LeonAdato/xk6-output-statsd) extension instead. See [#2982](https://github.com/grafana/k6/issues/2982) for future plans. +- [#3335](https://github.com/grafana/k6/pull/3335) The character limit for metric names increased from 63 to 128 after the OpenTelemetry update. k6 will return an error starting on the next release (v0.48.0) if users hit the limit. - [#3288](https://github.com/grafana/k6/pull/3288) Deprecate k6 figuring out if an import specifier is a URL by trying to resolve it by prepending `https://` in case it can't figure it out. To be fully removed v0.48.0. ## New features ### Add gRPC's binary metadata support [#3234](https://github.com/grafana/k6/pull/3234), [xk6-grpc#46](https://github.com/grafana/xk6-grpc/pull/46) -By specification gRPC metadata with the `-bin` postfix should be treated as binary data. These PRs add the support of such metadata to the `k6/net/grpc` and `k6/experimental/grpc` modules. +The k6 gRPC modules (`k6/net/grpc` and `k6/experimental/grpc`) now support handling binary metadata that uses the `-bin` postfix, according to the gRPC specification. ```js let resp = client.invoke("grpc.testing.TestService/EmptyCall", {}, { metadata: { "X-Load-Tester-bin": new Uint8Array([2, 200]) } }) ``` -Thanks, @sapphire-janrain, for contribution! +Thanks to @sapphire-janrain for the contribution! -### Add the reflection metadata [#3343](https://github.com/grafana/k6/pull/3343), [xk6-grpc#46](https://github.com/grafana/xk6-grpc/pull/46) +### Add gRPC's reflection metadata support [#3343](https://github.com/grafana/k6/pull/3343), [xk6-grpc#46](https://github.com/grafana/xk6-grpc/pull/46) -In some workflows the reflection call should also include some metadata. This PR adds [a new connection parameter `reflectMetadata`](https://k6.io/docs/javascript-api/k6-net-grpc/client/client-connect/#connectparams) that allows to specify the metadata to be sent with the reflection call. +The k6 gRPC modules (`k6/net/grpc` and `k6/experimental/grpc`) now support adding metadata to reflection requests by using a new connection parameter [`reflectMetadata`](https://k6.io/docs/javascript-api/k6-net-grpc/client/client-connect/#connectparams). ### Higher precision for Trend metrics in Cloud [#3302](https://github.com/grafana/k6/pull/3302) k6 Cloud is now able to store and visualize Trend metrics up to 3 digits of precision for decimal numbers. -### Docker images for Arm64 architecture [#3320](https://github.com/grafana/k6/pull/3320) +### Docker images for ARM64 architecture [#3320](https://github.com/grafana/k6/pull/3320) -k6 builds and pushes dedicated Docker images for Arm64 architecture. Check k6's [tags page](https://hub.docker.com/r/grafana/k6/tags) on DockerHub for details. +k6 now builds and pushes dedicated Docker images for ARM64. Check k6's [tags page](https://hub.docker.com/r/grafana/k6/tags) on DockerHub for details. ### Improved the browser module's cookie API @@ -74,40 +74,40 @@ page.evaluate(() => console.log('this is a console.log message', 42)); ### UX improvements and enhancements -- [#3338](https://github.com/grafana/k6/pull/3338), [xk6-grpc#48](https://github.com/grafana/xk6-grpc/pull/48). Adds a support of the v1 of the gRPC reflection protocol. -- [#3290](https://github.com/grafana/k6/pull/3290) Log errors when executing `setup` and `teardown` via REST API. -- [#3327](https://github.com/grafana/k6/pull/3327) `k6 version` now prints the commit identifier for the build. -- [#3340](https://github.com/grafana/k6/pull/3340) The k6 ``*-with-browser`` Docker images set now the `no-sandbox` environment variable automatically. +- [#3338](https://github.com/grafana/k6/pull/3338), [xk6-grpc#48](https://github.com/grafana/xk6-grpc/pull/48). Adds support for the gRPC reflection protocol v1. +- [#3290](https://github.com/grafana/k6/pull/3290) Adds error logging when executing `setup` and `teardown` via REST API. +- [#3327](https://github.com/grafana/k6/pull/3327) Adds commit identifier for the k6 build when running `k6 version`. +- [#3340](https://github.com/grafana/k6/pull/3340) Updates k6 ``*-with-browser`` Docker images to automatically set the `no-sandbox` environment variable. - [browser#1007](https://github.com/grafana/xk6-browser/pull/1007) Inject `window.k6 = {};` to help identify k6 browser module tests. -- [browser#1022](https://github.com/grafana/xk6-browser/pull/1022) Refactor the `check` in `examples/fillform.js` so that it matches the type definitions and documentation for `check`. +- [browser#1022](https://github.com/grafana/xk6-browser/pull/1022) Refactors the `check` in `examples/fillform.js` so that it matches the type definitions and documentation for `check`. ## Bug fixes -- [xk6-grpc#47](https://github.com/grafana/xk6-grpc/pull/47) Fix the premature closing of the stream when a stream's client has finished sending. Thanks, @thiagodpf, for reporting! -- [#3344](https://github.com/grafana/k6/pull/3344), [xk6-grpc#49](https://github.com/grafana/xk6-grpc/pull/49) adds (fixes) the support of google protobuf wrappers. Thanks, @zibul444, for reporting! -- [#3346](https://github.com/grafana/k6/pull/3346) A data race when `http.batch` it is used with binary response has been fixed. -- [#3308](https://github.com/grafana/k6/pull/3308) `goja` version has been updated and it fixes a compiler bug when class is declared in a function with argument. -- [browser#1040](https://github.com/grafana/xk6-browser/pull/1040) fix the `context.clearCookies()` method to clear all cookies from the current browser context. -- [browser#1031](https://github.com/grafana/xk6-browser/pull/1031) fix the `expires` field while adding cookies using the `context.addCookie()` method. -- [browser#1039](https://github.com/grafana/xk6-browser/pull/1039) fix Goja conversions while adding and retrieving cookies. -- [browser#1038](https://github.com/grafana/xk6-browser/pull/1038) Fix read/write data race for edge case with remote browsers. -- [browser#1035](https://github.com/grafana/xk6-browser/pull/1035) Refactor `int64` timeout to `time.Duration` which ensures no confusion as to whether a timeout is in milliseconds or seconds. -- [browser#1034](https://github.com/grafana/xk6-browser/pull/1034) Fix `page.reload` & `page.setContent` to use the default navigation timeout over the default timeout. -- [browser#1033](https://github.com/grafana/xk6-browser/pull/1033) Fix the `page` timeouts so it is actually used after being set. +- [xk6-grpc#47](https://github.com/grafana/xk6-grpc/pull/47) Fixes the premature closing of a gRPC stream when a stream's client has finished sending. Thanks to @thiagodpf for reporting! +- [#3344](https://github.com/grafana/k6/pull/3344), [xk6-grpc#49](https://github.com/grafana/xk6-grpc/pull/49) Adds support for Google's protobuf wrappers. Thanks to @zibul444 for reporting! +- [#3346](https://github.com/grafana/k6/pull/3346) Fixes a race condition when `http.batch` is used with a binary response. +- [#3308](https://github.com/grafana/k6/pull/3308) Updates `goja` version, and fixes a compiler bug when a class is declared in a function with an argument. +- [browser#1040](https://github.com/grafana/xk6-browser/pull/1040) Fixes the `context.clearCookies()` method to clear all cookies from the current browser context. +- [browser#1031](https://github.com/grafana/xk6-browser/pull/1031) Fixes the `expires` field while adding cookies using the `context.addCookie()` method. +- [browser#1039](https://github.com/grafana/xk6-browser/pull/1039) Fixes `goja` conversions while adding and retrieving cookies. +- [browser#1038](https://github.com/grafana/xk6-browser/pull/1038) Fixes read/write data race for edge case with remote browsers. +- [browser#1035](https://github.com/grafana/xk6-browser/pull/1035) Refactors `int64` timeout to `time.Duration`, to help avoid confusion as to whether a timeout is in milliseconds or seconds. +- [browser#1034](https://github.com/grafana/xk6-browser/pull/1034) Fixes `page.reload` & `page.setContent` to use the default navigation timeout over the default timeout. +- [browser#1033](https://github.com/grafana/xk6-browser/pull/1033) Fixes the `page` timeouts so it is actually used after being set. ## Maintenance and internal improvements - [#3342](https://github.com/grafana/k6/pull/3342) Updates xk6-grpc to the latest version. This change brings all the latest fixes and improvements to the experimental gRPC module. -- [#3271](https://github.com/grafana/k6/pull/3271),[#3272](https://github.com/grafana/k6/pull/3272) Updated the golangci version and added the `interfacebloat` linter. -- [#3279](https://github.com/grafana/k6/pull/3279) Fixed the CI not publishing the SBOM file on new a release. -- [#3283](https://github.com/grafana/k6/pull/3283) Updated the Go version to 1.21. -- [#3351](https://github.com/grafana/k6/pull/3351) Updated the version of Prometheus remote write output. Check the specific [release notes](https://github.com/grafana/xk6-output-prometheus-remote/releases/tag/v0.3.0). -- [#3341](https://github.com/grafana/k6/pull/3341), [#3339](https://github.com/grafana/k6/pull/3339) Updated `goja` that includes Runtime initialization speed-up and a fix for source indexes. -- [#3311](https://github.com/grafana/k6/pull/3311) Updated the `alpine` image version that is used as the base of the k6 Docker image. -- [browser#1043](https://github.com/grafana/xk6-browser/pull/1043), [browser#1021](https://github.com/grafana/xk6-browser/pull/1021), [browser#1019](https://github.com/grafana/xk6-browser/pull/1019), [browser#1014](https://github.com/grafana/xk6-browser/pull/1014) Fix tests. -- [browser#1000](https://github.com/grafana/xk6-browser/pull/1000), [browser#1024](https://github.com/grafana/xk6-browser/pull/1024) Refine issue and PR templates. -- [browser#1003](https://github.com/grafana/xk6-browser/pull/1003), [browser#1009](https://github.com/grafana/xk6-browser/pull/1009), [browser#1010](https://github.com/grafana/xk6-browser/pull/1010) Internal changes. -- [browser#997](https://github.com/grafana/xk6-browser/pull/997) Update readme. +- [#3271](https://github.com/grafana/k6/pull/3271),[#3272](https://github.com/grafana/k6/pull/3272) Updates the golangci version and adds the `interfacebloat` linter. +- [#3279](https://github.com/grafana/k6/pull/3279) Fixes the CI not publishing the SBOM file on a new release. +- [#3283](https://github.com/grafana/k6/pull/3283) Updates the Go version to 1.21. +- [#3351](https://github.com/grafana/k6/pull/3351) Updates the version of Prometheus remote write output. Refer to the specific [release notes](https://github.com/grafana/xk6-output-prometheus-remote/releases/tag/v0.3.0) for more details. +- [#3341](https://github.com/grafana/k6/pull/3341), [#3339](https://github.com/grafana/k6/pull/3339) Updates `goja`, includes runtime initialization speed-up and a fix for source indexes. +- [#3311](https://github.com/grafana/k6/pull/3311) Updates the `alpine` image version that is used as the base of the k6 Docker image. +- [browser#1043](https://github.com/grafana/xk6-browser/pull/1043), [browser#1021](https://github.com/grafana/xk6-browser/pull/1021), [browser#1019](https://github.com/grafana/xk6-browser/pull/1019), [browser#1014](https://github.com/grafana/xk6-browser/pull/1014) Fixes xk6-browser tests. +- [browser#1000](https://github.com/grafana/xk6-browser/pull/1000), [browser#1024](https://github.com/grafana/xk6-browser/pull/1024) Refines xk6-browser issue and PR templates. +- [browser#1003](https://github.com/grafana/xk6-browser/pull/1003), [browser#1009](https://github.com/grafana/xk6-browser/pull/1009), [browser#1010](https://github.com/grafana/xk6-browser/pull/1010) Internal changes to xk6-browser. +- [browser#997](https://github.com/grafana/xk6-browser/pull/997) Updates xk6-browser readme. - [browser#962](https://github.com/grafana/xk6-browser/pull/962) CI fixes. ## _Optional_ Roadmap From 5344e6602a750d9a3ba8511747df5f4bf712c305 Mon Sep 17 00:00:00 2001 From: codebien <2103732+codebien@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:49:23 +0200 Subject: [PATCH 11/27] Drop the summary section --- release notes/v0.47.0.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index ff1e2377226..7f6a795e2b5 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -1,8 +1,5 @@ k6 `v0.47.0` is here 🎉! This release includes: -- (_optional_) `` -- `` (_one or multiple bullets_) - ## Breaking changes - [#3347](https://github.com/grafana/k6/pull/3347) The built-in `statsd` output option has been deprecated, and users should use the [xk6-output-statsd](https://github.com/LeonAdato/xk6-output-statsd) extension instead. See [#2982](https://github.com/grafana/k6/issues/2982) for future plans. From 886953b385533e68f0d8b826eea25788c290df22 Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:07:11 +0200 Subject: [PATCH 12/27] 3288 rewording Co-authored-by: Heitor Tashiro Sergent --- release notes/v0.47.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 7f6a795e2b5..4194aa60a47 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -4,7 +4,7 @@ k6 `v0.47.0` is here 🎉! This release includes: - [#3347](https://github.com/grafana/k6/pull/3347) The built-in `statsd` output option has been deprecated, and users should use the [xk6-output-statsd](https://github.com/LeonAdato/xk6-output-statsd) extension instead. See [#2982](https://github.com/grafana/k6/issues/2982) for future plans. - [#3335](https://github.com/grafana/k6/pull/3335) The character limit for metric names increased from 63 to 128 after the OpenTelemetry update. k6 will return an error starting on the next release (v0.48.0) if users hit the limit. -- [#3288](https://github.com/grafana/k6/pull/3288) Deprecate k6 figuring out if an import specifier is a URL by trying to resolve it by prepending `https://` in case it can't figure it out. To be fully removed v0.48.0. +- [#3288](https://github.com/grafana/k6/pull/3288) Loading remote modules now requires users to prepend them with `https://`. Before, k6 would try to resolve importing remote modules by prepending `https://` if it was missing. This behavior has been deprecated and will be fully removed in the next release (v0.48.0). ## New features From 77e6c38802d63c5e4dfa24228967f8c8833dd3f3 Mon Sep 17 00:00:00 2001 From: codebien <2103732+codebien@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:41:29 +0200 Subject: [PATCH 13/27] Moved the chars limit as a UX item from breaking changes --- release notes/v0.47.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 4194aa60a47..3fa54a45077 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -3,7 +3,6 @@ k6 `v0.47.0` is here 🎉! This release includes: ## Breaking changes - [#3347](https://github.com/grafana/k6/pull/3347) The built-in `statsd` output option has been deprecated, and users should use the [xk6-output-statsd](https://github.com/LeonAdato/xk6-output-statsd) extension instead. See [#2982](https://github.com/grafana/k6/issues/2982) for future plans. -- [#3335](https://github.com/grafana/k6/pull/3335) The character limit for metric names increased from 63 to 128 after the OpenTelemetry update. k6 will return an error starting on the next release (v0.48.0) if users hit the limit. - [#3288](https://github.com/grafana/k6/pull/3288) Loading remote modules now requires users to prepend them with `https://`. Before, k6 would try to resolve importing remote modules by prepending `https://` if it was missing. This behavior has been deprecated and will be fully removed in the next release (v0.48.0). ## New features @@ -71,10 +70,11 @@ page.evaluate(() => console.log('this is a console.log message', 42)); ### UX improvements and enhancements -- [#3338](https://github.com/grafana/k6/pull/3338), [xk6-grpc#48](https://github.com/grafana/xk6-grpc/pull/48). Adds support for the gRPC reflection protocol v1. +- [#3338](https://github.com/grafana/k6/pull/3338), [xk6-grpc#48](https://github.com/grafana/xk6-grpc/pull/48) Adds support for the gRPC reflection protocol v1. - [#3290](https://github.com/grafana/k6/pull/3290) Adds error logging when executing `setup` and `teardown` via REST API. - [#3327](https://github.com/grafana/k6/pull/3327) Adds commit identifier for the k6 build when running `k6 version`. - [#3340](https://github.com/grafana/k6/pull/3340) Updates k6 ``*-with-browser`` Docker images to automatically set the `no-sandbox` environment variable. +- [#3335](https://github.com/grafana/k6/pull/3335) The character limit for metric names increased from 63 to 128 after the OpenTelemetry update. k6 will return an error starting on the next release (v0.48.0) if users hit the limit. - [browser#1007](https://github.com/grafana/xk6-browser/pull/1007) Inject `window.k6 = {};` to help identify k6 browser module tests. - [browser#1022](https://github.com/grafana/xk6-browser/pull/1022) Refactors the `check` in `examples/fillform.js` so that it matches the type definitions and documentation for `check`. From cd5aea22d2324d5e71a630e2fd9040cd7cf30ceb Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:42:37 +0200 Subject: [PATCH 14/27] Rephrase browser/1007 Co-authored-by: Heitor Tashiro Sergent --- release notes/v0.47.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 3fa54a45077..0917f03f32a 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -75,7 +75,7 @@ page.evaluate(() => console.log('this is a console.log message', 42)); - [#3327](https://github.com/grafana/k6/pull/3327) Adds commit identifier for the k6 build when running `k6 version`. - [#3340](https://github.com/grafana/k6/pull/3340) Updates k6 ``*-with-browser`` Docker images to automatically set the `no-sandbox` environment variable. - [#3335](https://github.com/grafana/k6/pull/3335) The character limit for metric names increased from 63 to 128 after the OpenTelemetry update. k6 will return an error starting on the next release (v0.48.0) if users hit the limit. -- [browser#1007](https://github.com/grafana/xk6-browser/pull/1007) Inject `window.k6 = {};` to help identify k6 browser module tests. +- [browser#1007](https://github.com/grafana/xk6-browser/pull/1007) Adds a `k6` object (`window.k6 = {};`) to help identify k6 browser module tests. - [browser#1022](https://github.com/grafana/xk6-browser/pull/1022) Refactors the `check` in `examples/fillform.js` so that it matches the type definitions and documentation for `check`. ## Bug fixes From 456a4e6b9386cafa8e1a43c08c5d37b940add15e Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:50:17 +0200 Subject: [PATCH 15/27] Replace Breaking changes w Deperacations Co-authored-by: Oleg Bespalov --- release notes/v0.47.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 0917f03f32a..8cf872aa1a5 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -1,6 +1,6 @@ k6 `v0.47.0` is here 🎉! This release includes: -## Breaking changes +## Deprecations - [#3347](https://github.com/grafana/k6/pull/3347) The built-in `statsd` output option has been deprecated, and users should use the [xk6-output-statsd](https://github.com/LeonAdato/xk6-output-statsd) extension instead. See [#2982](https://github.com/grafana/k6/issues/2982) for future plans. - [#3288](https://github.com/grafana/k6/pull/3288) Loading remote modules now requires users to prepend them with `https://`. Before, k6 would try to resolve importing remote modules by prepending `https://` if it was missing. This behavior has been deprecated and will be fully removed in the next release (v0.48.0). From a63e85163c22bb0e4c0b16d69288d46b6539e268 Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:51:47 +0200 Subject: [PATCH 16/27] ECMAScript modules roadmap Co-authored-by: Mihail Stoykov <312246+mstoykov@users.noreply.github.com> --- release notes/v0.47.0.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 8cf872aa1a5..e5fa782918d 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -109,5 +109,17 @@ page.evaluate(() => console.log('this is a console.log message', 42)); ## _Optional_ Roadmap -_Discussion of future plans_ +### Native Modules Support + +Work on this [epic issue](https://github.com/grafana/k6/issues/3265) has been picked up and there is some progress in the underlying implementation. + +One of the main internal changes will be dropping of our internal [babel](https://babeljs.io/) that is currently used to transpile [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) code to [commonjs]()https://en.wikipedia.org/wiki/CommonJS) one. + +For users that will mean better JS support as this for example will automatically get [object spread](https://github.com/grafana/k6/issues/824) working and likely faster startup for *big* scripts. In the future this also means easier adding of JS compatibility as now it needs to be supported only in the JS VM we use - [goja](https://github.com/dop251/goja) + +There is risk though that some k6 tests using both commonjs and ESM syntax will change in behavior. This in practice should never really be done as both are not compatible. + +Due to this we are going to be dropping it very carefully and likely only once we have done a lot of tests. This currently means that it is planned for v0.49.0, but with the majority of the remaining work done in v0.48.0 cycle. + +This way as well we will have the most time of users being able to test from our `master` branch, using docker images for example. From afb73e2f3d63ebefab62db13abd76915f8ae243c Mon Sep 17 00:00:00 2001 From: codebien <2103732+codebien@users.noreply.github.com> Date: Wed, 4 Oct 2023 11:14:40 +0200 Subject: [PATCH 17/27] Future breaking changes section --- release notes/v0.47.0.md | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index e5fa782918d..0146207af91 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -27,7 +27,7 @@ k6 Cloud is now able to store and visualize Trend metrics up to 3 digits of prec ### Docker images for ARM64 architecture [#3320](https://github.com/grafana/k6/pull/3320) -k6 now builds and pushes dedicated Docker images for ARM64. Check k6's [tags page](https://hub.docker.com/r/grafana/k6/tags) on DockerHub for details. +The k6's release process now builds and pushes dedicated Docker images for ARM64. Check k6's [tags page](https://hub.docker.com/r/grafana/k6/tags) on DockerHub for details. ### Improved the browser module's cookie API @@ -68,10 +68,10 @@ page.on('console', msg => { page.evaluate(() => console.log('this is a console.log message', 42)); ``` -### UX improvements and enhancements +## UX improvements and enhancements - [#3338](https://github.com/grafana/k6/pull/3338), [xk6-grpc#48](https://github.com/grafana/xk6-grpc/pull/48) Adds support for the gRPC reflection protocol v1. -- [#3290](https://github.com/grafana/k6/pull/3290) Adds error logging when executing `setup` and `teardown` via REST API. +- [#3290](https://github.com/grafana/k6/pull/3290) Adds error logging when executing `setup` and `teardown` via REST API. Thanks to @kmtym1998 for the contribution! - [#3327](https://github.com/grafana/k6/pull/3327) Adds commit identifier for the k6 build when running `k6 version`. - [#3340](https://github.com/grafana/k6/pull/3340) Updates k6 ``*-with-browser`` Docker images to automatically set the `no-sandbox` environment variable. - [#3335](https://github.com/grafana/k6/pull/3335) The character limit for metric names increased from 63 to 128 after the OpenTelemetry update. k6 will return an error starting on the next release (v0.48.0) if users hit the limit. @@ -82,7 +82,6 @@ page.evaluate(() => console.log('this is a console.log message', 42)); - [xk6-grpc#47](https://github.com/grafana/xk6-grpc/pull/47) Fixes the premature closing of a gRPC stream when a stream's client has finished sending. Thanks to @thiagodpf for reporting! - [#3344](https://github.com/grafana/k6/pull/3344), [xk6-grpc#49](https://github.com/grafana/xk6-grpc/pull/49) Adds support for Google's protobuf wrappers. Thanks to @zibul444 for reporting! -- [#3346](https://github.com/grafana/k6/pull/3346) Fixes a race condition when `http.batch` is used with a binary response. - [#3308](https://github.com/grafana/k6/pull/3308) Updates `goja` version, and fixes a compiler bug when a class is declared in a function with an argument. - [browser#1040](https://github.com/grafana/xk6-browser/pull/1040) Fixes the `context.clearCookies()` method to clear all cookies from the current browser context. - [browser#1031](https://github.com/grafana/xk6-browser/pull/1031) Fixes the `expires` field while adding cookies using the `context.addCookie()` method. @@ -97,7 +96,7 @@ page.evaluate(() => console.log('this is a console.log message', 42)); - [#3342](https://github.com/grafana/k6/pull/3342) Updates xk6-grpc to the latest version. This change brings all the latest fixes and improvements to the experimental gRPC module. - [#3271](https://github.com/grafana/k6/pull/3271),[#3272](https://github.com/grafana/k6/pull/3272) Updates the golangci version and adds the `interfacebloat` linter. - [#3279](https://github.com/grafana/k6/pull/3279) Fixes the CI not publishing the SBOM file on a new release. -- [#3283](https://github.com/grafana/k6/pull/3283) Updates the Go version to 1.21. +- [#3283](https://github.com/grafana/k6/pull/3283) Updates the Go version in k6's CI used to build the binaries. - [#3351](https://github.com/grafana/k6/pull/3351) Updates the version of Prometheus remote write output. Refer to the specific [release notes](https://github.com/grafana/xk6-output-prometheus-remote/releases/tag/v0.3.0) for more details. - [#3341](https://github.com/grafana/k6/pull/3341), [#3339](https://github.com/grafana/k6/pull/3339) Updates `goja`, includes runtime initialization speed-up and a fix for source indexes. - [#3311](https://github.com/grafana/k6/pull/3311) Updates the `alpine` image version that is used as the base of the k6 Docker image. @@ -107,19 +106,30 @@ page.evaluate(() => console.log('this is a console.log message', 42)); - [browser#997](https://github.com/grafana/xk6-browser/pull/997) Updates xk6-browser readme. - [browser#962](https://github.com/grafana/xk6-browser/pull/962) CI fixes. -## _Optional_ Roadmap +## Roadmap -### Native Modules Support +### Native ECMAScript Modules support -Work on this [epic issue](https://github.com/grafana/k6/issues/3265) has been picked up and there is some progress in the underlying implementation. +Work on this [epic issue](https://github.com/grafana/k6/issues/3265) has been picked up and there is some progress in the underlying implementation. -One of the main internal changes will be dropping of our internal [babel](https://babeljs.io/) that is currently used to transpile [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) code to [commonjs]()https://en.wikipedia.org/wiki/CommonJS) one. - -For users that will mean better JS support as this for example will automatically get [object spread](https://github.com/grafana/k6/issues/824) working and likely faster startup for *big* scripts. In the future this also means easier adding of JS compatibility as now it needs to be supported only in the JS VM we use - [goja](https://github.com/dop251/goja) +One of the main internal changes will be dropping of our internal [babel](https://babeljs.io) that is currently used to transpile [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) code to [CommonJS]()https://en.wikipedia.org/wiki/CommonJS) one. +For users that will mean better JavaScript support as this for example will automatically get [object spread](https://github.com/grafana/k6/issues/824) working and likely faster startup for *big* scripts. In the future this also means easier adding of JavaScript compatibility as now it needs to be supported only in the JavaScript VM we use - [goja](https://github.com/dop251/goja) -There is risk though that some k6 tests using both commonjs and ESM syntax will change in behavior. This in practice should never really be done as both are not compatible. +There is risk though that some k6 tests using both CommonJS and ECMAScript Modules syntax will change in behavior. This in practice should never really be done as both are not compatible. Due to this we are going to be dropping it very carefully and likely only once we have done a lot of tests. This currently means that it is planned for v0.49.0, but with the majority of the remaining work done in v0.48.0 cycle. This way as well we will have the most time of users being able to test from our `master` branch, using docker images for example. +### Future breaking changes + +It's relevant to stretch that in the next release several breaking changes will be applied as final stage of their deprecation period: + +- [#3065](https://github.com/grafana/k6/issues/3065) Limit the length of metric names to 128 characters and the set of the allowed symbols. +- [#3365](https://github.com/grafana/k6/pull/3365) The `k6 converter` command will be removed. +- [#3350](https://github.com/grafana/k6/pull/3350) The `headears` param for the gRPC module will be not anymore accepted. +- [#3287](https://github.com/grafana/k6/issues/3287) Loading remote modules will require to explicit the protocol otherwise it will fail returning an error. +- CSV output no longer accepts arguments in snake case (e.g. `fileName` should be used instead of `file_name`). +- `--logformat` flag for defining the Log format option will be removed as the correct alternative `--log-format` should be used. + +Please, check them to see if you are impacted and need to apply changes, or open an issue if you want to provide a feedback. From 30953c45684fe9e65cd8993abdc867bd831eedae Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Wed, 4 Oct 2023 11:23:05 +0200 Subject: [PATCH 18/27] Small fixes to the roadmap section --- release notes/v0.47.0.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 0146207af91..0bf7a32d7a8 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -112,8 +112,9 @@ page.evaluate(() => console.log('this is a console.log message', 42)); Work on this [epic issue](https://github.com/grafana/k6/issues/3265) has been picked up and there is some progress in the underlying implementation. -One of the main internal changes will be dropping of our internal [babel](https://babeljs.io) that is currently used to transpile [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) code to [CommonJS]()https://en.wikipedia.org/wiki/CommonJS) one. -For users that will mean better JavaScript support as this for example will automatically get [object spread](https://github.com/grafana/k6/issues/824) working and likely faster startup for *big* scripts. In the future this also means easier adding of JavaScript compatibility as now it needs to be supported only in the JavaScript VM we use - [goja](https://github.com/dop251/goja) +One of the main internal changes will be dropping of our internal [Babel](https://babeljs.io) that is currently used to transpile [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) code to [CommonJS](https://en.wikipedia.org/wiki/CommonJS) one. + +For users it will mean better JavaScript support as this for example will automatically get [object spread](https://github.com/grafana/k6/issues/824) working and likely faster startup for *big* scripts. In the future this also means easier adding of JavaScript compatibility as now it needs to be supported only in the JavaScript VM we use - [goja](https://github.com/dop251/goja) There is risk though that some k6 tests using both CommonJS and ECMAScript Modules syntax will change in behavior. This in practice should never really be done as both are not compatible. From 396a8f1f38d4ec47952071ea3cf7358c8ee2ecd1 Mon Sep 17 00:00:00 2001 From: Andrew Slotin Date: Wed, 4 Oct 2023 13:59:33 +0200 Subject: [PATCH 19/27] Mention browser-enabled images in release notes --- release notes/v0.47.0.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 0bf7a32d7a8..e84a5cfda56 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -25,9 +25,13 @@ The k6 gRPC modules (`k6/net/grpc` and `k6/experimental/grpc`) now support addin k6 Cloud 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](https://github.com/grafana/k6/pull/3199) + +k6 is now publishig Docker images that include Chromium web browser. This allows k6 users to run tests that use [Browser API](https://k6.io/docs/javascript-api/k6-experimental/browser/) without having to install Chrome first. Check the ["A note on running browser tests" section](https://hub.docker.com/r/grafana/k6) of the Overview page on DockerHub for details. + ### Docker images for ARM64 architecture [#3320](https://github.com/grafana/k6/pull/3320) -The k6's release process now builds and pushes dedicated Docker images for ARM64. Check k6's [tags page](https://hub.docker.com/r/grafana/k6/tags) on DockerHub for details. +The k6's release process now builds and pushes dedicated Docker images for ARM64. Check k6's [tags page](https://hub.docker.com/r/grafana/k6/tags) on DockerHub for details. ### Improved the browser module's cookie API @@ -98,7 +102,7 @@ page.evaluate(() => console.log('this is a console.log message', 42)); - [#3279](https://github.com/grafana/k6/pull/3279) Fixes the CI not publishing the SBOM file on a new release. - [#3283](https://github.com/grafana/k6/pull/3283) Updates the Go version in k6's CI used to build the binaries. - [#3351](https://github.com/grafana/k6/pull/3351) Updates the version of Prometheus remote write output. Refer to the specific [release notes](https://github.com/grafana/xk6-output-prometheus-remote/releases/tag/v0.3.0) for more details. -- [#3341](https://github.com/grafana/k6/pull/3341), [#3339](https://github.com/grafana/k6/pull/3339) Updates `goja`, includes runtime initialization speed-up and a fix for source indexes. +- [#3341](https://github.com/grafana/k6/pull/3341), [#3339](https://github.com/grafana/k6/pull/3339) Updates `goja`, includes runtime initialization speed-up and a fix for source indexes. - [#3311](https://github.com/grafana/k6/pull/3311) Updates the `alpine` image version that is used as the base of the k6 Docker image. - [browser#1043](https://github.com/grafana/xk6-browser/pull/1043), [browser#1021](https://github.com/grafana/xk6-browser/pull/1021), [browser#1019](https://github.com/grafana/xk6-browser/pull/1019), [browser#1014](https://github.com/grafana/xk6-browser/pull/1014) Fixes xk6-browser tests. - [browser#1000](https://github.com/grafana/xk6-browser/pull/1000), [browser#1024](https://github.com/grafana/xk6-browser/pull/1024) Refines xk6-browser issue and PR templates. @@ -126,7 +130,7 @@ This way as well we will have the most time of users being able to test from our It's relevant to stretch that in the next release several breaking changes will be applied as final stage of their deprecation period: -- [#3065](https://github.com/grafana/k6/issues/3065) Limit the length of metric names to 128 characters and the set of the allowed symbols. +- [#3065](https://github.com/grafana/k6/issues/3065) Limit the length of metric names to 128 characters and the set of the allowed symbols. - [#3365](https://github.com/grafana/k6/pull/3365) The `k6 converter` command will be removed. - [#3350](https://github.com/grafana/k6/pull/3350) The `headears` param for the gRPC module will be not anymore accepted. - [#3287](https://github.com/grafana/k6/issues/3287) Loading remote modules will require to explicit the protocol otherwise it will fail returning an error. From 8a5c0285345ace692d599fabad4e35d38c70b27c Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Wed, 4 Oct 2023 17:02:41 +0200 Subject: [PATCH 20/27] Use GCk6 instead of k6 Cloud Co-authored-by: Heitor Tashiro Sergent --- release notes/v0.47.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index e84a5cfda56..1e75905e495 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -21,9 +21,9 @@ Thanks to @sapphire-janrain for the contribution! The k6 gRPC modules (`k6/net/grpc` and `k6/experimental/grpc`) now support adding metadata to reflection requests by using a new connection parameter [`reflectMetadata`](https://k6.io/docs/javascript-api/k6-net-grpc/client/client-connect/#connectparams). -### Higher precision for Trend metrics in Cloud [#3302](https://github.com/grafana/k6/pull/3302) +### Higher precision for Trend metrics in Grafana Cloud k6 [#3302](https://github.com/grafana/k6/pull/3302) -k6 Cloud is now able to store and visualize Trend metrics up to 3 digits of precision for decimal numbers. +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](https://github.com/grafana/k6/pull/3199) From 557beff88463bdcd7498999bc5efeb9253c3b82f Mon Sep 17 00:00:00 2001 From: codebien <2103732+codebien@users.noreply.github.com> Date: Wed, 4 Oct 2023 18:41:26 +0200 Subject: [PATCH 21/27] Move Prometheus output changes to the feature section --- release notes/v0.47.0.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 1e75905e495..995ab5bf8ca 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -33,6 +33,11 @@ k6 is now publishig Docker images that include Chromium web browser. This allows The k6's release process now builds and pushes dedicated Docker images for ARM64. Check k6's [tags page](https://hub.docker.com/r/grafana/k6/tags) on DockerHub for details. +### New authentication methods and HTTP headers API for Prometheus remote write output + +The experimental Prometheus remote write output gets the support for two new authentication methods: Bearer token and TLS certificates. Check out the [documentation](https://k6.io/docs/results-output/real-time/prometheus-remote-write/#options) to know how to define them using the new environement variables. +It also adds `K6_PROMETHEUS_RW_HTTP_HEADERS` that defines a new and more convinent way to set custom HTTP headers to pass trhough 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. We stabilized the cookie API by defining a new [`Cookie` class](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/cookie) ([browser#1008](https://github.com/grafana/xk6-browser/pull/1008), [browser#1030](https://github.com/grafana/xk6-browser/pull/1030)) that can be used while creating and retrieving cookies. @@ -101,7 +106,6 @@ page.evaluate(() => console.log('this is a console.log message', 42)); - [#3271](https://github.com/grafana/k6/pull/3271),[#3272](https://github.com/grafana/k6/pull/3272) Updates the golangci version and adds the `interfacebloat` linter. - [#3279](https://github.com/grafana/k6/pull/3279) Fixes the CI not publishing the SBOM file on a new release. - [#3283](https://github.com/grafana/k6/pull/3283) Updates the Go version in k6's CI used to build the binaries. -- [#3351](https://github.com/grafana/k6/pull/3351) Updates the version of Prometheus remote write output. Refer to the specific [release notes](https://github.com/grafana/xk6-output-prometheus-remote/releases/tag/v0.3.0) for more details. - [#3341](https://github.com/grafana/k6/pull/3341), [#3339](https://github.com/grafana/k6/pull/3339) Updates `goja`, includes runtime initialization speed-up and a fix for source indexes. - [#3311](https://github.com/grafana/k6/pull/3311) Updates the `alpine` image version that is used as the base of the k6 Docker image. - [browser#1043](https://github.com/grafana/xk6-browser/pull/1043), [browser#1021](https://github.com/grafana/xk6-browser/pull/1021), [browser#1019](https://github.com/grafana/xk6-browser/pull/1019), [browser#1014](https://github.com/grafana/xk6-browser/pull/1014) Fixes xk6-browser tests. From 2d3e053962f358f4d8768aa7754445d5dc1838bf Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Wed, 4 Oct 2023 19:36:44 +0200 Subject: [PATCH 22/27] Prom output updates Co-authored-by: Heitor Tashiro Sergent --- release notes/v0.47.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 995ab5bf8ca..6a54079c8fd 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -35,7 +35,7 @@ The k6's release process now builds and pushes dedicated Docker images for ARM64 ### New authentication methods and HTTP headers API for Prometheus remote write output -The experimental Prometheus remote write output gets the support for two new authentication methods: Bearer token and TLS certificates. Check out the [documentation](https://k6.io/docs/results-output/real-time/prometheus-remote-write/#options) to know how to define them using the new environement variables. +The experimental Prometheus remote write output now supports two new authentication methods: Bearer token and TLS certificates. Check out the [documentation](https://k6.io/docs/results-output/real-time/prometheus-remote-write/#options) to learn more about how to define them using the new environment variables. It also adds `K6_PROMETHEUS_RW_HTTP_HEADERS` that defines a new and more convinent way to set custom HTTP headers to pass trhough each flush metrics' request. ### Improved the browser module's cookie API From 6c5d3621db11e2d7f24ecbc1505c3f4b9405b57b Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Thu, 5 Oct 2023 00:13:13 +0200 Subject: [PATCH 23/27] Apply suggestions from code review Co-authored-by: Heitor Tashiro Sergent --- release notes/v0.47.0.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 6a54079c8fd..12bbc7611d3 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -33,10 +33,10 @@ k6 is now publishig Docker images that include Chromium web browser. This allows The k6's release process now builds and pushes dedicated Docker images for ARM64. Check k6's [tags page](https://hub.docker.com/r/grafana/k6/tags) on DockerHub for details. -### New authentication methods and HTTP headers API for Prometheus remote write output +### New authentication methods and HTTP headers API for Prometheus remote write output [xk6-output-prometheus-remote#143](https://github.com/grafana/xk6-output-prometheus-remote/pull/143), [xk6-output-prometheus-remote#145](https://github.com/grafana/xk6-output-prometheus-remote/pull/145), [xk6-output-prometheus-remote#147](https://github.com/grafana/xk6-output-prometheus-remote/pull/147) The experimental Prometheus remote write output now supports two new authentication methods: Bearer token and TLS certificates. Check out the [documentation](https://k6.io/docs/results-output/real-time/prometheus-remote-write/#options) to learn more about how to define them using the new environment variables. -It also adds `K6_PROMETHEUS_RW_HTTP_HEADERS` that defines a new and more convinent way to set custom HTTP headers to pass trhough each flush metrics' request. +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 @@ -120,15 +120,15 @@ page.evaluate(() => console.log('this is a console.log message', 42)); Work on this [epic issue](https://github.com/grafana/k6/issues/3265) has been picked up and there is some progress in the underlying implementation. -One of the main internal changes will be dropping of our internal [Babel](https://babeljs.io) that is currently used to transpile [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) code to [CommonJS](https://en.wikipedia.org/wiki/CommonJS) one. +One of the main internal changes will be dropping [Babel](https://babeljs.io), which is currently used to transpile [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) code to [CommonJS](https://en.wikipedia.org/wiki/CommonJS). -For users it will mean better JavaScript support as this for example will automatically get [object spread](https://github.com/grafana/k6/issues/824) working and likely faster startup for *big* scripts. In the future this also means easier adding of JavaScript compatibility as now it needs to be supported only in the JavaScript VM we use - [goja](https://github.com/dop251/goja) +For users, it will mean better JavaScript support as this change will automatically get [object spread](https://github.com/grafana/k6/issues/824) 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](https://github.com/dop251/goja). -There is risk though that some k6 tests using both CommonJS and ECMAScript Modules syntax will change in behavior. This in practice should never really be done as both are not compatible. +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. -Due to this we are going to be dropping it very carefully and likely only once we have done a lot of tests. This currently means that it is planned for v0.49.0, but with the majority of the remaining work done in v0.48.0 cycle. +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 as well we will have the most time of users being able to test from our `master` branch, using docker images for example. +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 From bc3eadba973acca7bb531501d5be0983b86b2ad8 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Thu, 5 Oct 2023 10:06:54 +0100 Subject: [PATCH 24/27] Move #1035 to improvements section --- release notes/v0.47.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 12bbc7611d3..6d579728a59 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -96,7 +96,6 @@ page.evaluate(() => console.log('this is a console.log message', 42)); - [browser#1031](https://github.com/grafana/xk6-browser/pull/1031) Fixes the `expires` field while adding cookies using the `context.addCookie()` method. - [browser#1039](https://github.com/grafana/xk6-browser/pull/1039) Fixes `goja` conversions while adding and retrieving cookies. - [browser#1038](https://github.com/grafana/xk6-browser/pull/1038) Fixes read/write data race for edge case with remote browsers. -- [browser#1035](https://github.com/grafana/xk6-browser/pull/1035) Refactors `int64` timeout to `time.Duration`, to help avoid confusion as to whether a timeout is in milliseconds or seconds. - [browser#1034](https://github.com/grafana/xk6-browser/pull/1034) Fixes `page.reload` & `page.setContent` to use the default navigation timeout over the default timeout. - [browser#1033](https://github.com/grafana/xk6-browser/pull/1033) Fixes the `page` timeouts so it is actually used after being set. @@ -113,6 +112,7 @@ page.evaluate(() => console.log('this is a console.log message', 42)); - [browser#1003](https://github.com/grafana/xk6-browser/pull/1003), [browser#1009](https://github.com/grafana/xk6-browser/pull/1009), [browser#1010](https://github.com/grafana/xk6-browser/pull/1010) Internal changes to xk6-browser. - [browser#997](https://github.com/grafana/xk6-browser/pull/997) Updates xk6-browser readme. - [browser#962](https://github.com/grafana/xk6-browser/pull/962) CI fixes. +- [browser#1035](https://github.com/grafana/xk6-browser/pull/1035) Refactors `int64` timeout to `time.Duration`, to help avoid confusion as to whether a timeout is in milliseconds or seconds. ## Roadmap From 17b1d74da7eb74b4bf59aeab7b660c68deb83a68 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Thu, 5 Oct 2023 10:15:17 +0100 Subject: [PATCH 25/27] Refactor the cookie changes --- release notes/v0.47.0.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index 6d579728a59..e84ee757977 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -40,9 +40,9 @@ We've also added the `K6_PROMETHEUS_RW_HTTP_HEADERS` that defines a new and more ### Improved the browser module's cookie API -The browser module now provides a more complete and robust API for handling cookies. We stabilized the cookie API by defining a new [`Cookie` class](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/cookie) ([browser#1008](https://github.com/grafana/xk6-browser/pull/1008), [browser#1030](https://github.com/grafana/xk6-browser/pull/1030)) that can be used while creating and retrieving cookies. +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](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/cookie) ([browser#1008](https://github.com/grafana/xk6-browser/pull/1008), [browser#1030](https://github.com/grafana/xk6-browser/pull/1030)) that can be used while creating and retrieving cookies. This enabled us to add a new [`browserContext.cookies([urls])`](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/cookies/) method ([browser#1005](https://github.com/grafana/xk6-browser/pull/1005)) that returns all cookies from the current [browser context](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext). The new API also supports filtering cookies by URL ([browser#1016](https://github.com/grafana/xk6-browser/pull/1016)). -We added a new [`browserContext.cookies([urls])`](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/cookies/) ([browser#1005](https://github.com/grafana/xk6-browser/pull/1005)) method that returns all cookies from the current [browser context](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext). The new API also supports filtering cookies by URL ([browser#1016](https://github.com/grafana/xk6-browser/pull/1016)). We also fixed a bug where the `expires` field was not being set correctly while adding cookies using the [`context.addCookie()`](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/addcookies/) method. Lastly, we fixed the existing [`context.clearCookies()`](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/clearcookies) method to clear all cookies from the current [browser context](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext). +That led to fixing a bug where the `expires` field was not being set correctly while adding cookies using the [`context.addCookie()`](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/addcookies/) method ([browser#1031](https://github.com/grafana/xk6-browser/pull/1031)). Lastly, the existing [`context.clearCookies()`](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext/clearcookies) method was fixed to clear all cookies from the current [browser context](https://k6.io/docs/javascript-api/k6-experimental/browser/browsercontext) ([browser#1040](https://github.com/grafana/xk6-browser/pull/1040)). ```js const context = browser.newContext(); @@ -92,8 +92,6 @@ page.evaluate(() => console.log('this is a console.log message', 42)); - [xk6-grpc#47](https://github.com/grafana/xk6-grpc/pull/47) Fixes the premature closing of a gRPC stream when a stream's client has finished sending. Thanks to @thiagodpf for reporting! - [#3344](https://github.com/grafana/k6/pull/3344), [xk6-grpc#49](https://github.com/grafana/xk6-grpc/pull/49) Adds support for Google's protobuf wrappers. Thanks to @zibul444 for reporting! - [#3308](https://github.com/grafana/k6/pull/3308) Updates `goja` version, and fixes a compiler bug when a class is declared in a function with an argument. -- [browser#1040](https://github.com/grafana/xk6-browser/pull/1040) Fixes the `context.clearCookies()` method to clear all cookies from the current browser context. -- [browser#1031](https://github.com/grafana/xk6-browser/pull/1031) Fixes the `expires` field while adding cookies using the `context.addCookie()` method. - [browser#1039](https://github.com/grafana/xk6-browser/pull/1039) Fixes `goja` conversions while adding and retrieving cookies. - [browser#1038](https://github.com/grafana/xk6-browser/pull/1038) Fixes read/write data race for edge case with remote browsers. - [browser#1034](https://github.com/grafana/xk6-browser/pull/1034) Fixes `page.reload` & `page.setContent` to use the default navigation timeout over the default timeout. From b54af8cf2ea2f754d89a508d36bc39d6629bc1ae Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Mon, 9 Oct 2023 09:48:06 +0200 Subject: [PATCH 26/27] Apply suggestions from code review Co-authored-by: Heitor Tashiro Sergent --- release notes/v0.47.0.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index e84ee757977..d9355f24f2d 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -130,13 +130,13 @@ This way, we will also be able to have most of our users test these changes from ### Future breaking changes -It's relevant to stretch that in the next release several breaking changes will be applied as final stage of their deprecation period: +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: - [#3065](https://github.com/grafana/k6/issues/3065) Limit the length of metric names to 128 characters and the set of the allowed symbols. - [#3365](https://github.com/grafana/k6/pull/3365) The `k6 converter` command will be removed. -- [#3350](https://github.com/grafana/k6/pull/3350) The `headears` param for the gRPC module will be not anymore accepted. -- [#3287](https://github.com/grafana/k6/issues/3287) Loading remote modules will require to explicit the protocol otherwise it will fail returning an error. -- CSV output no longer accepts arguments in snake case (e.g. `fileName` should be used instead of `file_name`). -- `--logformat` flag for defining the Log format option will be removed as the correct alternative `--log-format` should be used. +- [#3350](https://github.com/grafana/k6/pull/3350) The `headers` param for the gRPC module will be deprecated. Users should use the `metadata` property instead. +- [#3287](https://github.com/grafana/k6/issues/3287) Loading remote modules will require users to include the `https://` protocol in their URLs, otherwise it will return an error. +- CSV output no longer accepts arguments in snake case (for example, `fileName` should be used instead of `file_name`). +- The `--logformat` flag for defining the Log format option will be removed. `--log-format` should be used instead. -Please, check them to see if you are impacted and need to apply changes, or open an issue if you want to provide a feedback. +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. From 014e88532305f0da211150c53e1fc8cd12508976 Mon Sep 17 00:00:00 2001 From: codebien <2103732+codebien@users.noreply.github.com> Date: Mon, 9 Oct 2023 09:57:09 +0200 Subject: [PATCH 27/27] Improvements for Future breaking changes --- release notes/v0.47.0.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release notes/v0.47.0.md b/release notes/v0.47.0.md index d9355f24f2d..92ea36fbbbd 100644 --- a/release notes/v0.47.0.md +++ b/release notes/v0.47.0.md @@ -132,11 +132,11 @@ This way, we will also be able to have most of our users test these changes from 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: -- [#3065](https://github.com/grafana/k6/issues/3065) Limit the length of metric names to 128 characters and the set of the allowed symbols. +- [#3065](https://github.com/grafana/k6/issues/3065) Metric names will be limited to 128 characters and a set of allowed symbols. This was going to be changed to a 63 character limit to ensure compatibility with OpenTelemetry standards, but since then, the OTel limit has been updated to 255 characters. You can find more details about the changes in the linked issue. - [#3365](https://github.com/grafana/k6/pull/3365) The `k6 converter` command will be removed. -- [#3350](https://github.com/grafana/k6/pull/3350) The `headers` param for the gRPC module will be deprecated. Users should use the `metadata` property instead. +- [#3350](https://github.com/grafana/k6/pull/3350) The `headers` param for the gRPC module will be removed. Users should use the [metadata](https://k6.io/docs/javascript-api/k6-experimental/grpc/params) property instead. - [#3287](https://github.com/grafana/k6/issues/3287) Loading remote modules will require users to include the `https://` protocol in their URLs, otherwise it will return an error. -- CSV output no longer accepts arguments in snake case (for example, `fileName` should be used instead of `file_name`). -- The `--logformat` flag for defining the Log format option will be removed. `--log-format` should be used instead. +- CSV output no longer accepts arguments in snake case (for example, [fileName](https://k6.io/docs/results-output/real-time/csv/#csv-options) should be used instead of `file_name`). +- The `--logformat` flag for defining the Log format option will be removed. [--log-format](https://k6.io/docs/using-k6/k6-options/reference/#logformat) 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.