From 4c1711cf9733fdd0658ac9f5819d153161b95146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= Date: Tue, 4 Jun 2024 15:05:24 +0200 Subject: [PATCH 01/21] Create v0.52.0 release notes baseline --- release notes/v0.52.0.md | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 release notes/v0.52.0.md diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md new file mode 100644 index 00000000000..0024cf913b4 --- /dev/null +++ b/release notes/v0.52.0.md @@ -0,0 +1,46 @@ +k6 `v0.52.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 5f9b250874ac4b6e67e8b92a9bae1534ca3de385 Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Tue, 18 Jun 2024 12:17:22 +0200 Subject: [PATCH 02/21] Oleg's changelog --- release notes/v0.52.0.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index 0024cf913b4..23054e9de4e 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -6,7 +6,7 @@ k6 `v0.52.0` is here πŸŽ‰! This release includes: ## Breaking changes -- `#pr`, `` +- [`#3777`](https://github.com/grafana/k6/pull/3777) removes panic handling in k6. Previously, k6 tried to recover and continue execution. Unfortunately, this isn't always successful and could lead to unexpected behavior. Now, k6 will always exit on panic. Panic itself should be fixed separately. - `#pr`, `` ### (_optional h3_) `` `#pr` @@ -27,14 +27,13 @@ _what, why, and what this means for the user_ _Format as ` . `_: -- _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_ -- `#pr` `` -- `#pr` `` +- [#3798](https://github.com/grafana/k6/pull/3798) adjusts a severity level of a log message from `warn` to `debug` for cases when k6 can't detect the terminal's size. ## Bug fixes -_Format as ` . `_: -- _`#111` fixes race condition in runtime_ +- [#3776](https://github.com/grafana/k6/pull/3776) fixes a panic caused by passing an undefined handler to timers. +- [#3779](https://github.com/grafana/k6/pull/3779) fixes a panic caused by registering an undefined handler in gRPC streams. +- [xk6-websockets#73](https://github.com/grafana/xk6-websockets/pull/73) fixes a panic caused by registering an undefined handler in WebSockets. ## Maintenance and internal improvements From 6ae4fcdb007661ffb13002fbacd342a5ca781543 Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Wed, 19 Jun 2024 08:30:47 +0200 Subject: [PATCH 03/21] OpenTelemetry metrics output --- release notes/v0.52.0.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index 23054e9de4e..fb04ab19b76 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -40,6 +40,10 @@ _Format as ` . `_: _Format as ` . `_: - _`#2770` Refactors parts of the JS module._ -## _Optional_ Roadmap +## Roadmap -_Discussion of future plans_ +### OpenTelemetry metrics output + +We're also happy to share that this release cycle, we've been working on [xk6-output-opentelemetry](https://github.com/grafana/xk6-output-opentelemetry/), a k6 output extension that allows you to send k6 metrics to OpenTelemetry-compatible backends. We're looking for feedback from the community. If you're interested, please try it and let us know [via the extension repository](https://github.com/grafana/xk6-output-opentelemetry/issues)! + +Depending on the feedback, we plan to include this extension as an experimental output in the next K6 release. From a1c5d7cbed36ccbfb527b6a0c8f5c0529d1bd116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 19 Jun 2024 11:05:34 +0300 Subject: [PATCH 04/21] Add browser v2.0 changes to release notes --- release notes/v0.52.0.md | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index fb04ab19b76..8ac2be3dbac 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -7,6 +7,8 @@ k6 `v0.52.0` is here πŸŽ‰! This release includes: ## Breaking changes - [`#3777`](https://github.com/grafana/k6/pull/3777) removes panic handling in k6. Previously, k6 tried to recover and continue execution. Unfortunately, this isn't always successful and could lead to unexpected behavior. Now, k6 will always exit on panic. Panic itself should be fixed separately. +- [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) The `up` and `down` methods no longer take x and y coordinates. Instead, they dispatch events on the current mouse position. + - `#pr`, `` ### (_optional h3_) `` `#pr` @@ -23,23 +25,64 @@ _what, why, and what this means for the user_ _what, why, and what this means for the user_ +### `k6/browser` has graduated from an experimental module #3793 + +The browser module is now available as `k6/browser` instead of `k6/experimental/browser`. The previous `k6/experimental/browser` module will be removed on September 23rd, 2024. Please see [the migration guide](https://grafana.com/docs/k6/latest/using-k6-browser/migrating-to-k6-v0-52/) for more information on how to update your scripts. + +### `k6/browser` has now a fully Async API [browser#428](https://github.com/grafana/xk6-browser/issues/428) + +This release introduces a fully Async API for the `k6/browser` module. This means that nearly all the methods in the module now return promises. This change is part of the ongoing effort to make the browser module more user-friendly and easier to use. Please see [the browser documentation](https://grafana.com/docs/k6/latest/javascript-api/k6-browser) for more information on how to use the new Async API. + +Related Changes: +- [browser#1310](https://github.com/grafana/xk6-browser/pull/1310), [browser#1311](https://github.com/grafana/xk6-browser/pull/1311), [browser#1312](https://github.com/grafana/xk6-browser/pull/1312), [browser#1316](https://github.com/grafana/xk6-browser/pull/1316) Migrate `Browser` APIs to async. +- [browser#1326](https://github.com/grafana/xk6-browser/pull/1326), [browser#1327](https://github.com/grafana/xk6-browser/pull/1327), [browser#1328](https://github.com/grafana/xk6-browser/pull/1328) Migrate `BrowserContext` APIs to async. +- [browser#1335](https://github.com/grafana/xk6-browser/pull/1335), [browser#1337](https://github.com/grafana/xk6-browser/pull/1337) Migrate `ElementHandle` APIs to async. +- [browser#1367](https://github.com/grafana/xk6-browser/pull/1367) Migrate `Frame` APIs to async. +- [browser#1365](https://github.com/grafana/xk6-browser/pull/1365), [browser#1366](https://github.com/grafana/xk6-browser/pull/1366) Migrate `JSHandle` APIs to async. +- [browser#1313](https://github.com/grafana/xk6-browser/pull/1313), [browser#1314](https://github.com/grafana/xk6-browser/pull/1314) Migrate `Keyboard` APIs to async. +- [browser#1330](https://github.com/grafana/xk6-browser/pull/1330), [browser#1332](https://github.com/grafana/xk6-browser/pull/1332) Migrate `Locator` APIs to async. +- [browser#1322](https://github.com/grafana/xk6-browser/pull/1322), [browser#1323](https://github.com/grafana/xk6-browser/pull/1323) Migrate `Mouse` APIs to async. +- [browser#1343](https://github.com/grafana/xk6-browser/pull/1343), [browser#1345](https://github.com/grafana/xk6-browser/pull/1345), [browser#1352](https://github.com/grafana/xk6-browser/pull/1352), [browser#1355](https://github.com/grafana/xk6-browser/pull/1355) Migrate `Page` APIs to async. +- [browser#1348](https://github.com/grafana/xk6-browser/pull/1348), [browser#1349](https://github.com/grafana/xk6-browser/pull/1349), [browser#1354](https://github.com/grafana/xk6-browser/pull/1354), [browser#1358](https://github.com/grafana/xk6-browser/pull/1358), [browser#1363](https://github.com/grafana/xk6-browser/pull/1363) Migrate `Request` APIs to async. +- [browser#1364](https://github.com/grafana/xk6-browser/pull/1364) Migrate `Response` APIs to async. + ## UX improvements and enhancements _Format as ` . `_: - [#3798](https://github.com/grafana/k6/pull/3798) adjusts a severity level of a log message from `warn` to `debug` for cases when k6 can't detect the terminal's size. +- [browser#1370](https://github.com/grafana/xk6-browser/issues/1370) The `GetAttribute` methods now return `false` when the attribute is missing, making it easier to check for the presence of an attribute. +- [browser#1371](https://github.com/grafana/xk6-browser/issues/1371) The `TextContent` methods now return `false` when the element's text content cannot be grabbed (like a JS `document`), making it easier to check for the presence of text content. +- [browser#1376](https://github.com/grafana/xk6-browser/pull/1376) Makes `Request.headerValue` and `Response.headerValue` to be case insensitive. +- [browser#1368](https://github.com/grafana/xk6-browser/pull/1368) Enhances `await` usage in Javascript examples. ## Bug fixes - [#3776](https://github.com/grafana/k6/pull/3776) fixes a panic caused by passing an undefined handler to timers. - [#3779](https://github.com/grafana/k6/pull/3779) fixes a panic caused by registering an undefined handler in gRPC streams. - [xk6-websockets#73](https://github.com/grafana/xk6-websockets/pull/73) fixes a panic caused by registering an undefined handler in WebSockets. +- [browser#1369](https://github.com/grafana/xk6-browser/pull/1369) Improves `valueFromRemoteObject` `null` detection by returning a Go `nil` instead of `"null"` as a `string`. +- [browser#1386](https://github.com/grafana/xk6-browser/pull/1386) Correctly handles empty string flags that don't have a value. +- [browser#1380](https://github.com/grafana/xk6-browser/pull/1380) Ensures that `JSHandle.evaluate` and `JSHandle.evaluateHandle` both set themselves as the first argument. +- [browser#1346](https://github.com/grafana/xk6-browser/pull/1346) Fixes an IFrame panic ("we either navigate top level or have old version of the navigated frame") that happens during navigation. +- [browser#1334](https://github.com/grafana/xk6-browser/pull/1334) Fixes an issue where clicking on a link that opens a new tab never navigates to the href link. +- [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) Fixes the `Mouse.move` to correctly dispatch a `down` event. +- [browser#1301](https://github.com/grafana/xk6-browser/pull/1301) Fixes an error that occurs when working with a second tab and navigating to a URL. +- [browser#1301](https://github.com/grafana/xk6-browser/pull/1301) Fixes an error that occurs when working with a second tab and navigating to a URL. ## Maintenance and internal improvements _Format as ` . `_: - _`#2770` Refactors parts of the JS module._ +- [browser#1298](https://github.com/grafana/xk6-browser/pull/1298) Splits browser mappings into separate files for better organization and maintainability. +- [browser#1321](https://github.com/grafana/xk6-browser/pull/1321) Adds test helpers for async VU execution to reduce the boilerplate in the tests. +- [browser#1357](https://github.com/grafana/xk6-browser/pull/1357) Updates `Group` and `Tag` usage for the latest k6. +- [browser#1361](https://github.com/grafana/xk6-browser/pull/1361) Precalculates the browser version information to prevent I/O calls when the `version` and `userAgent` methods are called. This change allows the browser module to expose these methods as a sync API to be consistent with the Playwright's API. +- [browser#1360](https://github.com/grafana/xk6-browser/pull/1360), [browser#1327](https://github.com/grafana/xk6-browser/pull/1327), [browser#1335](https://github.com/grafana/xk6-browser/pull/1335), [browser#1365](https://github.com/grafana/xk6-browser/pull/1365), [browser#1313](https://github.com/grafana/xk6-browser/pull/1313), [browser#1322](https://github.com/grafana/xk6-browser/pull/1322), [browser#1330](https://github.com/grafana/xk6-browser/pull/1330), [browser#1343](https://github.com/grafana/xk6-browser/pull/1343), [browser#1345](https://github.com/grafana/xk6-browser/pull/1345), [browser#1352](https://github.com/grafana/xk6-browser/pull/1352) Turns the `Browser`, `BrowserContext`, `ElementHandle`, `JSHandle`, `Keyboard`, `Mouse`, `Locator`, and `Page` classes' panics into errors for stability and better error handling. +- [browser#1377](https://github.com/grafana/xk6-browser/pull/1377) Uses the Goja fork called Sobek in the browser module. +- [browser#1373](https://github.com/grafana/xk6-browser/pull/1373) Provides sync and async APIs within the browser module for making the migration to the async API easier. + ## Roadmap ### OpenTelemetry metrics output From 4e651c300cb9250b5dda0650ebc8aa0a3faff056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 19 Jun 2024 11:07:23 +0300 Subject: [PATCH 05/21] Fix the async browser API link in release notes --- release notes/v0.52.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index 8ac2be3dbac..d3c17cb2c6c 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -25,7 +25,7 @@ _what, why, and what this means for the user_ _what, why, and what this means for the user_ -### `k6/browser` has graduated from an experimental module #3793 +### `k6/browser` has graduated from an experimental module [#3793](https://github.com/grafana/k6/pull/3793) The browser module is now available as `k6/browser` instead of `k6/experimental/browser`. The previous `k6/experimental/browser` module will be removed on September 23rd, 2024. Please see [the migration guide](https://grafana.com/docs/k6/latest/using-k6-browser/migrating-to-k6-v0-52/) for more information on how to update your scripts. From 2ee3aa1a6a273993677f07093074ab5cf4d7094a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 19 Jun 2024 11:10:52 +0300 Subject: [PATCH 06/21] Remove the duplicate browser#1301 link --- release notes/v0.52.0.md | 1 - 1 file changed, 1 deletion(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index d3c17cb2c6c..f526a769c49 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -68,7 +68,6 @@ _Format as ` . `_: - [browser#1334](https://github.com/grafana/xk6-browser/pull/1334) Fixes an issue where clicking on a link that opens a new tab never navigates to the href link. - [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) Fixes the `Mouse.move` to correctly dispatch a `down` event. - [browser#1301](https://github.com/grafana/xk6-browser/pull/1301) Fixes an error that occurs when working with a second tab and navigating to a URL. -- [browser#1301](https://github.com/grafana/xk6-browser/pull/1301) Fixes an error that occurs when working with a second tab and navigating to a URL. ## Maintenance and internal improvements From 9141ba23591befa5eeb72b66870908611518a681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 19 Jun 2024 11:14:53 +0300 Subject: [PATCH 07/21] Move browser panic-to-err PRs into breaking changes --- release notes/v0.52.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index f526a769c49..92aad354852 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -7,6 +7,7 @@ k6 `v0.52.0` is here πŸŽ‰! This release includes: ## Breaking changes - [`#3777`](https://github.com/grafana/k6/pull/3777) removes panic handling in k6. Previously, k6 tried to recover and continue execution. Unfortunately, this isn't always successful and could lead to unexpected behavior. Now, k6 will always exit on panic. Panic itself should be fixed separately. +- [browser#1360](https://github.com/grafana/xk6-browser/pull/1360), [browser#1327](https://github.com/grafana/xk6-browser/pull/1327), [browser#1335](https://github.com/grafana/xk6-browser/pull/1335), [browser#1365](https://github.com/grafana/xk6-browser/pull/1365), [browser#1313](https://github.com/grafana/xk6-browser/pull/1313), [browser#1322](https://github.com/grafana/xk6-browser/pull/1322), [browser#1330](https://github.com/grafana/xk6-browser/pull/1330), [browser#1343](https://github.com/grafana/xk6-browser/pull/1343), [browser#1345](https://github.com/grafana/xk6-browser/pull/1345), [browser#1352](https://github.com/grafana/xk6-browser/pull/1352) Turns the `Browser`, `BrowserContext`, `ElementHandle`, `JSHandle`, `Keyboard`, `Mouse`, `Locator`, and `Page` types' panics into errors for stability and better error handling. - [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) The `up` and `down` methods no longer take x and y coordinates. Instead, they dispatch events on the current mouse position. - `#pr`, `` @@ -78,7 +79,6 @@ _Format as ` . `_: - [browser#1321](https://github.com/grafana/xk6-browser/pull/1321) Adds test helpers for async VU execution to reduce the boilerplate in the tests. - [browser#1357](https://github.com/grafana/xk6-browser/pull/1357) Updates `Group` and `Tag` usage for the latest k6. - [browser#1361](https://github.com/grafana/xk6-browser/pull/1361) Precalculates the browser version information to prevent I/O calls when the `version` and `userAgent` methods are called. This change allows the browser module to expose these methods as a sync API to be consistent with the Playwright's API. -- [browser#1360](https://github.com/grafana/xk6-browser/pull/1360), [browser#1327](https://github.com/grafana/xk6-browser/pull/1327), [browser#1335](https://github.com/grafana/xk6-browser/pull/1335), [browser#1365](https://github.com/grafana/xk6-browser/pull/1365), [browser#1313](https://github.com/grafana/xk6-browser/pull/1313), [browser#1322](https://github.com/grafana/xk6-browser/pull/1322), [browser#1330](https://github.com/grafana/xk6-browser/pull/1330), [browser#1343](https://github.com/grafana/xk6-browser/pull/1343), [browser#1345](https://github.com/grafana/xk6-browser/pull/1345), [browser#1352](https://github.com/grafana/xk6-browser/pull/1352) Turns the `Browser`, `BrowserContext`, `ElementHandle`, `JSHandle`, `Keyboard`, `Mouse`, `Locator`, and `Page` classes' panics into errors for stability and better error handling. - [browser#1377](https://github.com/grafana/xk6-browser/pull/1377) Uses the Goja fork called Sobek in the browser module. - [browser#1373](https://github.com/grafana/xk6-browser/pull/1373) Provides sync and async APIs within the browser module for making the migration to the async API easier. From 2526604f88045c3e5e3717a2b6a1e171abae6414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 19 Jun 2024 11:31:01 +0300 Subject: [PATCH 08/21] Add browser#1387 to release notes --- release notes/v0.52.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index 92aad354852..d42d3d16487 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -69,6 +69,7 @@ _Format as ` . `_: - [browser#1334](https://github.com/grafana/xk6-browser/pull/1334) Fixes an issue where clicking on a link that opens a new tab never navigates to the href link. - [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) Fixes the `Mouse.move` to correctly dispatch a `down` event. - [browser#1301](https://github.com/grafana/xk6-browser/pull/1301) Fixes an error that occurs when working with a second tab and navigating to a URL. +- [browser#1387](https://github.com/grafana/xk6-browser/pull/1387) Fixes an NPE when the new document or request is missing. ## Maintenance and internal improvements From 30e095e0259b73d956cbe876681822c9d53ac64c Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Wed, 19 Jun 2024 10:50:12 +0200 Subject: [PATCH 09/21] Use OpenTelemetry output docs page --- release notes/v0.52.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index d42d3d16487..96aa7933c98 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -87,6 +87,6 @@ _Format as ` . `_: ### OpenTelemetry metrics output -We're also happy to share that this release cycle, we've been working on [xk6-output-opentelemetry](https://github.com/grafana/xk6-output-opentelemetry/), a k6 output extension that allows you to send k6 metrics to OpenTelemetry-compatible backends. We're looking for feedback from the community. If you're interested, please try it and let us know [via the extension repository](https://github.com/grafana/xk6-output-opentelemetry/issues)! +We're also happy to share that this release cycle, we've been working on [xk6-output-opentelemetry](https://grafana.com/docs/k6/latest/results-output/real-time/opentelemetry/), a k6 output extension that allows you to send k6 metrics to OpenTelemetry-compatible backends. We're looking for feedback from the community. If you're interested, please try it and let us know [via the extension repository](https://github.com/grafana/xk6-output-opentelemetry/issues)! Depending on the feedback, we plan to include this extension as an experimental output in the next K6 release. From 043924234830e776d594f6688a46d3354b35a7ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 19 Jun 2024 13:20:09 +0300 Subject: [PATCH 10/21] Move some browser PRs to internal changes --- release notes/v0.52.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index 96aa7933c98..4b408346ab1 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -7,7 +7,6 @@ k6 `v0.52.0` is here πŸŽ‰! This release includes: ## Breaking changes - [`#3777`](https://github.com/grafana/k6/pull/3777) removes panic handling in k6. Previously, k6 tried to recover and continue execution. Unfortunately, this isn't always successful and could lead to unexpected behavior. Now, k6 will always exit on panic. Panic itself should be fixed separately. -- [browser#1360](https://github.com/grafana/xk6-browser/pull/1360), [browser#1327](https://github.com/grafana/xk6-browser/pull/1327), [browser#1335](https://github.com/grafana/xk6-browser/pull/1335), [browser#1365](https://github.com/grafana/xk6-browser/pull/1365), [browser#1313](https://github.com/grafana/xk6-browser/pull/1313), [browser#1322](https://github.com/grafana/xk6-browser/pull/1322), [browser#1330](https://github.com/grafana/xk6-browser/pull/1330), [browser#1343](https://github.com/grafana/xk6-browser/pull/1343), [browser#1345](https://github.com/grafana/xk6-browser/pull/1345), [browser#1352](https://github.com/grafana/xk6-browser/pull/1352) Turns the `Browser`, `BrowserContext`, `ElementHandle`, `JSHandle`, `Keyboard`, `Mouse`, `Locator`, and `Page` types' panics into errors for stability and better error handling. - [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) The `up` and `down` methods no longer take x and y coordinates. Instead, they dispatch events on the current mouse position. - `#pr`, `` @@ -56,6 +55,7 @@ _Format as ` . `_: - [browser#1371](https://github.com/grafana/xk6-browser/issues/1371) The `TextContent` methods now return `false` when the element's text content cannot be grabbed (like a JS `document`), making it easier to check for the presence of text content. - [browser#1376](https://github.com/grafana/xk6-browser/pull/1376) Makes `Request.headerValue` and `Response.headerValue` to be case insensitive. - [browser#1368](https://github.com/grafana/xk6-browser/pull/1368) Enhances `await` usage in Javascript examples. +- [browser#1360](https://github.com/grafana/xk6-browser/pull/1360), [browser#1327](https://github.com/grafana/xk6-browser/pull/1327), [browser#1335](https://github.com/grafana/xk6-browser/pull/1335), [browser#1365](https://github.com/grafana/xk6-browser/pull/1365), [browser#1313](https://github.com/grafana/xk6-browser/pull/1313), [browser#1322](https://github.com/grafana/xk6-browser/pull/1322), [browser#1330](https://github.com/grafana/xk6-browser/pull/1330), [browser#1343](https://github.com/grafana/xk6-browser/pull/1343), [browser#1345](https://github.com/grafana/xk6-browser/pull/1345), [browser#1352](https://github.com/grafana/xk6-browser/pull/1352) Turns the `Browser`, `BrowserContext`, `ElementHandle`, `JSHandle`, `Keyboard`, `Mouse`, `Locator`, and `Page` types' panics into errors for stability and better error handling. ## Bug fixes From de66280ed3a686b231f78f2190a8b1e56934abc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 19 Jun 2024 13:33:00 +0300 Subject: [PATCH 11/21] Remove browser async prepare PRs --- release notes/v0.52.0.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index 4b408346ab1..c31af36db50 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -35,11 +35,11 @@ This release introduces a fully Async API for the `k6/browser` module. This mean Related Changes: - [browser#1310](https://github.com/grafana/xk6-browser/pull/1310), [browser#1311](https://github.com/grafana/xk6-browser/pull/1311), [browser#1312](https://github.com/grafana/xk6-browser/pull/1312), [browser#1316](https://github.com/grafana/xk6-browser/pull/1316) Migrate `Browser` APIs to async. -- [browser#1326](https://github.com/grafana/xk6-browser/pull/1326), [browser#1327](https://github.com/grafana/xk6-browser/pull/1327), [browser#1328](https://github.com/grafana/xk6-browser/pull/1328) Migrate `BrowserContext` APIs to async. -- [browser#1335](https://github.com/grafana/xk6-browser/pull/1335), [browser#1337](https://github.com/grafana/xk6-browser/pull/1337) Migrate `ElementHandle` APIs to async. +- [browser#1326](https://github.com/grafana/xk6-browser/pull/1326), [browser#1328](https://github.com/grafana/xk6-browser/pull/1328) Migrate `BrowserContext` APIs to async. +- [browser#1337](https://github.com/grafana/xk6-browser/pull/1337) Migrate `ElementHandle` APIs to async. - [browser#1367](https://github.com/grafana/xk6-browser/pull/1367) Migrate `Frame` APIs to async. -- [browser#1365](https://github.com/grafana/xk6-browser/pull/1365), [browser#1366](https://github.com/grafana/xk6-browser/pull/1366) Migrate `JSHandle` APIs to async. -- [browser#1313](https://github.com/grafana/xk6-browser/pull/1313), [browser#1314](https://github.com/grafana/xk6-browser/pull/1314) Migrate `Keyboard` APIs to async. +- [browser#1366](https://github.com/grafana/xk6-browser/pull/1366) Migrate `JSHandle` APIs to async. +- [browser#1314](https://github.com/grafana/xk6-browser/pull/1314) Migrate `Keyboard` APIs to async. - [browser#1330](https://github.com/grafana/xk6-browser/pull/1330), [browser#1332](https://github.com/grafana/xk6-browser/pull/1332) Migrate `Locator` APIs to async. - [browser#1322](https://github.com/grafana/xk6-browser/pull/1322), [browser#1323](https://github.com/grafana/xk6-browser/pull/1323) Migrate `Mouse` APIs to async. - [browser#1343](https://github.com/grafana/xk6-browser/pull/1343), [browser#1345](https://github.com/grafana/xk6-browser/pull/1345), [browser#1352](https://github.com/grafana/xk6-browser/pull/1352), [browser#1355](https://github.com/grafana/xk6-browser/pull/1355) Migrate `Page` APIs to async. From da1f33857b6dc83dadbf08766ac37bd38d2a5c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 19 Jun 2024 13:39:20 +0300 Subject: [PATCH 12/21] Rearrange browser PRs --- release notes/v0.52.0.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index c31af36db50..222bcc0684f 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -35,15 +35,15 @@ This release introduces a fully Async API for the `k6/browser` module. This mean Related Changes: - [browser#1310](https://github.com/grafana/xk6-browser/pull/1310), [browser#1311](https://github.com/grafana/xk6-browser/pull/1311), [browser#1312](https://github.com/grafana/xk6-browser/pull/1312), [browser#1316](https://github.com/grafana/xk6-browser/pull/1316) Migrate `Browser` APIs to async. -- [browser#1326](https://github.com/grafana/xk6-browser/pull/1326), [browser#1328](https://github.com/grafana/xk6-browser/pull/1328) Migrate `BrowserContext` APIs to async. +- [browser#1328](https://github.com/grafana/xk6-browser/pull/1328) Migrate `BrowserContext` APIs to async. - [browser#1337](https://github.com/grafana/xk6-browser/pull/1337) Migrate `ElementHandle` APIs to async. - [browser#1367](https://github.com/grafana/xk6-browser/pull/1367) Migrate `Frame` APIs to async. - [browser#1366](https://github.com/grafana/xk6-browser/pull/1366) Migrate `JSHandle` APIs to async. - [browser#1314](https://github.com/grafana/xk6-browser/pull/1314) Migrate `Keyboard` APIs to async. -- [browser#1330](https://github.com/grafana/xk6-browser/pull/1330), [browser#1332](https://github.com/grafana/xk6-browser/pull/1332) Migrate `Locator` APIs to async. -- [browser#1322](https://github.com/grafana/xk6-browser/pull/1322), [browser#1323](https://github.com/grafana/xk6-browser/pull/1323) Migrate `Mouse` APIs to async. -- [browser#1343](https://github.com/grafana/xk6-browser/pull/1343), [browser#1345](https://github.com/grafana/xk6-browser/pull/1345), [browser#1352](https://github.com/grafana/xk6-browser/pull/1352), [browser#1355](https://github.com/grafana/xk6-browser/pull/1355) Migrate `Page` APIs to async. -- [browser#1348](https://github.com/grafana/xk6-browser/pull/1348), [browser#1349](https://github.com/grafana/xk6-browser/pull/1349), [browser#1354](https://github.com/grafana/xk6-browser/pull/1354), [browser#1358](https://github.com/grafana/xk6-browser/pull/1358), [browser#1363](https://github.com/grafana/xk6-browser/pull/1363) Migrate `Request` APIs to async. +- [browser#1332](https://github.com/grafana/xk6-browser/pull/1332) Migrate `Locator` APIs to async. +- [browser#1323](https://github.com/grafana/xk6-browser/pull/1323) Migrate `Mouse` APIs to async. +- [browser#1355](https://github.com/grafana/xk6-browser/pull/1355) Migrate `Page` APIs to async. +- [browser#1348](https://github.com/grafana/xk6-browser/pull/1348) Migrate `Request` APIs to async. - [browser#1364](https://github.com/grafana/xk6-browser/pull/1364) Migrate `Response` APIs to async. ## UX improvements and enhancements @@ -55,6 +55,7 @@ _Format as ` . `_: - [browser#1371](https://github.com/grafana/xk6-browser/issues/1371) The `TextContent` methods now return `false` when the element's text content cannot be grabbed (like a JS `document`), making it easier to check for the presence of text content. - [browser#1376](https://github.com/grafana/xk6-browser/pull/1376) Makes `Request.headerValue` and `Response.headerValue` to be case insensitive. - [browser#1368](https://github.com/grafana/xk6-browser/pull/1368) Enhances `await` usage in Javascript examples. +- [browser#1326](https://github.com/grafana/xk6-browser/pull/1326) Adds forgotten `BrowserContext.browser` and `Page.context` mappings. - [browser#1360](https://github.com/grafana/xk6-browser/pull/1360), [browser#1327](https://github.com/grafana/xk6-browser/pull/1327), [browser#1335](https://github.com/grafana/xk6-browser/pull/1335), [browser#1365](https://github.com/grafana/xk6-browser/pull/1365), [browser#1313](https://github.com/grafana/xk6-browser/pull/1313), [browser#1322](https://github.com/grafana/xk6-browser/pull/1322), [browser#1330](https://github.com/grafana/xk6-browser/pull/1330), [browser#1343](https://github.com/grafana/xk6-browser/pull/1343), [browser#1345](https://github.com/grafana/xk6-browser/pull/1345), [browser#1352](https://github.com/grafana/xk6-browser/pull/1352) Turns the `Browser`, `BrowserContext`, `ElementHandle`, `JSHandle`, `Keyboard`, `Mouse`, `Locator`, and `Page` types' panics into errors for stability and better error handling. ## Bug fixes @@ -66,6 +67,7 @@ _Format as ` . `_: - [browser#1386](https://github.com/grafana/xk6-browser/pull/1386) Correctly handles empty string flags that don't have a value. - [browser#1380](https://github.com/grafana/xk6-browser/pull/1380) Ensures that `JSHandle.evaluate` and `JSHandle.evaluateHandle` both set themselves as the first argument. - [browser#1346](https://github.com/grafana/xk6-browser/pull/1346) Fixes an IFrame panic ("we either navigate top level or have old version of the navigated frame") that happens during navigation. +- [browser#1349](https://github.com/grafana/xk6-browser/pull/1349), [browser#1354](https://github.com/grafana/xk6-browser/pull/1354) Fixes `Request` mappings. - [browser#1334](https://github.com/grafana/xk6-browser/pull/1334) Fixes an issue where clicking on a link that opens a new tab never navigates to the href link. - [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) Fixes the `Mouse.move` to correctly dispatch a `down` event. - [browser#1301](https://github.com/grafana/xk6-browser/pull/1301) Fixes an error that occurs when working with a second tab and navigating to a URL. From 457a1e0b77f20e4a93394e5264d74d305031b798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= Date: Thu, 20 Jun 2024 10:18:45 +0200 Subject: [PATCH 13/21] Add some k6-core changes to release notes --- release notes/v0.52.0.md | 90 ++++++++++++++++++++++++++++++++-------- 1 file changed, 72 insertions(+), 18 deletions(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index 222bcc0684f..e1d78cca16e 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -1,29 +1,80 @@ -k6 `v0.52.0` is here πŸŽ‰! This release includes: - -- (_optional_) `` -- `` (_one or multiple bullets_) +k6 `v0.52.0` is here πŸŽ‰! Some special mentions included in this release: +- [We switched from `goja` to our own fork named `sobek`](#switch-goja-to-our-own-fork-named-sobek-3775) +- [Panics are no longer being captured](#panics-are-no-longer-being-captured-3777) +- [The `web-dashboard` built-in output becomes `dashboard`](#the-web-dashboard-built-in-output-becomes-dashboard-xk6-dashboard163) ## Breaking changes -- [`#3777`](https://github.com/grafana/k6/pull/3777) removes panic handling in k6. Previously, k6 tried to recover and continue execution. Unfortunately, this isn't always successful and could lead to unexpected behavior. Now, k6 will always exit on panic. Panic itself should be fixed separately. -- [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) The `up` and `down` methods no longer take x and y coordinates. Instead, they dispatch events on the current mouse position. +### Switch `goja` to our own fork named `sobek` [#3775](https://github.com/grafana/k6/pull/3775) -- `#pr`, `` +In order to accelerate the development speed and unblock the support for [Native ESM](https://github.com/grafana/k6/issues/3265), +we have decided to create a fork of the [`goja`](https://github.com/dop251/goja/) project under the Grafana GitHub organization, +named [`sobek`](https://github.com/grafana/sobek). -### (_optional h3_) `` `#pr` +So, since this release, k6 (and its extensions) starts using `sobek` instead of the original `goja`, for all (of the +publicly exposed parts of the API) except for a couple of packages that are only used internally by k6. -## New features +Find further details in [#3772](https://github.com/grafana/k6/issues/3772) and [#3773](https://github.com/grafana/k6/issues/3773). + +### Panics are no longer being captured [#3777](https://github.com/grafana/k6/pull/3777) + +Since this release, Go panics are no longer being captured by k6. This means that if a panic occurs while running a test, +the k6 process will crash, and the panic stack trace will be printed to the console. + +We decided to change this behavior because it's something that was left from the past, as a safeguard, but it's not as +good as it might seem, as for most cases with multiple goroutines/async it is not enough, and also makes a bunch of potential +bugs seem like less of an issue. + +Thus, this will help us to identify and fix bugs more easily, to improve the overall stability of k6, and +most likely make the experience of developing k6 extensions friendlier. + +### `lib.State` no longer has `Group` [#3750](https://github.com/grafana/k6/pull/3750) + +As the result of refactoring the implementation of `group` and `check` methods, in order to decouple them, and thus +enable other future improvements, the `lib.State` object no longer has a `Group` field. + +This change should not affect most users, except for a couple of extensions, for which the use of `Group` was +already questionable: +- `xk6-fasthttp` +- `xk6-g0` + +### The `web-dashboard` built-in output becomes `dashboard` [xk6-dashboard#163](https://github.com/grafana/xk6-dashboard/pull/163) -_optional intro here_ +Since `v0.49.0`, k6 includes [xk6-dashboard](https://github.com/grafana/xk6-dashboard) as a built-in output extension. +The name of the built-in module is the same as was the output name (`web-dashboard`) registered by the extension. +Therefore, if you try to use it as an extension (for example, a newer version), you will get the following error: -### `` `#pr` +```sh +k6 run -o web-dashboard script.js -_what, why, and what this means for the user_ -### `` `#pr` -_what, why, and what this means for the user_ +ERRO[0000] invalid output extension web-dashboard, built-in output with the same type already exists +``` + +So, from now on, the registered name of the extension is again the one previously used: `dashboard`. +Thus, it is possible to use a version of the [xk6-dashboard](https://github.com/grafana/xk6-dashboard) that is newer than +the one integrated in k6. In this case, the `dashboard` name must be used as the output name. + +### Other breaking changes + +- [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) The `up` and `down` methods no longer take x and y coordinates. Instead, they dispatch events on the current mouse position. + +## New features + +### Experimental support for TypeScript and ES6+ using esbuild [#3738](https://github.com/grafana/k6/pull/3738) + +This release of k6 introduces experimental support for TypeScript and ES6+ using esbuild, thanks to a new +[compatibility mode](https://grafana.com/docs/k6/latest/using-k6/javascript-compatibility-mode/) named `experimental_enhanced`. + +```sh +k6 run --compatibility-mode=experimental_enhanced script.js +``` + +With this new compatibility mode, the test source code is transformed using esbuild instead of Babel, which also means +that source files with the extension _".ts"_ are loaded by esbuild's TypeScript loader, which results in partial +TypeScript support: it removes the type information, but does not provide type safety. ### `k6/browser` has graduated from an experimental module [#3793](https://github.com/grafana/k6/pull/3793) @@ -48,8 +99,7 @@ Related Changes: ## UX improvements and enhancements -_Format as ` . `_: - +- [#3740](https://github.com/grafana/k6/pull/3740) enables k6 extensions to initialize `ReadableStream` objects from Go code (`io.Reader`). - [#3798](https://github.com/grafana/k6/pull/3798) adjusts a severity level of a log message from `warn` to `debug` for cases when k6 can't detect the terminal's size. - [browser#1370](https://github.com/grafana/xk6-browser/issues/1370) The `GetAttribute` methods now return `false` when the attribute is missing, making it easier to check for the presence of an attribute. - [browser#1371](https://github.com/grafana/xk6-browser/issues/1371) The `TextContent` methods now return `false` when the element's text content cannot be grabbed (like a JS `document`), making it easier to check for the presence of text content. @@ -60,6 +110,7 @@ _Format as ` . `_: ## Bug fixes +- [#3774](https://github.com/grafana/k6/pull/3774) fixes a `require` warning for those tests using the stdin. - [#3776](https://github.com/grafana/k6/pull/3776) fixes a panic caused by passing an undefined handler to timers. - [#3779](https://github.com/grafana/k6/pull/3779) fixes a panic caused by registering an undefined handler in gRPC streams. - [xk6-websockets#73](https://github.com/grafana/xk6-websockets/pull/73) fixes a panic caused by registering an undefined handler in WebSockets. @@ -75,8 +126,11 @@ _Format as ` . `_: ## Maintenance and internal improvements -_Format as ` . `_: -- _`#2770` Refactors parts of the JS module._ +- [#3752](https://github.com/grafana/k6/pull/3752), [#3767](https://github.com/grafana/k6/pull/3767), [#3770](https://github.com/grafana/k6/pull/3770), [#3780](https://github.com/grafana/k6/pull/3780), [#3795](https://github.com/grafana/k6/pull/3795) updates several dependencies. +- [#3786](https://github.com/grafana/k6/pull/3786), [#3787](https://github.com/grafana/k6/pull/3787), [#3788](https://github.com/grafana/k6/pull/3788), [#3789](https://github.com/grafana/k6/pull/3789) updates experimental modules. +- [#3749](https://github.com/grafana/k6/pull/3749) stops printing `goja` stack traces on panics, which has been empty since a while. +- [#3760](https://github.com/grafana/k6/pull/3760) fixes race conditions in ramping-vus tests. +- [#3769](https://github.com/grafana/k6/pull/3769) removes a linter setting no longer used. - [browser#1298](https://github.com/grafana/xk6-browser/pull/1298) Splits browser mappings into separate files for better organization and maintainability. - [browser#1321](https://github.com/grafana/xk6-browser/pull/1321) Adds test helpers for async VU execution to reduce the boilerplate in the tests. From bb8c637af4b8c8dc0d196050aac3848ed3c90932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= Date: Thu, 20 Jun 2024 11:16:50 +0200 Subject: [PATCH 14/21] Update highlights --- release notes/v0.52.0.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index e1d78cca16e..0f4fa3b295b 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -3,6 +3,9 @@ k6 `v0.52.0` is here πŸŽ‰! Some special mentions included in this release: - [We switched from `goja` to our own fork named `sobek`](#switch-goja-to-our-own-fork-named-sobek-3775) - [Panics are no longer being captured](#panics-are-no-longer-being-captured-3777) - [The `web-dashboard` built-in output becomes `dashboard`](#the-web-dashboard-built-in-output-becomes-dashboard-xk6-dashboard163) +- [We've added experimental support for TypeScript and ES6+](#experimental-support-for-typescript-and-es6-using-esbuild-3738) +- [`k6/browser` has graduated from an experimental module](#k6browser-has-graduated-from-an-experimental-module-3793) +- [`k6/browser` has now a fully Async API](#k6browser-has-now-a-fully-async-api-browser428) ## Breaking changes @@ -101,6 +104,7 @@ Related Changes: - [#3740](https://github.com/grafana/k6/pull/3740) enables k6 extensions to initialize `ReadableStream` objects from Go code (`io.Reader`). - [#3798](https://github.com/grafana/k6/pull/3798) adjusts a severity level of a log message from `warn` to `debug` for cases when k6 can't detect the terminal's size. +- [#3797](https://github.com/grafana/k6/pull/3797) makes it possible to output the archive to stdout by using `-` as the `--archive-out`. - [browser#1370](https://github.com/grafana/xk6-browser/issues/1370) The `GetAttribute` methods now return `false` when the attribute is missing, making it easier to check for the presence of an attribute. - [browser#1371](https://github.com/grafana/xk6-browser/issues/1371) The `TextContent` methods now return `false` when the element's text content cannot be grabbed (like a JS `document`), making it easier to check for the presence of text content. - [browser#1376](https://github.com/grafana/xk6-browser/pull/1376) Makes `Request.headerValue` and `Response.headerValue` to be case insensitive. @@ -126,11 +130,12 @@ Related Changes: ## Maintenance and internal improvements -- [#3752](https://github.com/grafana/k6/pull/3752), [#3767](https://github.com/grafana/k6/pull/3767), [#3770](https://github.com/grafana/k6/pull/3770), [#3780](https://github.com/grafana/k6/pull/3780), [#3795](https://github.com/grafana/k6/pull/3795) updates several dependencies. -- [#3786](https://github.com/grafana/k6/pull/3786), [#3787](https://github.com/grafana/k6/pull/3787), [#3788](https://github.com/grafana/k6/pull/3788), [#3789](https://github.com/grafana/k6/pull/3789) updates experimental modules. +- [#3752](https://github.com/grafana/k6/pull/3752), [#3767](https://github.com/grafana/k6/pull/3767), [#3770](https://github.com/grafana/k6/pull/3770), [#3780](https://github.com/grafana/k6/pull/3780), [#3782](https://github.com/grafana/k6/pull/3782), [#3795](https://github.com/grafana/k6/pull/3795) updates several dependencies. +- [#3786](https://github.com/grafana/k6/pull/3786), [#3787](https://github.com/grafana/k6/pull/3787), [#3788](https://github.com/grafana/k6/pull/3788), [#3789](https://github.com/grafana/k6/pull/3789), [#3803](https://github.com/grafana/k6/pull/3803) updates experimental modules. - [#3749](https://github.com/grafana/k6/pull/3749) stops printing `goja` stack traces on panics, which has been empty since a while. - [#3760](https://github.com/grafana/k6/pull/3760) fixes race conditions in ramping-vus tests. - [#3769](https://github.com/grafana/k6/pull/3769) removes a linter setting no longer used. +- [#3800](https://github.com/grafana/k6/pull/3800) adds test coverage for outputting the archive to stdout. - [browser#1298](https://github.com/grafana/xk6-browser/pull/1298) Splits browser mappings into separate files for better organization and maintainability. - [browser#1321](https://github.com/grafana/xk6-browser/pull/1321) Adds test helpers for async VU execution to reduce the boilerplate in the tests. From a588a7420483204fcc6c3e810504ff15ebf2e37b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= <5459617+joanlopez@users.noreply.github.com> Date: Thu, 20 Jun 2024 11:19:55 +0200 Subject: [PATCH 15/21] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Δ°nanΓ§ GΓΌmüş --- release notes/v0.52.0.md | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index 0f4fa3b295b..4f22b1e70d6 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -62,7 +62,7 @@ the one integrated in k6. In this case, the `dashboard` name must be used as the ### Other breaking changes -- [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) The `up` and `down` methods no longer take x and y coordinates. Instead, they dispatch events on the current mouse position. +- [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) The `Mouse.up` and `Mouse.down` methods no longer take x and y coordinates. Instead, they dispatch events on the current mouse position. ## New features @@ -88,17 +88,7 @@ The browser module is now available as `k6/browser` instead of `k6/experimental/ This release introduces a fully Async API for the `k6/browser` module. This means that nearly all the methods in the module now return promises. This change is part of the ongoing effort to make the browser module more user-friendly and easier to use. Please see [the browser documentation](https://grafana.com/docs/k6/latest/javascript-api/k6-browser) for more information on how to use the new Async API. Related Changes: -- [browser#1310](https://github.com/grafana/xk6-browser/pull/1310), [browser#1311](https://github.com/grafana/xk6-browser/pull/1311), [browser#1312](https://github.com/grafana/xk6-browser/pull/1312), [browser#1316](https://github.com/grafana/xk6-browser/pull/1316) Migrate `Browser` APIs to async. -- [browser#1328](https://github.com/grafana/xk6-browser/pull/1328) Migrate `BrowserContext` APIs to async. -- [browser#1337](https://github.com/grafana/xk6-browser/pull/1337) Migrate `ElementHandle` APIs to async. -- [browser#1367](https://github.com/grafana/xk6-browser/pull/1367) Migrate `Frame` APIs to async. -- [browser#1366](https://github.com/grafana/xk6-browser/pull/1366) Migrate `JSHandle` APIs to async. -- [browser#1314](https://github.com/grafana/xk6-browser/pull/1314) Migrate `Keyboard` APIs to async. -- [browser#1332](https://github.com/grafana/xk6-browser/pull/1332) Migrate `Locator` APIs to async. -- [browser#1323](https://github.com/grafana/xk6-browser/pull/1323) Migrate `Mouse` APIs to async. -- [browser#1355](https://github.com/grafana/xk6-browser/pull/1355) Migrate `Page` APIs to async. -- [browser#1348](https://github.com/grafana/xk6-browser/pull/1348) Migrate `Request` APIs to async. -- [browser#1364](https://github.com/grafana/xk6-browser/pull/1364) Migrate `Response` APIs to async. +- [browser#1310](https://github.com/grafana/xk6-browser/pull/1310), [browser#1311](https://github.com/grafana/xk6-browser/pull/1311), [browser#1312](https://github.com/grafana/xk6-browser/pull/1312), [browser#1316](https://github.com/grafana/xk6-browser/pull/1316), [browser#1328](https://github.com/grafana/xk6-browser/pull/1328), [browser#1337](https://github.com/grafana/xk6-browser/pull/1337), [browser#1367](https://github.com/grafana/xk6-browser/pull/1367), [browser#1366](https://github.com/grafana/xk6-browser/pull/1366), [browser#1314](https://github.com/grafana/xk6-browser/pull/1314), [browser#1332](https://github.com/grafana/xk6-browser/pull/1332), [browser#1323](https://github.com/grafana/xk6-browser/pull/1323), [browser#1355](https://github.com/grafana/xk6-browser/pull/1355), [browser#1348](https://github.com/grafana/xk6-browser/pull/1348), [browser#1364](https://github.com/grafana/xk6-browser/pull/1364) Migrates `Browser`, `BrowserContext`, `ElementHandle`, `Frame`, `JSHandle`, `Keyboard`, `Locator`, `Mouse`, `Page`, `Request`, `Response` APIs to async. ## UX improvements and enhancements From 5f435647f29fa945596116485e9408b35a2e3f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= <5459617+joanlopez@users.noreply.github.com> Date: Thu, 20 Jun 2024 12:50:24 +0200 Subject: [PATCH 16/21] Apply suggestions from code review Co-authored-by: Oleg Bespalov --- release notes/v0.52.0.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index 4f22b1e70d6..afdafb99671 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -11,7 +11,7 @@ k6 `v0.52.0` is here πŸŽ‰! Some special mentions included in this release: ### Switch `goja` to our own fork named `sobek` [#3775](https://github.com/grafana/k6/pull/3775) -In order to accelerate the development speed and unblock the support for [Native ESM](https://github.com/grafana/k6/issues/3265), +To accelerate the development speed and bring [ECMAScript Modules (ESM)] support to k6 earlier (https://github.com/grafana/k6/issues/3265), we have decided to create a fork of the [`goja`](https://github.com/dop251/goja/) project under the Grafana GitHub organization, named [`sobek`](https://github.com/grafana/sobek). @@ -29,7 +29,7 @@ We decided to change this behavior because it's something that was left from the good as it might seem, as for most cases with multiple goroutines/async it is not enough, and also makes a bunch of potential bugs seem like less of an issue. -Thus, this will help us to identify and fix bugs more easily, to improve the overall stability of k6, and +Thus, this will help us to identify and fix bugs earlier, improve the overall stability of k6, and most likely make the experience of developing k6 extensions friendlier. ### `lib.State` no longer has `Group` [#3750](https://github.com/grafana/k6/pull/3750) @@ -51,8 +51,6 @@ Therefore, if you try to use it as an extension (for example, a newer version), ```sh k6 run -o web-dashboard script.js - - ERRO[0000] invalid output extension web-dashboard, built-in output with the same type already exists ``` @@ -116,7 +114,7 @@ Related Changes: - [browser#1334](https://github.com/grafana/xk6-browser/pull/1334) Fixes an issue where clicking on a link that opens a new tab never navigates to the href link. - [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) Fixes the `Mouse.move` to correctly dispatch a `down` event. - [browser#1301](https://github.com/grafana/xk6-browser/pull/1301) Fixes an error that occurs when working with a second tab and navigating to a URL. -- [browser#1387](https://github.com/grafana/xk6-browser/pull/1387) Fixes an NPE when the new document or request is missing. +- [browser#1387](https://github.com/grafana/xk6-browser/pull/1387) Fixes a panic when the new document or request is missing. ## Maintenance and internal improvements From 83c7e75e11bbe482a113451714be1d68ee3cf906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= <5459617+joanlopez@users.noreply.github.com> Date: Tue, 25 Jun 2024 10:26:10 +0200 Subject: [PATCH 17/21] Apply suggestions from code review Co-authored-by: Heitor Tashiro Sergent Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- release notes/v0.52.0.md | 74 ++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index afdafb99671..5573a7bb799 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -1,23 +1,24 @@ k6 `v0.52.0` is here πŸŽ‰! Some special mentions included in this release: -- [We switched from `goja` to our own fork named `sobek`](#switch-goja-to-our-own-fork-named-sobek-3775) -- [Panics are no longer being captured](#panics-are-no-longer-being-captured-3777) -- [The `web-dashboard` built-in output becomes `dashboard`](#the-web-dashboard-built-in-output-becomes-dashboard-xk6-dashboard163) -- [We've added experimental support for TypeScript and ES6+](#experimental-support-for-typescript-and-es6-using-esbuild-3738) -- [`k6/browser` has graduated from an experimental module](#k6browser-has-graduated-from-an-experimental-module-3793) -- [`k6/browser` has now a fully Async API](#k6browser-has-now-a-fully-async-api-browser428) +- [We've switched to our own fork of `goja` named `sobek`](#switch-goja-to-our-own-fork-named-sobek-3775). +- [Panics are no longer captured](#panics-are-no-longer-being-captured-3777). +- [The `web-dashboard` built-in output is now `dashboard`](#the-web-dashboard-built-in-output-becomes-dashboard-xk6-dashboard163). +- [We've added experimental support for TypeScript and ES6+](#experimental-support-for-typescript-and-es6-using-esbuild-3738). +- `k6/browser` has [graduated from an experimental module](#k6browser-has-graduated-from-an-experimental-module-3793), and now has a [fully Async API](#k6browser-has-now-a-fully-async-api-browser428). ## Breaking changes ### Switch `goja` to our own fork named `sobek` [#3775](https://github.com/grafana/k6/pull/3775) -To accelerate the development speed and bring [ECMAScript Modules (ESM)] support to k6 earlier (https://github.com/grafana/k6/issues/3265), +To accelerate the development speed and bring ECMAScript Modules (ESM) support to k6 earlier (https://github.com/grafana/k6/issues/3265), we have decided to create a fork of the [`goja`](https://github.com/dop251/goja/) project under the Grafana GitHub organization, named [`sobek`](https://github.com/grafana/sobek). -So, since this release, k6 (and its extensions) starts using `sobek` instead of the original `goja`, for all (of the +Starting on this release, k6 (and its extensions) now use `sobek` instead of the original `goja`, for all (of the publicly exposed parts of the API) except for a couple of packages that are only used internally by k6. +All k6 extensions linked in the docs have had a PR for this transition opened, as explained in this [comment](https://github.com/grafana/k6/issues/3773#issuecomment-2182113677). Any extension author who hasn't gotten a PR can follow the same steps. + Find further details in [#3772](https://github.com/grafana/k6/issues/3772) and [#3773](https://github.com/grafana/k6/issues/3773). ### Panics are no longer being captured [#3777](https://github.com/grafana/k6/pull/3777) @@ -25,8 +26,8 @@ Find further details in [#3772](https://github.com/grafana/k6/issues/3772) and [ Since this release, Go panics are no longer being captured by k6. This means that if a panic occurs while running a test, the k6 process will crash, and the panic stack trace will be printed to the console. -We decided to change this behavior because it's something that was left from the past, as a safeguard, but it's not as -good as it might seem, as for most cases with multiple goroutines/async it is not enough, and also makes a bunch of potential +We decided to change this behavior because it's something that was left from the past as a safeguard, but it's not as +good as it might seem. For most cases with multiple goroutines/async, it's not enough and also makes a bunch of potential bugs seem like less of an issue. Thus, this will help us to identify and fix bugs earlier, improve the overall stability of k6, and @@ -67,19 +68,19 @@ the one integrated in k6. In this case, the `dashboard` name must be used as the ### Experimental support for TypeScript and ES6+ using esbuild [#3738](https://github.com/grafana/k6/pull/3738) This release of k6 introduces experimental support for TypeScript and ES6+ using esbuild, thanks to a new -[compatibility mode](https://grafana.com/docs/k6/latest/using-k6/javascript-compatibility-mode/) named `experimental_enhanced`. +[compatibility mode](https://grafana.com/docs/k6/latest/using-k6/javascript-typescript-compatibility-mode/) named `experimental_enhanced`. ```sh k6 run --compatibility-mode=experimental_enhanced script.js ``` With this new compatibility mode, the test source code is transformed using esbuild instead of Babel, which also means -that source files with the extension _".ts"_ are loaded by esbuild's TypeScript loader, which results in partial -TypeScript support: it removes the type information, but does not provide type safety. +that source files with the extension _".ts"_ are loaded by esbuild's TypeScript loader, which results in partial +TypeScript support: it removes the type information but doesn't provide type safety. ### `k6/browser` has graduated from an experimental module [#3793](https://github.com/grafana/k6/pull/3793) -The browser module is now available as `k6/browser` instead of `k6/experimental/browser`. The previous `k6/experimental/browser` module will be removed on September 23rd, 2024. Please see [the migration guide](https://grafana.com/docs/k6/latest/using-k6-browser/migrating-to-k6-v0-52/) for more information on how to update your scripts. +The browser module is now available as `k6/browser` instead of `k6/experimental/browser`. The previous `k6/experimental/browser` module will be removed on September 23rd, 2024. Refer to [the migration guide](https://grafana.com/docs/k6/latest/using-k6-browser/migrating-to-k6-v0-52/) for more information on how to update your scripts. ### `k6/browser` has now a fully Async API [browser#428](https://github.com/grafana/xk6-browser/issues/428) @@ -93,12 +94,12 @@ Related Changes: - [#3740](https://github.com/grafana/k6/pull/3740) enables k6 extensions to initialize `ReadableStream` objects from Go code (`io.Reader`). - [#3798](https://github.com/grafana/k6/pull/3798) adjusts a severity level of a log message from `warn` to `debug` for cases when k6 can't detect the terminal's size. - [#3797](https://github.com/grafana/k6/pull/3797) makes it possible to output the archive to stdout by using `-` as the `--archive-out`. -- [browser#1370](https://github.com/grafana/xk6-browser/issues/1370) The `GetAttribute` methods now return `false` when the attribute is missing, making it easier to check for the presence of an attribute. -- [browser#1371](https://github.com/grafana/xk6-browser/issues/1371) The `TextContent` methods now return `false` when the element's text content cannot be grabbed (like a JS `document`), making it easier to check for the presence of text content. -- [browser#1376](https://github.com/grafana/xk6-browser/pull/1376) Makes `Request.headerValue` and `Response.headerValue` to be case insensitive. -- [browser#1368](https://github.com/grafana/xk6-browser/pull/1368) Enhances `await` usage in Javascript examples. -- [browser#1326](https://github.com/grafana/xk6-browser/pull/1326) Adds forgotten `BrowserContext.browser` and `Page.context` mappings. -- [browser#1360](https://github.com/grafana/xk6-browser/pull/1360), [browser#1327](https://github.com/grafana/xk6-browser/pull/1327), [browser#1335](https://github.com/grafana/xk6-browser/pull/1335), [browser#1365](https://github.com/grafana/xk6-browser/pull/1365), [browser#1313](https://github.com/grafana/xk6-browser/pull/1313), [browser#1322](https://github.com/grafana/xk6-browser/pull/1322), [browser#1330](https://github.com/grafana/xk6-browser/pull/1330), [browser#1343](https://github.com/grafana/xk6-browser/pull/1343), [browser#1345](https://github.com/grafana/xk6-browser/pull/1345), [browser#1352](https://github.com/grafana/xk6-browser/pull/1352) Turns the `Browser`, `BrowserContext`, `ElementHandle`, `JSHandle`, `Keyboard`, `Mouse`, `Locator`, and `Page` types' panics into errors for stability and better error handling. +- [browser#1370](https://github.com/grafana/xk6-browser/issues/1370) the `GetAttribute` methods now return `false` when the attribute is missing, making it easier to check for the presence of an attribute. +- [browser#1371](https://github.com/grafana/xk6-browser/issues/1371) the `TextContent` methods now return `false` when the element's text content cannot be grabbed (like a JS `document`), making it easier to check for the presence of text content. +- [browser#1376](https://github.com/grafana/xk6-browser/pull/1376) makes `Request.headerValue` and `Response.headerValue` to be case insensitive. +- [browser#1368](https://github.com/grafana/xk6-browser/pull/1368) enhances `await` usage in Javascript examples. +- [browser#1326](https://github.com/grafana/xk6-browser/pull/1326) adds forgotten `BrowserContext.browser` and `Page.context` mappings. +- [browser#1360](https://github.com/grafana/xk6-browser/pull/1360), [browser#1327](https://github.com/grafana/xk6-browser/pull/1327), [browser#1335](https://github.com/grafana/xk6-browser/pull/1335), [browser#1365](https://github.com/grafana/xk6-browser/pull/1365), [browser#1313](https://github.com/grafana/xk6-browser/pull/1313), [browser#1322](https://github.com/grafana/xk6-browser/pull/1322), [browser#1330](https://github.com/grafana/xk6-browser/pull/1330), [browser#1343](https://github.com/grafana/xk6-browser/pull/1343), [browser#1345](https://github.com/grafana/xk6-browser/pull/1345), [browser#1352](https://github.com/grafana/xk6-browser/pull/1352) turns the `Browser`, `BrowserContext`, `ElementHandle`, `JSHandle`, `Keyboard`, `Mouse`, `Locator`, and `Page` types' panics into errors for stability and better error handling. ## Bug fixes @@ -106,15 +107,15 @@ Related Changes: - [#3776](https://github.com/grafana/k6/pull/3776) fixes a panic caused by passing an undefined handler to timers. - [#3779](https://github.com/grafana/k6/pull/3779) fixes a panic caused by registering an undefined handler in gRPC streams. - [xk6-websockets#73](https://github.com/grafana/xk6-websockets/pull/73) fixes a panic caused by registering an undefined handler in WebSockets. -- [browser#1369](https://github.com/grafana/xk6-browser/pull/1369) Improves `valueFromRemoteObject` `null` detection by returning a Go `nil` instead of `"null"` as a `string`. -- [browser#1386](https://github.com/grafana/xk6-browser/pull/1386) Correctly handles empty string flags that don't have a value. -- [browser#1380](https://github.com/grafana/xk6-browser/pull/1380) Ensures that `JSHandle.evaluate` and `JSHandle.evaluateHandle` both set themselves as the first argument. -- [browser#1346](https://github.com/grafana/xk6-browser/pull/1346) Fixes an IFrame panic ("we either navigate top level or have old version of the navigated frame") that happens during navigation. -- [browser#1349](https://github.com/grafana/xk6-browser/pull/1349), [browser#1354](https://github.com/grafana/xk6-browser/pull/1354) Fixes `Request` mappings. -- [browser#1334](https://github.com/grafana/xk6-browser/pull/1334) Fixes an issue where clicking on a link that opens a new tab never navigates to the href link. -- [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) Fixes the `Mouse.move` to correctly dispatch a `down` event. -- [browser#1301](https://github.com/grafana/xk6-browser/pull/1301) Fixes an error that occurs when working with a second tab and navigating to a URL. -- [browser#1387](https://github.com/grafana/xk6-browser/pull/1387) Fixes a panic when the new document or request is missing. +- [browser#1369](https://github.com/grafana/xk6-browser/pull/1369) improves `valueFromRemoteObject` `null` detection by returning a Go `nil` instead of `"null"` as a `string`. +- [browser#1386](https://github.com/grafana/xk6-browser/pull/1386) correctly handles empty string flags that don't have a value. +- [browser#1380](https://github.com/grafana/xk6-browser/pull/1380) ensures that `JSHandle.evaluate` and `JSHandle.evaluateHandle` both set themselves as the first argument. +- [browser#1346](https://github.com/grafana/xk6-browser/pull/1346) fixes an IFrame panic ("we either navigate top level or have old version of the navigated frame") that happens during navigation. +- [browser#1349](https://github.com/grafana/xk6-browser/pull/1349), [browser#1354](https://github.com/grafana/xk6-browser/pull/1354) fixes `Request` mappings. +- [browser#1334](https://github.com/grafana/xk6-browser/pull/1334) fixes an issue where clicking on a link that opens a new tab never navigates to the href link. +- [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) fixes the `Mouse.move` to correctly dispatch a `down` event. +- [browser#1301](https://github.com/grafana/xk6-browser/pull/1301) fixes an error that occurs when working with a second tab and navigating to a URL. +- [browser#1387](https://github.com/grafana/xk6-browser/pull/1387) fixes a panic when the new document or request is missing. ## Maintenance and internal improvements @@ -124,13 +125,12 @@ Related Changes: - [#3760](https://github.com/grafana/k6/pull/3760) fixes race conditions in ramping-vus tests. - [#3769](https://github.com/grafana/k6/pull/3769) removes a linter setting no longer used. - [#3800](https://github.com/grafana/k6/pull/3800) adds test coverage for outputting the archive to stdout. - -- [browser#1298](https://github.com/grafana/xk6-browser/pull/1298) Splits browser mappings into separate files for better organization and maintainability. -- [browser#1321](https://github.com/grafana/xk6-browser/pull/1321) Adds test helpers for async VU execution to reduce the boilerplate in the tests. -- [browser#1357](https://github.com/grafana/xk6-browser/pull/1357) Updates `Group` and `Tag` usage for the latest k6. -- [browser#1361](https://github.com/grafana/xk6-browser/pull/1361) Precalculates the browser version information to prevent I/O calls when the `version` and `userAgent` methods are called. This change allows the browser module to expose these methods as a sync API to be consistent with the Playwright's API. -- [browser#1377](https://github.com/grafana/xk6-browser/pull/1377) Uses the Goja fork called Sobek in the browser module. -- [browser#1373](https://github.com/grafana/xk6-browser/pull/1373) Provides sync and async APIs within the browser module for making the migration to the async API easier. +- [browser#1298](https://github.com/grafana/xk6-browser/pull/1298) splits browser mappings into separate files for better organization and maintainability. +- [browser#1321](https://github.com/grafana/xk6-browser/pull/1321) adds test helpers for async VU execution to reduce the boilerplate in the tests. +- [browser#1357](https://github.com/grafana/xk6-browser/pull/1357) updates `Group` and `Tag` usage for the latest k6. +- [browser#1361](https://github.com/grafana/xk6-browser/pull/1361) precalculates the browser version information to prevent I/O calls when the `version` and `userAgent` methods are called. This change allows the browser module to expose these methods as a sync API to be consistent with the Playwright's API. +- [browser#1377](https://github.com/grafana/xk6-browser/pull/1377) uses the Goja fork called Sobek in the browser module. +- [browser#1373](https://github.com/grafana/xk6-browser/pull/1373) provides sync and async APIs within the browser module for making the migration to the async API easier. ## Roadmap @@ -138,4 +138,4 @@ Related Changes: We're also happy to share that this release cycle, we've been working on [xk6-output-opentelemetry](https://grafana.com/docs/k6/latest/results-output/real-time/opentelemetry/), a k6 output extension that allows you to send k6 metrics to OpenTelemetry-compatible backends. We're looking for feedback from the community. If you're interested, please try it and let us know [via the extension repository](https://github.com/grafana/xk6-output-opentelemetry/issues)! -Depending on the feedback, we plan to include this extension as an experimental output in the next K6 release. +Depending on the feedback, we plan to include this extension as an experimental output in the next k6 release. From 48fafb376375bb580c26375067f36892db84097e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= <5459617+joanlopez@users.noreply.github.com> Date: Tue, 25 Jun 2024 10:30:35 +0200 Subject: [PATCH 18/21] Apply suggestions from code review Co-authored-by: Mihail Stoykov <312246+mstoykov@users.noreply.github.com> --- release notes/v0.52.0.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index 5573a7bb799..02e48fc650f 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -133,6 +133,13 @@ Related Changes: - [browser#1373](https://github.com/grafana/xk6-browser/pull/1373) provides sync and async APIs within the browser module for making the migration to the async API easier. ## Roadmap +### Native ECMAScript modules + +As mentioned above, the k6 team has forked goja into [sobek](https://github.com/grafana/sobek) and is currently working on [native ECMAScript modules support](https://github.com/grafana/k6/issues/3265). The current work in progress can be found in this [PR](https://github.com/grafana/k6/pull/3456) and any feedback is welcome. + +As part of that there likely will be some breaking changes due to the current not native support allowing stuff that shouldn't work. Like for example mixing [CommonJS](https://en.wikipedia.org/wiki/CommonJS) and ESM in the same file. Which is for example why we have added a [warning](https://github.com/grafana/k6/pull/3807) that it won't work. + +Support across multiple files is *also* not standard but due to amount of users that seems to be mixing them *across* files a lot of work has been done to support it. It is still likely that in the future warnings and potentially at some point future breaking changes will be enacted. ### OpenTelemetry metrics output From 8951438a247effa80398e0a2b5cae55b0986a659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= Date: Tue, 25 Jun 2024 10:33:03 +0200 Subject: [PATCH 19/21] Remove xk6-dashboard change not relevant --- release notes/v0.52.0.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index 02e48fc650f..dc12ec03c2d 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -2,7 +2,6 @@ k6 `v0.52.0` is here πŸŽ‰! Some special mentions included in this release: - [We've switched to our own fork of `goja` named `sobek`](#switch-goja-to-our-own-fork-named-sobek-3775). - [Panics are no longer captured](#panics-are-no-longer-being-captured-3777). -- [The `web-dashboard` built-in output is now `dashboard`](#the-web-dashboard-built-in-output-becomes-dashboard-xk6-dashboard163). - [We've added experimental support for TypeScript and ES6+](#experimental-support-for-typescript-and-es6-using-esbuild-3738). - `k6/browser` has [graduated from an experimental module](#k6browser-has-graduated-from-an-experimental-module-3793), and now has a [fully Async API](#k6browser-has-now-a-fully-async-api-browser428). @@ -43,22 +42,6 @@ already questionable: - `xk6-fasthttp` - `xk6-g0` -### The `web-dashboard` built-in output becomes `dashboard` [xk6-dashboard#163](https://github.com/grafana/xk6-dashboard/pull/163) - -Since `v0.49.0`, k6 includes [xk6-dashboard](https://github.com/grafana/xk6-dashboard) as a built-in output extension. -The name of the built-in module is the same as was the output name (`web-dashboard`) registered by the extension. -Therefore, if you try to use it as an extension (for example, a newer version), you will get the following error: - -```sh -k6 run -o web-dashboard script.js - -ERRO[0000] invalid output extension web-dashboard, built-in output with the same type already exists -``` - -So, from now on, the registered name of the extension is again the one previously used: `dashboard`. -Thus, it is possible to use a version of the [xk6-dashboard](https://github.com/grafana/xk6-dashboard) that is newer than -the one integrated in k6. In this case, the `dashboard` name must be used as the output name. - ### Other breaking changes - [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) The `Mouse.up` and `Mouse.down` methods no longer take x and y coordinates. Instead, they dispatch events on the current mouse position. From 4855349244f1372a6891ab803c38c61ad5a79cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= Date: Tue, 25 Jun 2024 10:41:17 +0200 Subject: [PATCH 20/21] Minor fixes --- release notes/v0.52.0.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index dc12ec03c2d..42a47b0044f 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -44,7 +44,8 @@ already questionable: ### Other breaking changes -- [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) The `Mouse.up` and `Mouse.down` methods no longer take x and y coordinates. Instead, they dispatch events on the current mouse position. +- [#3797](https://github.com/grafana/k6/pull/3797) starts using `-` as a special value for `--archive-out` to output the archive to stdout. +- [browser#1318](https://github.com/grafana/xk6-browser/pull/1318) makes the `Mouse.up` and `Mouse.down` methods no longer take x and y coordinates. Instead, they dispatch events on the current mouse position. ## New features @@ -77,9 +78,9 @@ Related Changes: - [#3740](https://github.com/grafana/k6/pull/3740) enables k6 extensions to initialize `ReadableStream` objects from Go code (`io.Reader`). - [#3798](https://github.com/grafana/k6/pull/3798) adjusts a severity level of a log message from `warn` to `debug` for cases when k6 can't detect the terminal's size. - [#3797](https://github.com/grafana/k6/pull/3797) makes it possible to output the archive to stdout by using `-` as the `--archive-out`. -- [browser#1370](https://github.com/grafana/xk6-browser/issues/1370) the `GetAttribute` methods now return `false` when the attribute is missing, making it easier to check for the presence of an attribute. -- [browser#1371](https://github.com/grafana/xk6-browser/issues/1371) the `TextContent` methods now return `false` when the element's text content cannot be grabbed (like a JS `document`), making it easier to check for the presence of text content. -- [browser#1376](https://github.com/grafana/xk6-browser/pull/1376) makes `Request.headerValue` and `Response.headerValue` to be case insensitive. +- [browser#1370](https://github.com/grafana/xk6-browser/issues/1370) makes the `GetAttribute` method now return `false` when the attribute is missing, making it easier to check for the presence of an attribute. +- [browser#1371](https://github.com/grafana/xk6-browser/issues/1371) makes the `TextContent` method now return `false` when the element's text content cannot be grabbed (like a JS `document`), making it easier to check for the presence of text content. +- [browser#1376](https://github.com/grafana/xk6-browser/pull/1376) makes `Request.headerValue` and `Response.headerValue` to be case-insensitive. - [browser#1368](https://github.com/grafana/xk6-browser/pull/1368) enhances `await` usage in Javascript examples. - [browser#1326](https://github.com/grafana/xk6-browser/pull/1326) adds forgotten `BrowserContext.browser` and `Page.context` mappings. - [browser#1360](https://github.com/grafana/xk6-browser/pull/1360), [browser#1327](https://github.com/grafana/xk6-browser/pull/1327), [browser#1335](https://github.com/grafana/xk6-browser/pull/1335), [browser#1365](https://github.com/grafana/xk6-browser/pull/1365), [browser#1313](https://github.com/grafana/xk6-browser/pull/1313), [browser#1322](https://github.com/grafana/xk6-browser/pull/1322), [browser#1330](https://github.com/grafana/xk6-browser/pull/1330), [browser#1343](https://github.com/grafana/xk6-browser/pull/1343), [browser#1345](https://github.com/grafana/xk6-browser/pull/1345), [browser#1352](https://github.com/grafana/xk6-browser/pull/1352) turns the `Browser`, `BrowserContext`, `ElementHandle`, `JSHandle`, `Keyboard`, `Mouse`, `Locator`, and `Page` types' panics into errors for stability and better error handling. @@ -112,13 +113,14 @@ Related Changes: - [browser#1321](https://github.com/grafana/xk6-browser/pull/1321) adds test helpers for async VU execution to reduce the boilerplate in the tests. - [browser#1357](https://github.com/grafana/xk6-browser/pull/1357) updates `Group` and `Tag` usage for the latest k6. - [browser#1361](https://github.com/grafana/xk6-browser/pull/1361) precalculates the browser version information to prevent I/O calls when the `version` and `userAgent` methods are called. This change allows the browser module to expose these methods as a sync API to be consistent with the Playwright's API. -- [browser#1377](https://github.com/grafana/xk6-browser/pull/1377) uses the Goja fork called Sobek in the browser module. +- [browser#1377](https://github.com/grafana/xk6-browser/pull/1377) uses the `goja` fork called `sobek` in the browser module. - [browser#1373](https://github.com/grafana/xk6-browser/pull/1373) provides sync and async APIs within the browser module for making the migration to the async API easier. ## Roadmap + ### Native ECMAScript modules -As mentioned above, the k6 team has forked goja into [sobek](https://github.com/grafana/sobek) and is currently working on [native ECMAScript modules support](https://github.com/grafana/k6/issues/3265). The current work in progress can be found in this [PR](https://github.com/grafana/k6/pull/3456) and any feedback is welcome. +As mentioned above, the k6 team has forked [`goja`](https://github.com/dop251/goja/) into [`sobek`](https://github.com/grafana/sobek) and is currently working on [native ECMAScript modules support](https://github.com/grafana/k6/issues/3265). The current work in progress can be found in this [PR](https://github.com/grafana/k6/pull/3456) and any feedback is welcome. As part of that there likely will be some breaking changes due to the current not native support allowing stuff that shouldn't work. Like for example mixing [CommonJS](https://en.wikipedia.org/wiki/CommonJS) and ESM in the same file. Which is for example why we have added a [warning](https://github.com/grafana/k6/pull/3807) that it won't work. From c5763c91ad6d9bde9cc8c70f7772fdbc124abce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= Date: Tue, 25 Jun 2024 12:41:24 +0200 Subject: [PATCH 21/21] Thanks to non-core contributors --- release notes/v0.52.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release notes/v0.52.0.md b/release notes/v0.52.0.md index 42a47b0044f..cdfb719b0f6 100644 --- a/release notes/v0.52.0.md +++ b/release notes/v0.52.0.md @@ -77,7 +77,7 @@ Related Changes: - [#3740](https://github.com/grafana/k6/pull/3740) enables k6 extensions to initialize `ReadableStream` objects from Go code (`io.Reader`). - [#3798](https://github.com/grafana/k6/pull/3798) adjusts a severity level of a log message from `warn` to `debug` for cases when k6 can't detect the terminal's size. -- [#3797](https://github.com/grafana/k6/pull/3797) makes it possible to output the archive to stdout by using `-` as the `--archive-out`. +- [#3797](https://github.com/grafana/k6/pull/3797) makes it possible to output the archive to stdout by using `-` as the `--archive-out`. Thanks to @roobre! :bow: :tada: - [browser#1370](https://github.com/grafana/xk6-browser/issues/1370) makes the `GetAttribute` method now return `false` when the attribute is missing, making it easier to check for the presence of an attribute. - [browser#1371](https://github.com/grafana/xk6-browser/issues/1371) makes the `TextContent` method now return `false` when the element's text content cannot be grabbed (like a JS `document`), making it easier to check for the presence of text content. - [browser#1376](https://github.com/grafana/xk6-browser/pull/1376) makes `Request.headerValue` and `Response.headerValue` to be case-insensitive.