From 91d33f5e3692aecf886a2f2ac1dfe6b1da1635fe Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Fri, 23 Jun 2023 12:00:54 +0200 Subject: [PATCH 01/35] Add release notes v0.46.0 file --- release notes/v0.46.0.md | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 release notes/v0.46.0.md diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md new file mode 100644 index 00000000000..30c182c7f50 --- /dev/null +++ b/release notes/v0.46.0.md @@ -0,0 +1,46 @@ +k6 `v0.46.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 32b3f01f41eb042b036528b1be7e1eb682072695 Mon Sep 17 00:00:00 2001 From: oleiade Date: Mon, 26 Jun 2023 16:56:33 +0200 Subject: [PATCH 02/35] Add release notes template for version 0.46 --- release notes/v0.46.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 30c182c7f50..7f4c7c10e31 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -1,4 +1,4 @@ -k6 `v0.46.0` is here πŸŽ‰! This release includes: +k6 `v0.46` is here πŸŽ‰! This release includes: - (_optional_) `` - `` (_one or multiple bullets_) From 1078693329e932343997f9568e2a7945a73c5b90 Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Tue, 27 Jun 2023 11:49:02 +0200 Subject: [PATCH 03/35] changelog: a record for the --- release notes/v0.46.0.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 7f4c7c10e31..7315fa5ee8a 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -38,8 +38,7 @@ _Format as ` . `_: ## Maintenance and internal improvements -_Format as ` . `_: -- _`#2770` Refactors parts of the JS module._ +- [#3136](https://github.com/grafana/k6/pull/3136) Go dependencies updates. ## _Optional_ Roadmap From af4e7fc758853065fda257cd6f03185523a2d6ae Mon Sep 17 00:00:00 2001 From: oleiade Date: Thu, 3 Aug 2023 11:16:07 +0200 Subject: [PATCH 04/35] Fill release notes templates for version 0.46 --- release notes/v0.46.0.md | 47 ++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 7315fa5ee8a..9cf8e24f9bc 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -13,7 +13,9 @@ k6 `v0.46` is here πŸŽ‰! This release includes: ## New features -_optional intro here_ +### [#3030](https://github.com/grafana/k6/pull/3030) + +// TODO ### `` `#pr` @@ -26,19 +28,50 @@ _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` `` + +- TODO: [#3157](https://github.com/grafana/pull/3157) and [#3172](https://github.com/grafana/pull/3172) Add a `MaxTimeSeriesInBatch` configuration option. +- [#3159](https://github.com/grafana/pull/3159) Adds per-vu TLS configuration to `grpc.Client` connect method's parameters. Thanks @chrismoran-mica πŸ™‡β€β™‚οΈ. +- [#3176](https://github.com/grafana/pull/3176) Adds a `js/promises` package, which enables extension developers to easily create promises that will be dispatched to the eventloop using the `New` function. +- [#3181](https://github.com/grafana/pull/3181) Adds a `RunOnEventLoop` method to the `modulestest.Runtime` type, which allows extensions developers to run code on the event loop from their tests. ## Bug fixes -_Format as ` . `_: -- _`#111` fixes race condition in runtime_ +- [#3163](https://github.com/grafana/pull/3163) Addresses a bug in our gRPC example. +- [#3178](https://github.com/grafana/pull/3178) Fixes the registration of nested protobuf messages in the gRPC module. +- [#3170](https://github.com/grafana/pull/3170) Upgrades the version of gRPC k6 depends on to address a security vulnerability ([CVE-2023-32731]). ## Maintenance and internal improvements -- [#3136](https://github.com/grafana/k6/pull/3136) Go dependencies updates. +### Cloud output v2 + +// TODO @codebien + +* [3104](https://github.com/grafana/k6/pull/3104) Retry and flushers pool +* [3108](https://github.com/grafana/k6/pull/3108) Flush chunks +* [3120](https://github.com/grafana/k6/pull/3120) Unlimited size for body payload +* [3125](https://github.com/grafana/k6/pull/3125) Use a static remote service url +* [3162](https://github.com/grafana/k6/pull/3162) Warn about labels that have reserved names +* [3169](https://github.com/grafana/k6/pull/3169) Compact histogram +- [#3182](https://github.com/grafana/k6/pull/3182) Fix off-by-one error for spans +- [#3186](https://github.com/grafana/k6/pull/3186) Be less noisy when handling errors +- [#3187](https://github.com/grafana/k6/pull/3187) Create batches for single bucket flush +- [#3193](https://github.com/grafana/k6/pull/3193) Downscale the batch size +- [#3195](https://github.com/grafana/k6/pull/3195) Make sure to use the overwritten config +- [#3206](https://github.com/grafana/k6/pull/3206) Implement concurrent pushes accross batches +- [#3226](https://github.com/grafana/k6/pull/3226) don't go over maxSeriesInBatch + +### Miscelaneous + +- [#3211](https://github.com/grafana/k6/pull/3211) Updates the experimental gRPC module version used by k6. +- [#3210](https://github.com/grafana/k6/pull/3210) Updates the xk6-output-prometheus-remote version used by k6. +- [#3194](https://github.com/grafana/k6/pull/3194) Fixes loki log output exiting before push is finished. +- [#3227](https://github.com/grafana/k6/pull/3227) Allows specifying custom headers for Loki log output. +- [#3196](https://github.com/grafana/k6/pull/3196) Logs packages lint fixes, and test for loki flushing at end. +- [#3231](https://github.com/grafana/k6/pull/3231) Fixes the tracing module sampling option to default to 1.0 when not set by the user. +- [#3136](https://github.com/grafana/k6/pull/3136) Updates k6 Go dependencies. +- [#3131](https://github.com/grafana/k6/pull/3131) Updates our Pull Request template to be more structured and include a checklist for contributors. +- [#3177](https://github.com/grafana/k6/pull/3177) Updates the version of golangci-lint we use to the latest version. ## _Optional_ Roadmap From e5dee88d4a4419a7f65235b42a4ad65fdcd06485 Mon Sep 17 00:00:00 2001 From: oleiade Date: Thu, 3 Aug 2023 11:16:41 +0200 Subject: [PATCH 05/35] Bump k6 version to version 0.46 --- lib/consts/consts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/consts/consts.go b/lib/consts/consts.go index feb2dd6f663..c9a30c71054 100644 --- a/lib/consts/consts.go +++ b/lib/consts/consts.go @@ -8,7 +8,7 @@ import ( ) // Version contains the current semantic version of k6. -const Version = "0.45.0" +const Version = "0.46.0" // VersionDetails can be set externally as part of the build process var VersionDetails = "" //nolint:gochecknoglobals From 372e3dceda1a80299218aedb645e3eb1bcf7ffdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Thu, 3 Aug 2023 11:35:08 +0200 Subject: [PATCH 06/35] Update release notes/v0.46.0.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Δ°nanΓ§ GΓΌmüş --- release notes/v0.46.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 9cf8e24f9bc..0da122f20fc 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -61,7 +61,7 @@ _Format as ` . `_: - [#3206](https://github.com/grafana/k6/pull/3206) Implement concurrent pushes accross batches - [#3226](https://github.com/grafana/k6/pull/3226) don't go over maxSeriesInBatch -### Miscelaneous +### Miscellaneous - [#3211](https://github.com/grafana/k6/pull/3211) Updates the experimental gRPC module version used by k6. - [#3210](https://github.com/grafana/k6/pull/3210) Updates the xk6-output-prometheus-remote version used by k6. From b4d8c8814cfb03e267d1c59222d0081eb4574158 Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Thu, 3 Aug 2023 14:03:50 +0300 Subject: [PATCH 07/35] Add loki headers changes --- release notes/v0.46.0.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 0da122f20fc..43a4d1801ac 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -13,9 +13,21 @@ k6 `v0.46` is here πŸŽ‰! This release includes: ## New features -### [#3030](https://github.com/grafana/k6/pull/3030) +### Loki log output sending additional headers [#3227](https://github.com/grafana/k6/pull/3227) -// TODO +k6 has been able to send logs to loki for nearly 3 years since [v0.28.0](https://github.com/grafana/k6/releases/tag/v0.28.0) but didn't support any way to authenticate. + +Now it can be configured to send additional headers on every request. + +This is being configured with the new `header` config option similar to `label`: + +``` +k6 --log-output=loki=http://example.org,header.X-My-Header=123,header.Authorization=mytoken ... +``` + +Will now send the header `X-My-Header` with value `123` and `Authorization` with `mytoken`. + +Thanks to @federicotdn for doign the changes ### `` `#pr` From b2f96c7f34646c4a8c4cc2eaf9d4e1eb8dbaf7a8 Mon Sep 17 00:00:00 2001 From: Lukasz Gut Date: Thu, 3 Aug 2023 13:24:10 +0200 Subject: [PATCH 08/35] Add cloud traces to the release notes --- release notes/v0.46.0.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 43a4d1801ac..a5e2f15a700 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -29,6 +29,13 @@ Will now send the header `X-My-Header` with value `123` and `Authorization` with Thanks to @federicotdn for doign the changes +### Cloud Traces [#3100](https://github.com/grafana/k6/pull/3100), [#3202](https://github.com/grafana/k6/pull/3202) + +This release supports the new integration between k6 and Tempo in the cloud. Grafana Cloud k6 and Grafana Cloud Traces customers will be able to start their traces in k6 using the existing `k6/experimental/tracing` module to enrich their test run analysis page with metrics and aggregations from tracing data. + +The new cloud traces will work "out of the box" for `k6 cloud` runs. In case of `k6 run` execution, the `K6_CLOUD_TRACES_ENABLED` environment variable has to be set to `true`. + + ### `` `#pr` _what, why, and what this means for the user_ From 202fbba123319932ae59892e61c36da41081bf99 Mon Sep 17 00:00:00 2001 From: Lukasz Gut Date: Thu, 3 Aug 2023 13:24:57 +0200 Subject: [PATCH 09/35] Remove redundant new line --- release notes/v0.46.0.md | 1 - 1 file changed, 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index a5e2f15a700..ac40e74b66c 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -35,7 +35,6 @@ This release supports the new integration between k6 and Tempo in the cloud. Gra The new cloud traces will work "out of the box" for `k6 cloud` runs. In case of `k6 run` execution, the `K6_CLOUD_TRACES_ENABLED` environment variable has to be set to `true`. - ### `` `#pr` _what, why, and what this means for the user_ From 029ba7d1adda24ae7fd1a70869395e7f58dab1ce Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Thu, 3 Aug 2023 14:04:58 +0300 Subject: [PATCH 10/35] Drop 3227 from misc section --- release notes/v0.46.0.md | 1 - 1 file changed, 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index ac40e74b66c..69308e50661 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -84,7 +84,6 @@ _Format as ` . `_: - [#3211](https://github.com/grafana/k6/pull/3211) Updates the experimental gRPC module version used by k6. - [#3210](https://github.com/grafana/k6/pull/3210) Updates the xk6-output-prometheus-remote version used by k6. - [#3194](https://github.com/grafana/k6/pull/3194) Fixes loki log output exiting before push is finished. -- [#3227](https://github.com/grafana/k6/pull/3227) Allows specifying custom headers for Loki log output. - [#3196](https://github.com/grafana/k6/pull/3196) Logs packages lint fixes, and test for loki flushing at end. - [#3231](https://github.com/grafana/k6/pull/3231) Fixes the tracing module sampling option to default to 1.0 when not set by the user. - [#3136](https://github.com/grafana/k6/pull/3136) Updates k6 Go dependencies. From 136c6782b256e02090e2e4dc5cf4a617c6f06f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Thu, 10 Aug 2023 10:20:37 +0200 Subject: [PATCH 11/35] Update release notes/v0.46.0.md Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v0.46.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 69308e50661..40437167023 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -27,7 +27,7 @@ k6 --log-output=loki=http://example.org,header.X-My-Header=123,header.Authorizat Will now send the header `X-My-Header` with value `123` and `Authorization` with `mytoken`. -Thanks to @federicotdn for doign the changes +Thanks to @federicotdn for doing the changes. ### Cloud Traces [#3100](https://github.com/grafana/k6/pull/3100), [#3202](https://github.com/grafana/k6/pull/3202) From d3acd621dba7c99bd297ee47fd2a67f8adb5593f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Thu, 10 Aug 2023 10:20:51 +0200 Subject: [PATCH 12/35] Update release notes/v0.46.0.md Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v0.46.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 40437167023..bfabb87cab8 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -33,7 +33,7 @@ Thanks to @federicotdn for doing the changes. This release supports the new integration between k6 and Tempo in the cloud. Grafana Cloud k6 and Grafana Cloud Traces customers will be able to start their traces in k6 using the existing `k6/experimental/tracing` module to enrich their test run analysis page with metrics and aggregations from tracing data. -The new cloud traces will work "out of the box" for `k6 cloud` runs. In case of `k6 run` execution, the `K6_CLOUD_TRACES_ENABLED` environment variable has to be set to `true`. +The new cloud traces will work _out of the box_ for runs started from the Grafana Cloud k6 app or from the `k6 cloud script.js` command. In case of `k6 run -o cloud script.js` runs, the `K6_CLOUD_TRACES_ENABLED` environment variable has to be set to `true`. ### `` `#pr` From 6214fc2b6e277eaf732b102827ee92c27db0c9e4 Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Thu, 10 Aug 2023 10:23:44 +0200 Subject: [PATCH 13/35] feat: gRPC connection's TLS --- release notes/v0.46.0.md | 48 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index bfabb87cab8..652a419e1d9 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -35,6 +35,53 @@ This release supports the new integration between k6 and Tempo in the cloud. Gra The new cloud traces will work _out of the box_ for runs started from the Grafana Cloud k6 app or from the `k6 cloud script.js` command. In case of `k6 run -o cloud script.js` runs, the `K6_CLOUD_TRACES_ENABLED` environment variable has to be set to `true`. +### Ability to configure TLS per gRPC connection [#3159](https://github.com/grafana/k6/pull/3159), [xk6-grpc#25](https://github.com/grafana/xk6-grpc/pull/25) + +The `k6/net/grpc` and `k6/experimental/grpc` modules now support configuring TLS per-connection via [ConnectParams](https://k6.io/docs/javascript-api/k6-net-grpc/client/client-connect/#connectparams). This is useful when connecting to multiple gRPC servers with different TLS configurations within the same VU. + +
+ Expand to see an example of the new functionality. + +```javascript +// init phase (1) +const params = { + "grpcbin.test.notk6.io:9001": { + plaintext: false, + tls: { + cacerts: [open("cacerts0.pem")], + cert: open("cert0.pem"), + key: open("key0.pem"), + }, // password omitted to demonstrate 'optional password' + }, + "grpcbin.test.fakek6.io:9001": { + plaintext: false, + tls: { + cacerts: open("cacerts1.pem"), + cert: open("cert1.pem"), + key: open("key1.pem"), + password: "cert1-passphrase", + }, // cacerts as a 'string' to demonstrate string|string[] typing of cacerts + }, +}; +const clients = { + "grpcbin.test.notk6.io:9001": new grpc.Client(), + "grpcbin.test.fakek6.io:9001": new grpc.Client(), +}; +... + +// k6 - VU code phase (3) +if (__ITER === 0) { + clients["grpcbin.test.notk6.io:9001"] + .connect("grpcbin.test.notk6.io:9001", params["grpcbin.test.notk6.io:9001"]); + clients["grpcbin.test.notk6.io:9001"] + .connect("grpcbin.test.fakek6.io:9001", params["grpcbin.test.fakek6.io:9001"]); +} +... +``` +
+ +Thanks @chrismoran-mica for contribution πŸ™‡β€β™‚οΈ. + ### `` `#pr` _what, why, and what this means for the user_ @@ -49,7 +96,6 @@ _Format as ` . `_: - _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ - TODO: [#3157](https://github.com/grafana/pull/3157) and [#3172](https://github.com/grafana/pull/3172) Add a `MaxTimeSeriesInBatch` configuration option. -- [#3159](https://github.com/grafana/pull/3159) Adds per-vu TLS configuration to `grpc.Client` connect method's parameters. Thanks @chrismoran-mica πŸ™‡β€β™‚οΈ. - [#3176](https://github.com/grafana/pull/3176) Adds a `js/promises` package, which enables extension developers to easily create promises that will be dispatched to the eventloop using the `New` function. - [#3181](https://github.com/grafana/pull/3181) Adds a `RunOnEventLoop` method to the `modulestest.Runtime` type, which allows extensions developers to run code on the event loop from their tests. From 15631840a250d5ac18d4442c04ab93ee3bf774c7 Mon Sep 17 00:00:00 2001 From: oleiade Date: Thu, 10 Aug 2023 10:34:57 +0200 Subject: [PATCH 14/35] Apply PR reviews suggestions --- release notes/v0.46.0.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 652a419e1d9..03e2d156ccb 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -27,13 +27,13 @@ k6 --log-output=loki=http://example.org,header.X-My-Header=123,header.Authorizat Will now send the header `X-My-Header` with value `123` and `Authorization` with `mytoken`. -Thanks to @federicotdn for doing the changes. +Thanks to @federicotdn for doign the changes ### Cloud Traces [#3100](https://github.com/grafana/k6/pull/3100), [#3202](https://github.com/grafana/k6/pull/3202) This release supports the new integration between k6 and Tempo in the cloud. Grafana Cloud k6 and Grafana Cloud Traces customers will be able to start their traces in k6 using the existing `k6/experimental/tracing` module to enrich their test run analysis page with metrics and aggregations from tracing data. -The new cloud traces will work _out of the box_ for runs started from the Grafana Cloud k6 app or from the `k6 cloud script.js` command. In case of `k6 run -o cloud script.js` runs, the `K6_CLOUD_TRACES_ENABLED` environment variable has to be set to `true`. +The new cloud traces will work "out of the box" for `k6 cloud` runs. In case of `k6 run` execution, the `K6_CLOUD_TRACES_ENABLED` environment variable has to be set to `true`. ### Ability to configure TLS per gRPC connection [#3159](https://github.com/grafana/k6/pull/3159), [xk6-grpc#25](https://github.com/grafana/xk6-grpc/pull/25) @@ -95,18 +95,21 @@ _what, why, and what this means for the user_ _Format as ` . `_: - _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ -- TODO: [#3157](https://github.com/grafana/pull/3157) and [#3172](https://github.com/grafana/pull/3172) Add a `MaxTimeSeriesInBatch` configuration option. -- [#3176](https://github.com/grafana/pull/3176) Adds a `js/promises` package, which enables extension developers to easily create promises that will be dispatched to the eventloop using the `New` function. -- [#3181](https://github.com/grafana/pull/3181) Adds a `RunOnEventLoop` method to the `modulestest.Runtime` type, which allows extensions developers to run code on the event loop from their tests. +- [#3157](https://github.com/grafana/k6/pull/3157) and [#3172](https://github.com/grafana/k6/pull/3172) Add a `MaxTimeSeriesInBatch` configuration option. +- [#3176](https://github.com/grafana/k6/pull/3176) Adds a `js/promises` package, which enables extension developers to easily create promises that will be dispatched to the eventloop using the `New` function. +- [#3181](https://github.com/grafana/k6/pull/3181) Adds a `RunOnEventLoop` method to the `modulestest.Runtime` type, which allows extensions developers to run code on the event loop from their tests. ## Bug fixes -- [#3163](https://github.com/grafana/pull/3163) Addresses a bug in our gRPC example. -- [#3178](https://github.com/grafana/pull/3178) Fixes the registration of nested protobuf messages in the gRPC module. -- [#3170](https://github.com/grafana/pull/3170) Upgrades the version of gRPC k6 depends on to address a security vulnerability ([CVE-2023-32731]). +- [#3178](https://github.com/grafana/k6/pull/3178), [xk6-grpc#23](https://github.com/grafana/xk6-grpc/pull/23) Fixes the registration of nested protobuf messages in the gRPC module. Thanks @thiagodpf for reporting and actually fixing the bug! +- [#3194](https://github.com/grafana/k6/pull/3194) Fixes loki log output exiting before push is finished. +- [#3231](https://github.com/grafana/k6/pull/3231) Fixes the tracing module sampling option to default to 1.0 when not set by the user. ## Maintenance and internal improvements +- [#3163](https://github.com/grafana/pull/3163) Addresses a bug in our gRPC example. +- [#3170](https://github.com/grafana/pull/3170) Upgraded the version of gRPC k6 demo service dependency for addressing a security vulnerability ([CVE-2023-32731]). + ### Cloud output v2 // TODO @codebien @@ -129,9 +132,7 @@ _Format as ` . `_: - [#3211](https://github.com/grafana/k6/pull/3211) Updates the experimental gRPC module version used by k6. - [#3210](https://github.com/grafana/k6/pull/3210) Updates the xk6-output-prometheus-remote version used by k6. -- [#3194](https://github.com/grafana/k6/pull/3194) Fixes loki log output exiting before push is finished. - [#3196](https://github.com/grafana/k6/pull/3196) Logs packages lint fixes, and test for loki flushing at end. -- [#3231](https://github.com/grafana/k6/pull/3231) Fixes the tracing module sampling option to default to 1.0 when not set by the user. - [#3136](https://github.com/grafana/k6/pull/3136) Updates k6 Go dependencies. - [#3131](https://github.com/grafana/k6/pull/3131) Updates our Pull Request template to be more structured and include a checklist for contributors. - [#3177](https://github.com/grafana/k6/pull/3177) Updates the version of golangci-lint we use to the latest version. From cf72813de3c5246bed96d881347c44bd95cc599a Mon Sep 17 00:00:00 2001 From: oleiade Date: Thu, 10 Aug 2023 10:40:00 +0200 Subject: [PATCH 15/35] Move miscelaneous items in dedicated sections --- release notes/v0.46.0.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 03e2d156ccb..ff5fa9d23a4 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -104,11 +104,17 @@ _Format as ` . `_: - [#3178](https://github.com/grafana/k6/pull/3178), [xk6-grpc#23](https://github.com/grafana/xk6-grpc/pull/23) Fixes the registration of nested protobuf messages in the gRPC module. Thanks @thiagodpf for reporting and actually fixing the bug! - [#3194](https://github.com/grafana/k6/pull/3194) Fixes loki log output exiting before push is finished. - [#3231](https://github.com/grafana/k6/pull/3231) Fixes the tracing module sampling option to default to 1.0 when not set by the user. +- [#3163](https://github.com/grafana/pull/3163) Addresses a bug in our gRPC example. +- [#3196](https://github.com/grafana/k6/pull/3196) Logs packages lint fixes, and test for loki flushing at end. ## Maintenance and internal improvements -- [#3163](https://github.com/grafana/pull/3163) Addresses a bug in our gRPC example. - [#3170](https://github.com/grafana/pull/3170) Upgraded the version of gRPC k6 demo service dependency for addressing a security vulnerability ([CVE-2023-32731]). +- [#3211](https://github.com/grafana/k6/pull/3211) Updates the experimental gRPC module version used by k6. +- [#3210](https://github.com/grafana/k6/pull/3210) Updates the xk6-output-prometheus-remote version used by k6. +- [#3136](https://github.com/grafana/k6/pull/3136) Updates k6 Go dependencies. +- [#3131](https://github.com/grafana/k6/pull/3131) Updates our Pull Request template to be more structured and include a checklist for contributors. +- [#3177](https://github.com/grafana/k6/pull/3177) Updates the version of golangci-lint we use to the latest version. ### Cloud output v2 @@ -128,15 +134,6 @@ _Format as ` . `_: - [#3206](https://github.com/grafana/k6/pull/3206) Implement concurrent pushes accross batches - [#3226](https://github.com/grafana/k6/pull/3226) don't go over maxSeriesInBatch -### Miscellaneous - -- [#3211](https://github.com/grafana/k6/pull/3211) Updates the experimental gRPC module version used by k6. -- [#3210](https://github.com/grafana/k6/pull/3210) Updates the xk6-output-prometheus-remote version used by k6. -- [#3196](https://github.com/grafana/k6/pull/3196) Logs packages lint fixes, and test for loki flushing at end. -- [#3136](https://github.com/grafana/k6/pull/3136) Updates k6 Go dependencies. -- [#3131](https://github.com/grafana/k6/pull/3131) Updates our Pull Request template to be more structured and include a checklist for contributors. -- [#3177](https://github.com/grafana/k6/pull/3177) Updates the version of golangci-lint we use to the latest version. - ## _Optional_ Roadmap _Discussion of future plans_ From a1dff4254ba4316e9b7102fdd5a4d0bc6fc6bb83 Mon Sep 17 00:00:00 2001 From: oleiade Date: Thu, 10 Aug 2023 10:42:37 +0200 Subject: [PATCH 16/35] Fix the mention of the grpc fix --- release notes/v0.46.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index ff5fa9d23a4..ad1c773b1e0 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -104,7 +104,7 @@ _Format as ` . `_: - [#3178](https://github.com/grafana/k6/pull/3178), [xk6-grpc#23](https://github.com/grafana/xk6-grpc/pull/23) Fixes the registration of nested protobuf messages in the gRPC module. Thanks @thiagodpf for reporting and actually fixing the bug! - [#3194](https://github.com/grafana/k6/pull/3194) Fixes loki log output exiting before push is finished. - [#3231](https://github.com/grafana/k6/pull/3231) Fixes the tracing module sampling option to default to 1.0 when not set by the user. -- [#3163](https://github.com/grafana/pull/3163) Addresses a bug in our gRPC example. +- [#3163](https://github.com/grafana/k6/pull/3163) Fixes our gRPC example. - [#3196](https://github.com/grafana/k6/pull/3196) Logs packages lint fixes, and test for loki flushing at end. ## Maintenance and internal improvements From 4b94388e1fe43921b48c5252def43256f343d60a Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:02:43 +0200 Subject: [PATCH 17/35] Cloud output v2 changelog (#3161) Changelog entry for the Cloud output v2 --------- Co-authored-by: Oleg Bespalov --- release notes/v0.46.0.md | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index ad1c773b1e0..05fa29e5bff 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -82,9 +82,19 @@ if (__ITER === 0) { Thanks @chrismoran-mica for contribution πŸ™‡β€β™‚οΈ. -### `` `#pr` +### Cloud Output v2 [#3117](https://github.com/grafana/k6/issues/3117) -_what, why, and what this means for the user_ +After years of great service, we decided to refresh the k6 Cloud output introducing a more efficient end-to-end solution for ingesting the generated tests' metrics. The main change regards the protocol used for flushing metrics that is now a binary based payload over HTTP. + +The new output reduces the load generators' used resources for tests that produce many metrics. There is no significant difference in the user experience; it's expected to be the same. + +The one thing worth highlighting is that the new output is strict about tags and drops tags if they are reserved: +- `test_run_id` as it is reserved for internal k6 Cloud operations +- any tag with a key that starts with two underscores (`__`), that is marked by Prometheus convention as reserved + +At the moment this is not yet the default Cloud output for the test runs executed from local machines (`k6 run -o cloud`), but it is expected to be transparently enabled in the upcoming weeks. + +The full list of related PRs: [#3104](https://github.com/grafana/k6/pull/3104), [#3108](https://github.com/grafana/k6/pull/3108), [#3120](https://github.com/grafana/k6/pull/3120), [#3125](https://github.com/grafana/k6/pull/3125), [#3162](https://github.com/grafana/k6/pull/3162), [#3169](https://github.com/grafana/k6/pull/3169), [#3182](https://github.com/grafana/k6/pull/3182), [#3186](https://github.com/grafana/k6/pull/3186), [#3187](https://github.com/grafana/k6/pull/3187), [#3193](https://github.com/grafana/k6/pull/3193), [#3195](https://github.com/grafana/k6/pull/3195), [#3206](https://github.com/grafana/k6/pull/3206), [#3226](https://github.com/grafana/k6/pull/3226), [#3157](https://github.com/grafana/k6/pull/3157), [#3172](https://github.com/grafana/k6/pull/3172). ### `` `#pr` @@ -95,7 +105,6 @@ _what, why, and what this means for the user_ _Format as ` . `_: - _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ -- [#3157](https://github.com/grafana/k6/pull/3157) and [#3172](https://github.com/grafana/k6/pull/3172) Add a `MaxTimeSeriesInBatch` configuration option. - [#3176](https://github.com/grafana/k6/pull/3176) Adds a `js/promises` package, which enables extension developers to easily create promises that will be dispatched to the eventloop using the `New` function. - [#3181](https://github.com/grafana/k6/pull/3181) Adds a `RunOnEventLoop` method to the `modulestest.Runtime` type, which allows extensions developers to run code on the event loop from their tests. @@ -116,24 +125,6 @@ _Format as ` . `_: - [#3131](https://github.com/grafana/k6/pull/3131) Updates our Pull Request template to be more structured and include a checklist for contributors. - [#3177](https://github.com/grafana/k6/pull/3177) Updates the version of golangci-lint we use to the latest version. -### Cloud output v2 - -// TODO @codebien - -* [3104](https://github.com/grafana/k6/pull/3104) Retry and flushers pool -* [3108](https://github.com/grafana/k6/pull/3108) Flush chunks -* [3120](https://github.com/grafana/k6/pull/3120) Unlimited size for body payload -* [3125](https://github.com/grafana/k6/pull/3125) Use a static remote service url -* [3162](https://github.com/grafana/k6/pull/3162) Warn about labels that have reserved names -* [3169](https://github.com/grafana/k6/pull/3169) Compact histogram -- [#3182](https://github.com/grafana/k6/pull/3182) Fix off-by-one error for spans -- [#3186](https://github.com/grafana/k6/pull/3186) Be less noisy when handling errors -- [#3187](https://github.com/grafana/k6/pull/3187) Create batches for single bucket flush -- [#3193](https://github.com/grafana/k6/pull/3193) Downscale the batch size -- [#3195](https://github.com/grafana/k6/pull/3195) Make sure to use the overwritten config -- [#3206](https://github.com/grafana/k6/pull/3206) Implement concurrent pushes accross batches -- [#3226](https://github.com/grafana/k6/pull/3226) don't go over maxSeriesInBatch - ## _Optional_ Roadmap _Discussion of future plans_ From e587426308c1381d2668820c37d8acb3724713ac Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Thu, 10 Aug 2023 15:18:17 +0200 Subject: [PATCH 18/35] Document xk6-grpc's change --- release notes/v0.46.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 05fa29e5bff..cb43cef5b79 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -107,6 +107,7 @@ _Format as ` . `_: - [#3176](https://github.com/grafana/k6/pull/3176) Adds a `js/promises` package, which enables extension developers to easily create promises that will be dispatched to the eventloop using the `New` function. - [#3181](https://github.com/grafana/k6/pull/3181) Adds a `RunOnEventLoop` method to the `modulestest.Runtime` type, which allows extensions developers to run code on the event loop from their tests. +- [#xk6-grpc#19](https://github.com/grafana/xk6-grpc/pull/19) Writing to the closed GRPC stream no longer produce the EOF (end of file) error. Additionally, if no errors' handler were set up. The error is logged to the console. ## Bug fixes From b754aab34413c271e8623c707028ea8c212e80d8 Mon Sep 17 00:00:00 2001 From: ka3de Date: Fri, 11 Aug 2023 14:12:05 +0200 Subject: [PATCH 19/35] Adds xk6-browser v1.0.2 release notes (#3260) --- release notes/v0.46.0.md | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index cb43cef5b79..edfc9d212a2 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -9,6 +9,49 @@ k6 `v0.46` is here πŸŽ‰! This release includes: - `#pr`, `` - `#pr`, `` +### Browser + +In this release, xk6-browser extension version is bumped up to `v1.0.2`, as it includes multiple breaking changes in relation with options, browser lifecycle and metrics. + +**Options** `devtools`, `env` and `proxy` are deprecated ([browser#868](https://github.com/grafana/xk6-browser/pull/868), [browser#870](https://github.com/grafana/xk6-browser/pull/870), [browser#872](https://github.com/grafana/xk6-browser/pull/872)). Additionally, browser `launch`/`connect` options are no longer defined in the corresponding JS API methods, instead the test execution related options are now defined inside the browser scenario options (see [#3036](https://github.com/grafana/k6/pull/3036)), and the other more "environmental options", such as `headless`, `debug`, `executablePath`, are set as ENV vars. Also `slowMo` option is no longer supported, although it might be supported again in the future through a different API ([browser#876](https://github.com/grafana/xk6-browser/pull/876)). + +**Metrics** also went through a few changes. The Web Vitals metrics are renamed to use `browser_` prefix and short namings (e.g.: `webvital_first_input_delay` -> `browser_web_vital_fid`) ([browser#885](https://github.com/grafana/xk6-browser/pull/885), [browser#903](https://github.com/grafana/xk6-browser/pull/903)), and the rating metric is removed, as it is now set as a label in the corresponding Web Vitals metrics ([browser#915](https://github.com/grafana/xk6-browser/pull/915)) +The browser HTTP metrics have also been modified, as these are now split from the HTTP module ones, so there are new `browser_` prefixed HTTP metrics, specifically for request duration and failed requests ([browser#916](https://github.com/grafana/xk6-browser/pull/916)). + +Another big change introduced in this version affects the way the **browser lifecycle** is handled. Now the users no longer have to explicitly initialize/close the browser instance through the JS API. Instead a browser instance will be automatically initialized/closed at the beginning/end of each iteration if the browser type is set in scenario options (see [#3036](https://github.com/grafana/k6/pull/3036)). This also implies that the `chromium` entity from `k6/experimental/browser` import path is no longer valid, instead the `browser` entity provides access to the browser methods such as `browser.newPage()` ([browser#910](https://github.com/grafana/xk6-browser/pull/910), [browser#944](https://github.com/grafana/xk6-browser/pull/944)). This change implies that the `browser.on()` method is no longer applicable, and therefore it has been removed ([browser#919](https://github.com/grafana/xk6-browser/pull/919)). + +Following with **import changes**, the browser module version is no longer an exported field ([browser#923](https://github.com/grafana/xk6-browser/pull/923)). + +Last but not least, this release also includes constraints on **browser contexts** usage as now only one `browserContext` is allowed per iteration, which means that the user can create a new `browserContext`, close it, and then create it again; but can not have more than one "live" `browserContext`. Instead, [scenarios](https://k6.io/docs/using-k6/scenarios/) should be used to separate independent actions in a test ([browser#929](https://github.com/grafana/xk6-browser/pull/929), [browser#945](https://github.com/grafana/xk6-browser/pull/945)). + +With all these changes, a simple browser test now looks like: +```js +import { browser } from 'k6/experimental/browser'; + +export const options = { + scenarios: { + ui: { + executor: 'shared-iterations', + options: { + browser: { + type: 'chromium', // chromium is the only supported browser type so as long as + // the option is set, Chromium/Google Chrome will be used + }, + }, + }, + }, +}; + +export default async function () { + const page = browser.newPage(); + try { + await page.goto('https://grafana.com') + } finally { + page.close(); + } +} +``` + ### (_optional h3_) `` `#pr` ## New features @@ -108,6 +151,9 @@ _Format as ` . `_: - [#3176](https://github.com/grafana/k6/pull/3176) Adds a `js/promises` package, which enables extension developers to easily create promises that will be dispatched to the eventloop using the `New` function. - [#3181](https://github.com/grafana/k6/pull/3181) Adds a `RunOnEventLoop` method to the `modulestest.Runtime` type, which allows extensions developers to run code on the event loop from their tests. - [#xk6-grpc#19](https://github.com/grafana/xk6-grpc/pull/19) Writing to the closed GRPC stream no longer produce the EOF (end of file) error. Additionally, if no errors' handler were set up. The error is logged to the console. +- [browser#881](https://github.com/grafana/xk6-browser/pull/881) Adds a new `browser_http_req_failed` metric. +- [browser#901](https://github.com/grafana/xk6-browser/pull/901) Adds support for shadow DOM piercing in `locator`. Thanks to @tmc for its implementation. +- [browser#953](https://github.com/grafana/xk6-browser/pull/953) Improves Web Vitals reporting for better accuracy and consistency. ## Bug fixes @@ -116,6 +162,12 @@ _Format as ` . `_: - [#3231](https://github.com/grafana/k6/pull/3231) Fixes the tracing module sampling option to default to 1.0 when not set by the user. - [#3163](https://github.com/grafana/k6/pull/3163) Fixes our gRPC example. - [#3196](https://github.com/grafana/k6/pull/3196) Logs packages lint fixes, and test for loki flushing at end. +- [browser#866](https://github.com/grafana/xk6-browser/pull/866) Disables the timeout on browser process execution. +- [browser#942](https://github.com/grafana/xk6-browser/pull/942) Fixes deadlock in `frameNavigated`. +- [browser#943](https://github.com/grafana/xk6-browser/pull/943) Fixes a race condition in navigation and lifecycle events. +- [browser#979](https://github.com/grafana/xk6-browser/pull/979) Fixes a deadlock on `pagehide` event evaluation when `page.close()` is called. +- [browser#980](https://github.com/grafana/xk6-browser/pull/980) Fixes Loki log output for console log serializer. +- [browser#991](https://github.com/grafana/xk6-browser/pull/991) Fixes data directory not being cleared during `browser.close()` panic. ## Maintenance and internal improvements @@ -125,6 +177,12 @@ _Format as ` . `_: - [#3136](https://github.com/grafana/k6/pull/3136) Updates k6 Go dependencies. - [#3131](https://github.com/grafana/k6/pull/3131) Updates our Pull Request template to be more structured and include a checklist for contributors. - [#3177](https://github.com/grafana/k6/pull/3177) Updates the version of golangci-lint we use to the latest version. +- [browser#849](https://github.com/grafana/xk6-browser/pull/849), [browser#972](https://github.com/grafana/xk6-browser/pull/972), [browser#977](https://github.com/grafana/xk6-browser/pull/977), [browser#978](https://github.com/grafana/xk6-browser/pull/978), [browser#983](https://github.com/grafana/xk6-browser/pull/983) Log fixes and improvements. +- [browser#889](https://github.com/grafana/xk6-browser/pull/889), [browser#889](https://github.com/grafana/xk6-browser/pull/899), [browser#902](https://github.com/grafana/xk6-browser/pull/902), [browser#935](https://github.com/grafana/xk6-browser/pull/935), [browser#936](https://github.com/grafana/xk6-browser/pull/936) Internal refactors. +- [browser#904](https://github.com/grafana/xk6-browser/pull/904), [browser#959](https://github.com/grafana/xk6-browser/pull/959) Test fixes. + - [browser#906](https://github.com/grafana/xk6-browser/pull/906) Parses the scenarios JSON definition from the `K6_INSTANCE_SCENARIOS` environment variable. + - [browser#918](https://github.com/grafana/xk6-browser/pull/918) Replaces the usage of `os.LookupEnv` for k6 `LookupEnv` and abstracts environment variables lookup. + - [browser#984](https://github.com/grafana/xk6-browser/pull/984) Ensures CDP requests message ID are unique at the connection scope. ## _Optional_ Roadmap From a32c5ac6ea0c2f3ffb816d3655a4419a094af0be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Fri, 11 Aug 2023 14:49:24 +0200 Subject: [PATCH 20/35] Update release notes/v0.46.0.md Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v0.46.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index edfc9d212a2..29b79264209 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -70,7 +70,7 @@ k6 --log-output=loki=http://example.org,header.X-My-Header=123,header.Authorizat Will now send the header `X-My-Header` with value `123` and `Authorization` with `mytoken`. -Thanks to @federicotdn for doign the changes +Thanks to @federicotdn for doing the changes. ### Cloud Traces [#3100](https://github.com/grafana/k6/pull/3100), [#3202](https://github.com/grafana/k6/pull/3202) From 9ae4351b95c47d3ea102b8defe4c92cd3eae80c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Fri, 11 Aug 2023 14:49:45 +0200 Subject: [PATCH 21/35] Update release notes/v0.46.0.md Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v0.46.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 29b79264209..9de00f78578 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -159,7 +159,7 @@ _Format as ` . `_: - [#3178](https://github.com/grafana/k6/pull/3178), [xk6-grpc#23](https://github.com/grafana/xk6-grpc/pull/23) Fixes the registration of nested protobuf messages in the gRPC module. Thanks @thiagodpf for reporting and actually fixing the bug! - [#3194](https://github.com/grafana/k6/pull/3194) Fixes loki log output exiting before push is finished. -- [#3231](https://github.com/grafana/k6/pull/3231) Fixes the tracing module sampling option to default to 1.0 when not set by the user. +- [#3231](https://github.com/grafana/k6/pull/3231) Fixes the tracing module sampling option to default to `1.0` when not set by the user. - [#3163](https://github.com/grafana/k6/pull/3163) Fixes our gRPC example. - [#3196](https://github.com/grafana/k6/pull/3196) Logs packages lint fixes, and test for loki flushing at end. - [browser#866](https://github.com/grafana/xk6-browser/pull/866) Disables the timeout on browser process execution. From 778a3c9458bc0b00c66a77d47ac22714dbdf05de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Fri, 11 Aug 2023 14:49:55 +0200 Subject: [PATCH 22/35] Update release notes/v0.46.0.md Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v0.46.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 9de00f78578..f02c0df7312 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -160,7 +160,7 @@ _Format as ` . `_: - [#3178](https://github.com/grafana/k6/pull/3178), [xk6-grpc#23](https://github.com/grafana/xk6-grpc/pull/23) Fixes the registration of nested protobuf messages in the gRPC module. Thanks @thiagodpf for reporting and actually fixing the bug! - [#3194](https://github.com/grafana/k6/pull/3194) Fixes loki log output exiting before push is finished. - [#3231](https://github.com/grafana/k6/pull/3231) Fixes the tracing module sampling option to default to `1.0` when not set by the user. -- [#3163](https://github.com/grafana/k6/pull/3163) Fixes our gRPC example. +- [#3163](https://github.com/grafana/k6/pull/3163) Fixes our [gRPC example](https://github.com/grafana/k6/blob/8fa0e6b9a8b63f430df34047e4393b281ff9ee30/examples/grpc.js). - [#3196](https://github.com/grafana/k6/pull/3196) Logs packages lint fixes, and test for loki flushing at end. - [browser#866](https://github.com/grafana/xk6-browser/pull/866) Disables the timeout on browser process execution. - [browser#942](https://github.com/grafana/xk6-browser/pull/942) Fixes deadlock in `frameNavigated`. From 1383381e0589bdeadde369d74783a8cdc72ba004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Fri, 11 Aug 2023 14:50:10 +0200 Subject: [PATCH 23/35] Update release notes/v0.46.0.md Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v0.46.0.md | 1 - 1 file changed, 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index f02c0df7312..7a7a521e2c7 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -147,7 +147,6 @@ _what, why, and what this means for the user_ _Format as ` . `_: - _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ - - [#3176](https://github.com/grafana/k6/pull/3176) Adds a `js/promises` package, which enables extension developers to easily create promises that will be dispatched to the eventloop using the `New` function. - [#3181](https://github.com/grafana/k6/pull/3181) Adds a `RunOnEventLoop` method to the `modulestest.Runtime` type, which allows extensions developers to run code on the event loop from their tests. - [#xk6-grpc#19](https://github.com/grafana/xk6-grpc/pull/19) Writing to the closed GRPC stream no longer produce the EOF (end of file) error. Additionally, if no errors' handler were set up. The error is logged to the console. From 1388a83210343ce6dcb59c1622dc4ecb1dd8cb8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Fri, 11 Aug 2023 14:50:35 +0200 Subject: [PATCH 24/35] Update release notes/v0.46.0.md Co-authored-by: Heitor Tashiro Sergent --- release notes/v0.46.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 7a7a521e2c7..a6fdb8c26b4 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -123,7 +123,7 @@ if (__ITER === 0) { ``` -Thanks @chrismoran-mica for contribution πŸ™‡β€β™‚οΈ. +Thanks @chrismoran-mica for the contribution πŸ™‡β€β™‚οΈ. ### Cloud Output v2 [#3117](https://github.com/grafana/k6/issues/3117) From cf5d919fe36fec939b044ee810ac7e60d63b12ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Fri, 11 Aug 2023 14:51:14 +0200 Subject: [PATCH 25/35] Apply suggestions from code review Co-authored-by: Heitor Tashiro Sergent --- release notes/v0.46.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index a6fdb8c26b4..1e7994a5df7 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -149,14 +149,14 @@ _Format as ` . `_: - _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ - [#3176](https://github.com/grafana/k6/pull/3176) Adds a `js/promises` package, which enables extension developers to easily create promises that will be dispatched to the eventloop using the `New` function. - [#3181](https://github.com/grafana/k6/pull/3181) Adds a `RunOnEventLoop` method to the `modulestest.Runtime` type, which allows extensions developers to run code on the event loop from their tests. -- [#xk6-grpc#19](https://github.com/grafana/xk6-grpc/pull/19) Writing to the closed GRPC stream no longer produce the EOF (end of file) error. Additionally, if no errors' handler were set up. The error is logged to the console. +- [#xk6-grpc#19](https://github.com/grafana/xk6-grpc/pull/19) Writing to the closed gRPC stream no longer produces the EOF (end of file) error. Additionally, if no error handlers were set up, the error is logged to the console. - [browser#881](https://github.com/grafana/xk6-browser/pull/881) Adds a new `browser_http_req_failed` metric. - [browser#901](https://github.com/grafana/xk6-browser/pull/901) Adds support for shadow DOM piercing in `locator`. Thanks to @tmc for its implementation. - [browser#953](https://github.com/grafana/xk6-browser/pull/953) Improves Web Vitals reporting for better accuracy and consistency. ## Bug fixes -- [#3178](https://github.com/grafana/k6/pull/3178), [xk6-grpc#23](https://github.com/grafana/xk6-grpc/pull/23) Fixes the registration of nested protobuf messages in the gRPC module. Thanks @thiagodpf for reporting and actually fixing the bug! +- [#3178](https://github.com/grafana/k6/pull/3178), [xk6-grpc#23](https://github.com/grafana/xk6-grpc/pull/23) Fixes the registration of nested protobuf messages in the gRPC module. Thanks @thiagodpf for reporting and fixing the bug! - [#3194](https://github.com/grafana/k6/pull/3194) Fixes loki log output exiting before push is finished. - [#3231](https://github.com/grafana/k6/pull/3231) Fixes the tracing module sampling option to default to `1.0` when not set by the user. - [#3163](https://github.com/grafana/k6/pull/3163) Fixes our [gRPC example](https://github.com/grafana/k6/blob/8fa0e6b9a8b63f430df34047e4393b281ff9ee30/examples/grpc.js). @@ -170,7 +170,7 @@ _Format as ` . `_: ## Maintenance and internal improvements -- [#3170](https://github.com/grafana/pull/3170) Upgraded the version of gRPC k6 demo service dependency for addressing a security vulnerability ([CVE-2023-32731]). +- [#3170](https://github.com/grafana/k6/pull/3170) Upgraded the version of gRPC k6 demo service dependency to address a security vulnerability ([CVE-2023-32731]). - [#3211](https://github.com/grafana/k6/pull/3211) Updates the experimental gRPC module version used by k6. - [#3210](https://github.com/grafana/k6/pull/3210) Updates the xk6-output-prometheus-remote version used by k6. - [#3136](https://github.com/grafana/k6/pull/3136) Updates k6 Go dependencies. From b6cb1f22561d0d513a97aa8f3de67ca3adf19799 Mon Sep 17 00:00:00 2001 From: oleiade Date: Fri, 11 Aug 2023 14:53:35 +0200 Subject: [PATCH 26/35] Revert consts.go version bump --- lib/consts/consts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/consts/consts.go b/lib/consts/consts.go index c9a30c71054..feb2dd6f663 100644 --- a/lib/consts/consts.go +++ b/lib/consts/consts.go @@ -8,7 +8,7 @@ import ( ) // Version contains the current semantic version of k6. -const Version = "0.46.0" +const Version = "0.45.0" // VersionDetails can be set externally as part of the build process var VersionDetails = "" //nolint:gochecknoglobals From ccbae7f34c53a738b333153d32fcb35327c93d2f Mon Sep 17 00:00:00 2001 From: oleiade Date: Fri, 11 Aug 2023 14:55:20 +0200 Subject: [PATCH 27/35] Integrate oleg's review --- release notes/v0.46.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 1e7994a5df7..9a16b6e57dc 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -129,7 +129,7 @@ Thanks @chrismoran-mica for the contribution πŸ™‡β€β™‚οΈ. After years of great service, we decided to refresh the k6 Cloud output introducing a more efficient end-to-end solution for ingesting the generated tests' metrics. The main change regards the protocol used for flushing metrics that is now a binary based payload over HTTP. -The new output reduces the load generators' used resources for tests that produce many metrics. There is no significant difference in the user experience; it's expected to be the same. +The new output reduces the load generators' used resources for tests that produce many metrics. There is no significant difference in the user experience; it's expected to be the same. The one thing worth highlighting is that the new output is strict about tags and drops tags if they are reserved: - `test_run_id` as it is reserved for internal k6 Cloud operations @@ -159,8 +159,6 @@ _Format as ` . `_: - [#3178](https://github.com/grafana/k6/pull/3178), [xk6-grpc#23](https://github.com/grafana/xk6-grpc/pull/23) Fixes the registration of nested protobuf messages in the gRPC module. Thanks @thiagodpf for reporting and fixing the bug! - [#3194](https://github.com/grafana/k6/pull/3194) Fixes loki log output exiting before push is finished. - [#3231](https://github.com/grafana/k6/pull/3231) Fixes the tracing module sampling option to default to `1.0` when not set by the user. -- [#3163](https://github.com/grafana/k6/pull/3163) Fixes our [gRPC example](https://github.com/grafana/k6/blob/8fa0e6b9a8b63f430df34047e4393b281ff9ee30/examples/grpc.js). -- [#3196](https://github.com/grafana/k6/pull/3196) Logs packages lint fixes, and test for loki flushing at end. - [browser#866](https://github.com/grafana/xk6-browser/pull/866) Disables the timeout on browser process execution. - [browser#942](https://github.com/grafana/xk6-browser/pull/942) Fixes deadlock in `frameNavigated`. - [browser#943](https://github.com/grafana/xk6-browser/pull/943) Fixes a race condition in navigation and lifecycle events. @@ -176,6 +174,8 @@ _Format as ` . `_: - [#3136](https://github.com/grafana/k6/pull/3136) Updates k6 Go dependencies. - [#3131](https://github.com/grafana/k6/pull/3131) Updates our Pull Request template to be more structured and include a checklist for contributors. - [#3177](https://github.com/grafana/k6/pull/3177) Updates the version of golangci-lint we use to the latest version. +- [#3163](https://github.com/grafana/k6/pull/3163) Fixes our [gRPC example](https://github.com/grafana/k6/blob/8fa0e6b9a8b63f430df34047e4393b281ff9ee30/examples/grpc.js). +- [#3196](https://github.com/grafana/k6/pull/3196) Logs packages lint fixes, and test for loki flushing at end. - [browser#849](https://github.com/grafana/xk6-browser/pull/849), [browser#972](https://github.com/grafana/xk6-browser/pull/972), [browser#977](https://github.com/grafana/xk6-browser/pull/977), [browser#978](https://github.com/grafana/xk6-browser/pull/978), [browser#983](https://github.com/grafana/xk6-browser/pull/983) Log fixes and improvements. - [browser#889](https://github.com/grafana/xk6-browser/pull/889), [browser#889](https://github.com/grafana/xk6-browser/pull/899), [browser#902](https://github.com/grafana/xk6-browser/pull/902), [browser#935](https://github.com/grafana/xk6-browser/pull/935), [browser#936](https://github.com/grafana/xk6-browser/pull/936) Internal refactors. - [browser#904](https://github.com/grafana/xk6-browser/pull/904), [browser#959](https://github.com/grafana/xk6-browser/pull/959) Test fixes. From 098dd238d492b3c6c42481ece9776e786931dec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Mon, 14 Aug 2023 08:53:42 +0200 Subject: [PATCH 28/35] Apply suggestions from code review Co-authored-by: Heitor Tashiro Sergent Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v0.46.0.md | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 9a16b6e57dc..4c068b4ab07 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -11,16 +11,16 @@ k6 `v0.46` is here πŸŽ‰! This release includes: ### Browser -In this release, xk6-browser extension version is bumped up to `v1.0.2`, as it includes multiple breaking changes in relation with options, browser lifecycle and metrics. +In this release, the xk6-browser extension version is bumped up to `v1.0.2`, as it includes multiple breaking changes concerning options, browser lifecycle, and metrics. -**Options** `devtools`, `env` and `proxy` are deprecated ([browser#868](https://github.com/grafana/xk6-browser/pull/868), [browser#870](https://github.com/grafana/xk6-browser/pull/870), [browser#872](https://github.com/grafana/xk6-browser/pull/872)). Additionally, browser `launch`/`connect` options are no longer defined in the corresponding JS API methods, instead the test execution related options are now defined inside the browser scenario options (see [#3036](https://github.com/grafana/k6/pull/3036)), and the other more "environmental options", such as `headless`, `debug`, `executablePath`, are set as ENV vars. Also `slowMo` option is no longer supported, although it might be supported again in the future through a different API ([browser#876](https://github.com/grafana/xk6-browser/pull/876)). +**Options** `devtools`, `env` and `proxy` are deprecated ([browser#868](https://github.com/grafana/xk6-browser/pull/868), [browser#870](https://github.com/grafana/xk6-browser/pull/870), [browser#872](https://github.com/grafana/xk6-browser/pull/872)). Additionally, browser `launch`/`connect` options are no longer defined in the corresponding JS API methods, instead the test execution related options are now defined inside the browser scenario options (see [#3036](https://github.com/grafana/k6/pull/3036)), and the other more "environmental options", such as `headless`, `debug`, `executablePath`, are set as ENV vars. Also, the `slowMo` option is no longer supported, although it might be supported again in the future through a different API ([browser#876](https://github.com/grafana/xk6-browser/pull/876)). -**Metrics** also went through a few changes. The Web Vitals metrics are renamed to use `browser_` prefix and short namings (e.g.: `webvital_first_input_delay` -> `browser_web_vital_fid`) ([browser#885](https://github.com/grafana/xk6-browser/pull/885), [browser#903](https://github.com/grafana/xk6-browser/pull/903)), and the rating metric is removed, as it is now set as a label in the corresponding Web Vitals metrics ([browser#915](https://github.com/grafana/xk6-browser/pull/915)) +**Metrics** also went through a few changes. The Web Vitals metrics are renamed to use the `browser_` prefix and short namings (e.g.: `webvital_first_input_delay` -> `browser_web_vital_fid`) ([browser#885](https://github.com/grafana/xk6-browser/pull/885), [browser#903](https://github.com/grafana/xk6-browser/pull/903)), and the rating metric is removed, as it is now set as a label in the corresponding Web Vitals metrics ([browser#915](https://github.com/grafana/xk6-browser/pull/915)). The browser HTTP metrics have also been modified, as these are now split from the HTTP module ones, so there are new `browser_` prefixed HTTP metrics, specifically for request duration and failed requests ([browser#916](https://github.com/grafana/xk6-browser/pull/916)). -Another big change introduced in this version affects the way the **browser lifecycle** is handled. Now the users no longer have to explicitly initialize/close the browser instance through the JS API. Instead a browser instance will be automatically initialized/closed at the beginning/end of each iteration if the browser type is set in scenario options (see [#3036](https://github.com/grafana/k6/pull/3036)). This also implies that the `chromium` entity from `k6/experimental/browser` import path is no longer valid, instead the `browser` entity provides access to the browser methods such as `browser.newPage()` ([browser#910](https://github.com/grafana/xk6-browser/pull/910), [browser#944](https://github.com/grafana/xk6-browser/pull/944)). This change implies that the `browser.on()` method is no longer applicable, and therefore it has been removed ([browser#919](https://github.com/grafana/xk6-browser/pull/919)). +Another big change introduced in this version affects the way the **browser lifecycle** is handled. Users no longer have to explicitly initialize/close the browser instance through the JS API. Instead, a browser instance will be automatically initialized/closed at the beginning/end of each iteration if the browser type is set in scenario options (see [#3036](https://github.com/grafana/k6/pull/3036)). This also means that the `chromium` entity from `k6/experimental/browser` import path is no longer valid. Instead, the `browser` entity provides access to the browser methods such as `browser.newPage()` ([browser#910](https://github.com/grafana/xk6-browser/pull/910), [browser#944](https://github.com/grafana/xk6-browser/pull/944)). This change means that the `browser.on()` method is no longer applicable, and therefore it has been removed ([browser#919](https://github.com/grafana/xk6-browser/pull/919)). -Following with **import changes**, the browser module version is no longer an exported field ([browser#923](https://github.com/grafana/xk6-browser/pull/923)). +Additionally, related to **import changes**, the browser module version is no longer an exported field ([browser#923](https://github.com/grafana/xk6-browser/pull/923)). Last but not least, this release also includes constraints on **browser contexts** usage as now only one `browserContext` is allowed per iteration, which means that the user can create a new `browserContext`, close it, and then create it again; but can not have more than one "live" `browserContext`. Instead, [scenarios](https://k6.io/docs/using-k6/scenarios/) should be used to separate independent actions in a test ([browser#929](https://github.com/grafana/xk6-browser/pull/929), [browser#945](https://github.com/grafana/xk6-browser/pull/945)). @@ -52,29 +52,28 @@ export default async function () { } ``` -### (_optional h3_) `` `#pr` ## New features ### Loki log output sending additional headers [#3227](https://github.com/grafana/k6/pull/3227) -k6 has been able to send logs to loki for nearly 3 years since [v0.28.0](https://github.com/grafana/k6/releases/tag/v0.28.0) but didn't support any way to authenticate. +k6 has been able to send logs to [Loki](https://github.com/grafana/loki) for nearly 3 years since [v0.28.0](https://github.com/grafana/k6/releases/tag/v0.28.0) but didn't support any way to authenticate. -Now it can be configured to send additional headers on every request. +Now, it can be configured to send additional headers on every request. -This is being configured with the new `header` config option similar to `label`: +This can be done by using the new `header` config option, similar to `label`: ``` k6 --log-output=loki=http://example.org,header.X-My-Header=123,header.Authorization=mytoken ... ``` -Will now send the header `X-My-Header` with value `123` and `Authorization` with `mytoken`. +The example above will now send the header `X-My-Header` with the value `123` and the `Authorization` header with the value `mytoken`. -Thanks to @federicotdn for doing the changes. +Thanks to @federicotdn for adding this feature. ### Cloud Traces [#3100](https://github.com/grafana/k6/pull/3100), [#3202](https://github.com/grafana/k6/pull/3202) -This release supports the new integration between k6 and Tempo in the cloud. Grafana Cloud k6 and Grafana Cloud Traces customers will be able to start their traces in k6 using the existing `k6/experimental/tracing` module to enrich their test run analysis page with metrics and aggregations from tracing data. +This release supports the new integration between k6 and Tempo in the cloud. [Grafana Cloud k6](https://grafana.com/products/cloud/k6) and Grafana Cloud Tempo customers will be able to start their traces in k6 using the existing `k6/experimental/tracing` module to enrich their test run analysis page with metrics and aggregations from tracing data. The new cloud traces will work "out of the box" for `k6 cloud` runs. In case of `k6 run` execution, the `K6_CLOUD_TRACES_ENABLED` environment variable has to be set to `true`. @@ -127,15 +126,16 @@ Thanks @chrismoran-mica for the contribution πŸ™‡β€β™‚οΈ. ### Cloud Output v2 [#3117](https://github.com/grafana/k6/issues/3117) -After years of great service, we decided to refresh the k6 Cloud output introducing a more efficient end-to-end solution for ingesting the generated tests' metrics. The main change regards the protocol used for flushing metrics that is now a binary based payload over HTTP. +After years of great service, we decided to refresh the k6 Cloud output introducing a more efficient end-to-end solution for ingesting the generated tests' metrics. The main change regards the protocol used for flushing metrics that is now a binary-based payload over HTTP. -The new output reduces the load generators' used resources for tests that produce many metrics. There is no significant difference in the user experience; it's expected to be the same. +The new output reduces the resources a load generator uses for tests that produce many metrics. There is no significant difference in the user experience; it's expected to be the same. -The one thing worth highlighting is that the new output is strict about tags and drops tags if they are reserved: -- `test_run_id` as it is reserved for internal k6 Cloud operations -- any tag with a key that starts with two underscores (`__`), that is marked by Prometheus convention as reserved +The one thing worth highlighting is that the new output is strict about tags, and it'll drops tags if they are reserved. For example: -At the moment this is not yet the default Cloud output for the test runs executed from local machines (`k6 run -o cloud`), but it is expected to be transparently enabled in the upcoming weeks. +- A custom tag named `test_run_id`, since that is reserved for internal k6 Cloud operations +- Any tag with a key that starts with two underscores (`__`), that is marked by Prometheus convention as reserved + +This is not yet the default Cloud output for the test runs executed from local machines (`k6 run -o cloud`), but it is expected to be transparently enabled in the upcoming weeks. The full list of related PRs: [#3104](https://github.com/grafana/k6/pull/3104), [#3108](https://github.com/grafana/k6/pull/3108), [#3120](https://github.com/grafana/k6/pull/3120), [#3125](https://github.com/grafana/k6/pull/3125), [#3162](https://github.com/grafana/k6/pull/3162), [#3169](https://github.com/grafana/k6/pull/3169), [#3182](https://github.com/grafana/k6/pull/3182), [#3186](https://github.com/grafana/k6/pull/3186), [#3187](https://github.com/grafana/k6/pull/3187), [#3193](https://github.com/grafana/k6/pull/3193), [#3195](https://github.com/grafana/k6/pull/3195), [#3206](https://github.com/grafana/k6/pull/3206), [#3226](https://github.com/grafana/k6/pull/3226), [#3157](https://github.com/grafana/k6/pull/3157), [#3172](https://github.com/grafana/k6/pull/3172). @@ -183,6 +183,3 @@ _Format as ` . `_: - [browser#918](https://github.com/grafana/xk6-browser/pull/918) Replaces the usage of `os.LookupEnv` for k6 `LookupEnv` and abstracts environment variables lookup. - [browser#984](https://github.com/grafana/xk6-browser/pull/984) Ensures CDP requests message ID are unique at the connection scope. -## _Optional_ Roadmap - -_Discussion of future plans_ From fe13ab34dca79404b823a2411c6c7342b0bb45cf Mon Sep 17 00:00:00 2001 From: oleiade Date: Mon, 14 Aug 2023 09:11:47 +0200 Subject: [PATCH 29/35] Apply Heitor's suggestions --- release notes/v0.46.0.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 4c068b4ab07..10ed2b1143c 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -139,17 +139,12 @@ This is not yet the default Cloud output for the test runs executed from local m The full list of related PRs: [#3104](https://github.com/grafana/k6/pull/3104), [#3108](https://github.com/grafana/k6/pull/3108), [#3120](https://github.com/grafana/k6/pull/3120), [#3125](https://github.com/grafana/k6/pull/3125), [#3162](https://github.com/grafana/k6/pull/3162), [#3169](https://github.com/grafana/k6/pull/3169), [#3182](https://github.com/grafana/k6/pull/3182), [#3186](https://github.com/grafana/k6/pull/3186), [#3187](https://github.com/grafana/k6/pull/3187), [#3193](https://github.com/grafana/k6/pull/3193), [#3195](https://github.com/grafana/k6/pull/3195), [#3206](https://github.com/grafana/k6/pull/3206), [#3226](https://github.com/grafana/k6/pull/3226), [#3157](https://github.com/grafana/k6/pull/3157), [#3172](https://github.com/grafana/k6/pull/3172). -### `` `#pr` -_what, why, and what this means for the user_ +## UX improvements and enhancements -### UX improvements and enhancements - -_Format as ` . `_: -- _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ - [#3176](https://github.com/grafana/k6/pull/3176) Adds a `js/promises` package, which enables extension developers to easily create promises that will be dispatched to the eventloop using the `New` function. - [#3181](https://github.com/grafana/k6/pull/3181) Adds a `RunOnEventLoop` method to the `modulestest.Runtime` type, which allows extensions developers to run code on the event loop from their tests. -- [#xk6-grpc#19](https://github.com/grafana/xk6-grpc/pull/19) Writing to the closed gRPC stream no longer produces the EOF (end of file) error. Additionally, if no error handlers were set up, the error is logged to the console. +- [#xk6-grpc#19](https://github.com/grafana/xk6-grpc/pull/19) Fixes EOF (end of file) error that was produced when writing to a closed gRPC stream. Additionally, if no error handlers are set up, the error is logged to the console. - [browser#881](https://github.com/grafana/xk6-browser/pull/881) Adds a new `browser_http_req_failed` metric. - [browser#901](https://github.com/grafana/xk6-browser/pull/901) Adds support for shadow DOM piercing in `locator`. Thanks to @tmc for its implementation. - [browser#953](https://github.com/grafana/xk6-browser/pull/953) Improves Web Vitals reporting for better accuracy and consistency. From 40e07f6588d216c487ec4b7651a99634209eb42e Mon Sep 17 00:00:00 2001 From: oleiade Date: Mon, 14 Aug 2023 09:12:54 +0200 Subject: [PATCH 30/35] fix grpc issue mention consistency --- release notes/v0.46.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 10ed2b1143c..0bacb18e18c 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -144,7 +144,7 @@ The full list of related PRs: [#3104](https://github.com/grafana/k6/pull/3104), - [#3176](https://github.com/grafana/k6/pull/3176) Adds a `js/promises` package, which enables extension developers to easily create promises that will be dispatched to the eventloop using the `New` function. - [#3181](https://github.com/grafana/k6/pull/3181) Adds a `RunOnEventLoop` method to the `modulestest.Runtime` type, which allows extensions developers to run code on the event loop from their tests. -- [#xk6-grpc#19](https://github.com/grafana/xk6-grpc/pull/19) Fixes EOF (end of file) error that was produced when writing to a closed gRPC stream. Additionally, if no error handlers are set up, the error is logged to the console. +- [xk6-grpc#19](https://github.com/grafana/xk6-grpc/pull/19) Fixes EOF (end of file) error that was produced when writing to a closed gRPC stream. Additionally, if no error handlers are set up, the error is logged to the console. - [browser#881](https://github.com/grafana/xk6-browser/pull/881) Adds a new `browser_http_req_failed` metric. - [browser#901](https://github.com/grafana/xk6-browser/pull/901) Adds support for shadow DOM piercing in `locator`. Thanks to @tmc for its implementation. - [browser#953](https://github.com/grafana/xk6-browser/pull/953) Improves Web Vitals reporting for better accuracy and consistency. From 21619146b291e296cf91c9e620ba71da28ce71de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Mon, 14 Aug 2023 09:13:22 +0200 Subject: [PATCH 31/35] Update release notes/v0.46.0.md Co-authored-by: Heitor Tashiro Sergent --- release notes/v0.46.0.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 0bacb18e18c..b4f8f10670d 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -1,8 +1,11 @@ k6 `v0.46` is here πŸŽ‰! This release includes: -- (_optional_) `` -- `` (_one or multiple bullets_) - +- xk6-browser extension version bump to `v1.0.2`, which includes breaking changes. +- Send custom headers to Loki log output +- Cloud Traces, the new integration between k6 and [Tempo](https://github.com/grafana/tempo) +- Ability to configure TLS per gRPC connection +- Cloud output v2 +- And many UX improvements, bug fixes, and internal improvements ## Breaking changes From daabd8c132e87a6b05c2fcc401db96b42a5ba744 Mon Sep 17 00:00:00 2001 From: oleiade Date: Mon, 14 Aug 2023 09:16:55 +0200 Subject: [PATCH 32/35] Iterate on the release notes --- release notes/v0.46.0.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index b4f8f10670d..fd8fd0adde8 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -7,10 +7,6 @@ k6 `v0.46` is here πŸŽ‰! This release includes: - Cloud output v2 - And many UX improvements, bug fixes, and internal improvements -## Breaking changes - -- `#pr`, `` -- `#pr`, `` ### Browser From 4c5b8cf540a13dc7072703713d93cf2388d06abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Mon, 14 Aug 2023 09:52:59 +0200 Subject: [PATCH 33/35] Update release notes/v0.46.0.md Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v0.46.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index fd8fd0adde8..b883890aca6 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -74,7 +74,7 @@ Thanks to @federicotdn for adding this feature. This release supports the new integration between k6 and Tempo in the cloud. [Grafana Cloud k6](https://grafana.com/products/cloud/k6) and Grafana Cloud Tempo customers will be able to start their traces in k6 using the existing `k6/experimental/tracing` module to enrich their test run analysis page with metrics and aggregations from tracing data. -The new cloud traces will work "out of the box" for `k6 cloud` runs. In case of `k6 run` execution, the `K6_CLOUD_TRACES_ENABLED` environment variable has to be set to `true`. +The new Cloud traces will work "out of the box" for `k6 cloud` runs. In case of `k6 run` execution, the `K6_CLOUD_TRACES_ENABLED` environment variable has to be set to `true`. ### Ability to configure TLS per gRPC connection [#3159](https://github.com/grafana/k6/pull/3159), [xk6-grpc#25](https://github.com/grafana/xk6-grpc/pull/25) From b3ec841b833d368782b4c402e8dd7f20c8c60eab Mon Sep 17 00:00:00 2001 From: oleiade Date: Mon, 14 Aug 2023 09:55:59 +0200 Subject: [PATCH 34/35] Iterate on v0.46 release notes --- release notes/v0.46.0.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index b883890aca6..1bb12fedab8 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -7,6 +7,7 @@ k6 `v0.46` is here πŸŽ‰! This release includes: - Cloud output v2 - And many UX improvements, bug fixes, and internal improvements +## Breaking Changes ### Browser @@ -51,6 +52,10 @@ export default async function () { } ``` +### Deprecations + +- [#3121](https://github.com/grafana/k6/issues/3121) deprecates the `loadimpact/k6` docker image. We intend to keep supporting it for at most a year from now, but we recommend switching to the `grafana/k6` image as soon as possible. + ## New features @@ -162,6 +167,7 @@ The full list of related PRs: [#3104](https://github.com/grafana/k6/pull/3104), ## Maintenance and internal improvements +- [#3112](https://github.com/grafana/k6/pull/3112) Adds an event system for core JS modules. - [#3170](https://github.com/grafana/k6/pull/3170) Upgraded the version of gRPC k6 demo service dependency to address a security vulnerability ([CVE-2023-32731]). - [#3211](https://github.com/grafana/k6/pull/3211) Updates the experimental gRPC module version used by k6. - [#3210](https://github.com/grafana/k6/pull/3210) Updates the xk6-output-prometheus-remote version used by k6. From cd9424ad4f1cdd9eff4e978e850dc1e71282eea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Mon, 14 Aug 2023 10:57:54 +0200 Subject: [PATCH 35/35] Update release notes/v0.46.0.md Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v0.46.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.46.0.md b/release notes/v0.46.0.md index 1bb12fedab8..b95dabf4819 100644 --- a/release notes/v0.46.0.md +++ b/release notes/v0.46.0.md @@ -54,7 +54,7 @@ export default async function () { ### Deprecations -- [#3121](https://github.com/grafana/k6/issues/3121) deprecates the `loadimpact/k6` docker image. We intend to keep supporting it for at most a year from now, but we recommend switching to the `grafana/k6` image as soon as possible. +- [#3121](https://github.com/grafana/k6/issues/3121) deprecates the `loadimpact/k6` docker image. We recommend switching to the `grafana/k6` image as soon as possible. ## New features