Skip to content

Commit a4e5ae1

Browse files
codebieninancgumusmstoykovolegbespalovandrewslotin
authored
Release notes for v1.0.0-rc1 (#4635)
* Init release notes * add 4547 * fix 4567 * Add 4558 * fix typo 4558 * add 4547 * add 4574 * add 4290 and 4296 * add see the docs * Add my changes to release notes * Added new config filepath changelog * Oleg's changelogs * Add 4618 to the release notes * Add more of my changes * add secret source release notes * s/avaliable/available * Joan's changelog * Text refinement * Drop useless line from the template * Adjust some internal's items * Add browser feature to the summary Co-authored-by: İnanç Gümüş <[email protected]> * Move at the top the RC explanation * A more compact version of internal items * Grammar fix * Include 4612 changelog * release notes/template: Fix format inconsistencies * Fixes for secret source release notes * Sobek changes and external contribution * Apply suggestions from code review Co-authored-by: Ivan <[email protected]> * Style fix * Format fix for 4544 Co-authored-by: İnanç Gümüş <[email protected]> * Drop the preview item from the summary Co-authored-by: Oleg Bespalov <[email protected]> * Changelog for 4639 * Apply suggestions from code review Co-authored-by: Heitor Tashiro Sergent <[email protected]> Co-authored-by: Oleg Bespalov <[email protected]> * Update the v1 releaese date * Group flakiness fixes Co-authored-by: Mihail Stoykov <[email protected]> * Fix a typo on 4546 * Updated the secretes item in summary * Update release notes/v1.0.0-rc1.md * New end-of-test summary notes * Replace end-of-test summary example with an image * Use GitHub assets storage for the End-of-Test image * Delete release notes/images directory * Do not collapse the end-of-test summary * Update user agent in secrets' example --------- Co-authored-by: İnanç Gümüş <[email protected]> Co-authored-by: Mihail Stoykov <[email protected]> Co-authored-by: Oleg Bespalov <[email protected]> Co-authored-by: Andrew Slotin <[email protected]> Co-authored-by: Joan López de la Franca Beltran <[email protected]> Co-authored-by: Mihail Stoykov <[email protected]> Co-authored-by: Heitor Tashiro Sergent <[email protected]> Co-authored-by: Théo Crevon <[email protected]> Co-authored-by: oleiade <[email protected]>
1 parent a44d3f9 commit a4e5ae1

File tree

2 files changed

+193
-3
lines changed

2 files changed

+193
-3
lines changed

release notes/template.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ k6 `<version>` is here 🎉! This release includes:
33
- (_optional_) `<highlight of breaking changes>`
44
- `<Summary of new features>` (_one or multiple bullets_)
55

6-
76
## Breaking changes
87

98
- `#pr`, `<small_break_1>`
@@ -34,14 +33,15 @@ _Format as `<number> <present_verb> <object>. <credit>`_:
3433
## Bug fixes
3534

3635
_Format as `<number> <present_verb> <object>. <credit>`_:
37-
- _`#111` fixes race condition in runtime_
36+
37+
- _`#111` Fixes race condition in runtime_
3838

3939
## Maintenance and internal improvements
4040

4141
_Format as `<number> <present_verb> <object>. <credit>`_:
42+
4243
- _`#2770` Refactors parts of the JS module._
4344

4445
## _Optional_ Roadmap
4546

4647
_Discussion of future plans_
47-

release notes/v1.0.0-rc1.md

+190
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
k6 `v1.0.0-rc1` is here 🎉!
2+
3+
This release marks a special, non-conventional milestone in the k6 software life-cycle, serving as a preview of the upcoming version 1.0.0.
4+
5+
The purpose of this release is to give the community a chance to test the new version, identify any potential issues, and test migrations of any parts affected by breaking changes. If you encounter any problems or have trouble with the migration, we encourage you to report them by creating an issue. Your feedback will help improve the final release. If no critical issues are reported, we plan to release the final `v1.0.0` within the next month.
6+
7+
Here’s a glimpse of what’s new in this release:
8+
9+
- `k6/experimental/webcrypto` promoted to stable and available globally under `crypto`.
10+
- A revamped end-of-test summary aiming to bring an easier way to understand test results.
11+
- `k6/browser` provided an API for tracking network requests and responses.
12+
- The new `k6/secrets` module for retrieving secrets with extension support.
13+
14+
## Breaking changes
15+
16+
- [#4541](https://github.com/grafana/k6/pull/4541) Commas(`,`) are now supported in the values of the `--tag` CLI flag. This is a breaking change, as previously, a comma meant the start of a new set of tag-values. As a comma is a valid symbol for the value of a tag, this is necessary to have equivalency between different ways of setting tags. This still allows multiple tags to be set on the CLI with multiple `--tag key=value` arguments.
17+
18+
### A new default path for the configuration file [#4301](https://github.com/grafana/k6/pull/4301)
19+
20+
When running the `k6 cloud login` or the deprecated `k6 login` commands, a configuration file was automatically created at `{USER_CONFIG_DIR}/loadimpact/config.json`. Now, the configuration file is created at `{USER_CONFIG_DIR}/k6/config.json`.
21+
22+
To migrate your configuration file to the new path:
23+
24+
1. Run `k6 cloud login` or `k6 login` to automatically migrate the configuration file to the new location.
25+
2. Run `k6 cloud run` or `k6 run` to verify that the version is now fully functional and no related warning is emitted.
26+
27+
The configuration file in the old path remains available and can continue to be used with the previous k6 versions. If you're not using an old version of k6 anymore, consider deleting the files manually.
28+
29+
The `k6 run` commands search for the configuration file in the new location. If it can't find it, it tries to fall back on the old path and then logs a warning message suggesting to migrate it.
30+
31+
## New features
32+
33+
### A revamped end-of-test summary aiming to bring an easier way to understand test results [#4089](https://github.com/grafana/k6/pull/4089), [#4649](https://github.com/grafana/k6/pull/4649)
34+
35+
The end-of-test-summary has been revamped to make it easier for users to understand test results. That includes:
36+
- A new format to summarize the results of the user-defined [Checks](https://grafana.com/docs/k6/latest/using-k6/checks/) and [Thresholds](https://grafana.com/docs/k6/latest/using-k6/thresholds/).
37+
- Now metrics are split into different sections, making it easier to focus on what really matters.
38+
39+
![End of test summary example](https://github.com/user-attachments/assets/68036748-f7be-45e1-b69a-65fa18c458ee)
40+
41+
The new end-of-test summary is enabled by default for users, but you can use the `summary-mode` flag to choose between different modes:
42+
- `compact` *(default)*: what you can see in the example above, with the most relevant information.
43+
- `full`: similar to `compact`, but also includes some more detailed metrics and results for each [group](https://grafana.com/docs/k6/latest/using-k6/tags-and-groups/#groups) and [scenario](https://grafana.com/docs/k6/latest/using-k6/scenarios/) defined in the test.
44+
- `legacy`: the old summary format for backward compatibility.
45+
46+
> Note: The data structure received by the [`handleSummary`](https://grafana.com/docs/k6/latest/results-output/end-of-test/custom-summary/) function,
47+
> as well as the data exported using `--summary-export`, has not changed in this release. However, these may change in upcoming releases, which could introduce breaking changes.
48+
49+
### Browser: Tracking network requests and responses [#4290](https://github.com/grafana/k6/issues/4290), [#4296](https://github.com/grafana/k6/issues/4296)
50+
51+
The [browser module](https://grafana.com/docs/k6/latest/javascript-api/k6-browser/) adds support for tracking network requests and responses. This feature is especially useful for validating certain aspects of the requests and responses to determine whether the test was successful. It can also be used to debug issues with the test script or the tested application. Refer to the [documentation](https://grafana.com/docs/k6/latest/javascript-api/k6-browser/page/on/) for more details.
52+
53+
For example, to track all requests and responses made by a page, you can use the following script:
54+
55+
```javascript
56+
import { browser } from 'k6/browser';
57+
58+
export const options = {
59+
scenarios: {
60+
ui: {
61+
executor: 'shared-iterations',
62+
options: {
63+
browser: {
64+
type: 'chromium',
65+
},
66+
},
67+
},
68+
},
69+
};
70+
71+
export default async function () {
72+
const page = await browser.newPage();
73+
74+
// registers a handler that logs all requests made by the page
75+
page.on('request', async request => console.log(request.url()));
76+
// registers a handler that logs all responses received by the page
77+
page.on('response', async response => console.log(response.url()));
78+
79+
await page.goto('https://quickpizza.grafana.com/', { waitUntil: 'networkidle' });
80+
await page.close();
81+
}
82+
```
83+
84+
The output might look like this:
85+
86+
```bash
87+
INFO[0000] https://quickpizza.grafana.com/ source=console
88+
INFO[0001] https://quickpizza.grafana.com/api/tools source=console
89+
INFO[0001] https://quickpizza.grafana.com/images/pizza.png source=console
90+
...
91+
```
92+
93+
### `k6/experimental/webcrypto` promoted to stable and available globally under `crypto` [#4278](https://github.com/grafana/k6/pull/4278)
94+
95+
With this release, the `k6/experimental/webcrypto` module is promoted to stable and available globally under `crypto`. That means you can remove the `import { crypto } from 'k6/experimental/webcrypto';` statement from your scripts and still use the module.
96+
97+
```javascript
98+
export default function () {
99+
const myUUID = crypto.randomUUID();
100+
101+
console.log(myUUID);
102+
}
103+
```
104+
105+
`k6/experimental/webcrypto` is deprecated and will be removed in `v1.1.0`.
106+
107+
### Support for custom templates in `k6 new` command [#4618](https://github.com/grafana/k6/pull/4618)
108+
109+
The `k6 new` command now accepts a path to a file to use as a template for the new script. Templates use [Go templates syntax](https://pkg.go.dev/text/template#pkg-overview) and can include the following variables:
110+
111+
- `ScriptName`: The name of the new script.
112+
- `ProjectID`: The ID of the Grafana Cloud project to use for the new script.
113+
114+
To generate a new script using a custom template, use the following command:
115+
116+
```sh
117+
k6 new --template /path/to/my-template.js
118+
```
119+
120+
### Secret Sources [#4514](https://github.com/grafana/k6/pull/4514), [#4621](https://github.com/grafana/k6/pull/4621), [#4637](https://github.com/grafana/k6/pull/4637)
121+
122+
We've added support for retrieving secrets from different sources. Among other things, this means that the values received from a secret source will be redacted from the logs. Refer to the [documentation](https://grafana.com/docs/k6/latest/using-k6/secret-source) for more details.
123+
124+
The two implementations available are to read secrets from a key-value file or from CLI flags, which are meant mostly to test the feature. We've also included extension support, which can be used to implement retrieving secrets from more secure sources.
125+
126+
In the future, we'll likely include additional implementations that are more production-ready.
127+
128+
Here's an example where we log the secret directly, make a request, and then log the whole response. In both cases, the secrets are redacted from the logs.
129+
130+
```javascript
131+
import http from 'k6/http';
132+
import secrets from 'k6/secrets';
133+
134+
export default async () => {
135+
const my_secret = await secrets.get('cool'); // get secret from a source with the provided identifier
136+
console.log(my_secret);
137+
const response = await http.asyncRequest("GET", "https://httpbin.org/get", null, {
138+
headers: {
139+
"Custom-Authentication": `Bearer ${await secrets.get("else")}`,
140+
}
141+
})
142+
console.log(response.body)
143+
}
144+
```
145+
146+
```shell
147+
$ k6 run --secret-source=mock=cool="not cool secret",else="totally a secret" script.js
148+
...
149+
INFO[0000] ***SECRET_REDACTED*** source=console
150+
INFO[0031] {
151+
"args": {},
152+
"headers": {
153+
"Custom-Authentication": "Bearer ***SECRET_REDACTED***",
154+
"Host": "httpbin.org",
155+
"User-Agent": "k6/1.0.0-rc1 (https://k6.io/)",
156+
"X-Amzn-Trace-Id": "Root=1-67dd6691-18eeaf5d1782bf292da5037c"
157+
},
158+
"origin": "1.1.1.1",
159+
"url": "https://httpbin.org/get"
160+
} source=console
161+
...
162+
```
163+
164+
## UX improvements and enhancements
165+
166+
- [#4547](https://github.com/grafana/k6/pull/4547) The k6 banner now outputs with the original TrueColor (24-bit) logo only if the terminal supports it.
167+
- [#4590](https://github.com/grafana/k6/pull/4590) Moves the `docker-compose` example with InfluxDB to the `examples/docker-compose` directory and adds an opentelemetry example.
168+
- [#4602](https://github.com/grafana/k6/pull/4602), [#4629](https://github.com/grafana/k6/pull/4629) Improves the error message on options error from script. k6 now will try to print the part of the options that fails as JSON.
169+
- [#4612](https://github.com/grafana/k6/pull/4612) Updates the link included in the local modules' error message. Thanks, @tanurrra!
170+
171+
## Bug fixes
172+
173+
- [#4544](https://github.com/grafana/k6/pull/4544) Fixes race in `ReadableStream.cancel` and run WPT test with race detection for easier finding of similar problems.
174+
- [#4567](https://github.com/grafana/k6/pull/4567), [#4558](https://github.com/grafana/k6/pull/4558), [#4574](https://github.com/grafana/k6/pull/4574), [#4610](https://github.com/grafana/k6/pull/4610) Fixes race conditions with the browser module's `ElementHandle`, `Mouse`, `Keyboard`, and `Response`.
175+
- [#4641](https://github.com/grafana/k6/pull/4641) Fixes JSON marshalling of tagset. Thank you @dvordrova 🙇.
176+
177+
## Maintenance and internal improvements
178+
179+
- [#4519](https://github.com/grafana/k6/pull/4519), [#4562](https://github.com/grafana/k6/pull/4562) Moves the Prometheus remote write, and OpenTelemetry outputs' code to the k6 repository.
180+
- [#4545](https://github.com/grafana/k6/pull/4545) Tries to stabilize MacOS CI by making browser throttle.js easier to run for it.
181+
- [#4546](https://github.com/grafana/k6/pull/4546), [#4643](https://github.com/grafana/k6/pull/4643) Reduce flakiness of the test suite.
182+
- [#4552](https://github.com/grafana/k6/pull/4552) Updates the fallback x509 certificates for CA roots.
183+
- [#4561](https://github.com/grafana/k6/pull/4561), [#4638](https://github.com/grafana/k6/pull/4638) Update Sobek to fix a bug in `Function.apply`, logical assignment support, array destructuring in exports, better cross-os source map support.
184+
- [#4563](https://github.com/grafana/k6/pull/4563) Fix `k6/timers` reporting as always being used.
185+
- [#4603](https://github.com/grafana/k6/pull/4603) Homogenize package docs comment block format.
186+
- [#4605](https://github.com/grafana/k6/pull/4605) Refactor the code responsible for `lib.RuntimeOptions` loading.
187+
- [#4606](https://github.com/grafana/k6/pull/4606), [#4604](https://github.com/grafana/k6/pull/4604) Bump k6 to depend on greater or equal Go 1.23 versions, build with 1.24, then use a compatible golangci-lint version.
188+
- [#4611](https://github.com/grafana/k6/pull/4611) Extract the HDR histogram implementation into a shared package.
189+
- [#4616](https://github.com/grafana/k6/pull/4616), [#4613](https://github.com/grafana/k6/pull/4613), [#4627](https://github.com/grafana/k6/pull/4627), [#4615](https://github.com/grafana/k6/pull/4615), [#4592](https://github.com/grafana/k6/pull/4592), [#4578](https://github.com/grafana/k6/pull/4578), [#4554](https://github.com/grafana/k6/pull/4554), [#4553](https://github.com/grafana/k6/pull/4553), [#4552](https://github.com/grafana/k6/pull/4552), [#4527](https://github.com/grafana/k6/pull/4527), [#4550](https://github.com/grafana/k6/pull/4550) Update direct dependencies.
190+
- [#4639](https://github.com/grafana/k6/pull/4639) Pushes the `latest` docker image tag even for `rc` releases.

0 commit comments

Comments
 (0)