Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release notes v0.46.0 #3246

Merged
merged 35 commits into from
Aug 14, 2023
Merged
Changes from 27 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
91d33f5
Add release notes v0.46.0 file
codebien Jun 23, 2023
32b3f01
Add release notes template for version 0.46
oleiade Jun 26, 2023
1078693
changelog: a record for the
olegbespalov Jun 27, 2023
af4e7fc
Fill release notes templates for version 0.46
oleiade Aug 3, 2023
e5dee88
Bump k6 version to version 0.46
oleiade Aug 3, 2023
372e3dc
Update release notes/v0.46.0.md
oleiade Aug 3, 2023
b4d8c88
Add loki headers changes
mstoykov Aug 3, 2023
b2f96c7
Add cloud traces to the release notes
Blinkuu Aug 3, 2023
202fbba
Remove redundant new line
Blinkuu Aug 3, 2023
029ba7d
Drop 3227 from misc section
mstoykov Aug 3, 2023
136c678
Update release notes/v0.46.0.md
oleiade Aug 10, 2023
d3acd62
Update release notes/v0.46.0.md
oleiade Aug 10, 2023
6214fc2
feat: gRPC connection's TLS
olegbespalov Aug 10, 2023
1563184
Apply PR reviews suggestions
oleiade Aug 10, 2023
cf72813
Move miscelaneous items in dedicated sections
oleiade Aug 10, 2023
a1dff42
Fix the mention of the grpc fix
oleiade Aug 10, 2023
4b94388
Cloud output v2 changelog (#3161)
codebien Aug 10, 2023
e587426
Document xk6-grpc's change
olegbespalov Aug 10, 2023
b754aab
Adds xk6-browser v1.0.2 release notes (#3260)
ka3de Aug 11, 2023
a32c5ac
Update release notes/v0.46.0.md
oleiade Aug 11, 2023
9ae4351
Update release notes/v0.46.0.md
oleiade Aug 11, 2023
778a3c9
Update release notes/v0.46.0.md
oleiade Aug 11, 2023
1383381
Update release notes/v0.46.0.md
oleiade Aug 11, 2023
1388a83
Update release notes/v0.46.0.md
oleiade Aug 11, 2023
cf5d919
Apply suggestions from code review
oleiade Aug 11, 2023
b6cb1f2
Revert consts.go version bump
oleiade Aug 11, 2023
ccbae7f
Integrate oleg's review
oleiade Aug 11, 2023
098dd23
Apply suggestions from code review
oleiade Aug 14, 2023
fe13ab3
Apply Heitor's suggestions
oleiade Aug 14, 2023
40e07f6
fix grpc issue mention consistency
oleiade Aug 14, 2023
2161914
Update release notes/v0.46.0.md
oleiade Aug 14, 2023
daabd8c
Iterate on the release notes
oleiade Aug 14, 2023
4c5b8cf
Update release notes/v0.46.0.md
oleiade Aug 14, 2023
b3ec841
Iterate on v0.46 release notes
oleiade Aug 14, 2023
cd9424a
Update release notes/v0.46.0.md
oleiade Aug 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 188 additions & 0 deletions release notes/v0.46.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
k6 `v0.46` is here 🎉! This release includes:

- (_optional_) `<highlight of breaking changes>`
- `<Summary of new features>` (_one or multiple bullets_)

oleiade marked this conversation as resolved.
Show resolved Hide resolved

## Breaking changes

- `#pr`, `<small_break_1>`
- `#pr`, `<small_break_2>`
oleiade marked this conversation as resolved.
Show resolved Hide resolved

### 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.
oleiade marked this conversation as resolved.
Show resolved Hide resolved

**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)).
oleiade marked this conversation as resolved.
Show resolved Hide resolved

**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))
oleiade marked this conversation as resolved.
Show resolved Hide resolved
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)).
oleiade marked this conversation as resolved.
Show resolved Hide resolved

Following with **import changes**, the browser module version is no longer an exported field ([browser#923](https://github.com/grafana/xk6-browser/pull/923)).
oleiade marked this conversation as resolved.
Show resolved Hide resolved

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_) `<big_breaking_change>` `#pr`
oleiade marked this conversation as resolved.
Show resolved Hide resolved

## New features

### Loki log output sending additional headers [#3227](https://github.com/grafana/k6/pull/3227)
oleiade marked this conversation as resolved.
Show resolved Hide resolved

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.
oleiade marked this conversation as resolved.
Show resolved Hide resolved

Now it can be configured to send additional headers on every request.
oleiade marked this conversation as resolved.
Show resolved Hide resolved

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 doing the changes.
oleiade marked this conversation as resolved.
Show resolved Hide resolved

### 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.
oleiade marked this conversation as resolved.
Show resolved Hide resolved

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`.
oleiade marked this conversation as resolved.
Show resolved Hide resolved
oleiade marked this conversation as resolved.
Show resolved Hide resolved

### 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.

<details>
<summary> Expand to see an example of the new functionality.</summary>

```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"]);
}
...
```
</details>

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.
oleiade marked this conversation as resolved.
Show resolved Hide resolved

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.
oleiade marked this conversation as resolved.
Show resolved Hide resolved

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
oleiade marked this conversation as resolved.
Show resolved Hide resolved

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.
oleiade marked this conversation as resolved.
Show resolved Hide resolved

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).

### `<big_feature_n>` `#pr`

_what, why, and what this means for the user_

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### `<big_feature_n>` `#pr`
_what, why, and what this means for the user_

### UX improvements and enhancements
oleiade marked this conversation as resolved.
Show resolved Hide resolved

oleiade marked this conversation as resolved.
Show resolved Hide resolved
_Format as `<number> <present_verb> <object>. <credit>`_:
- _`#999` Gives terminal output prettier printing. Thanks to `@person` for the help!_
oleiade marked this conversation as resolved.
Show resolved Hide resolved
- [#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.
oleiade marked this conversation as resolved.
Show resolved Hide resolved
- [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 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.
- [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

- [#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.
oleiade marked this conversation as resolved.
Show resolved Hide resolved
- [#3210](https://github.com/grafana/k6/pull/3210) Updates the xk6-output-prometheus-remote version used by k6.
olegbespalov marked this conversation as resolved.
Show resolved Hide resolved
- [#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.
- [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

_Discussion of future plans_
oleiade marked this conversation as resolved.
Show resolved Hide resolved