Skip to content

Release notes v1.0.0 #4732

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
126 changes: 126 additions & 0 deletions release notes/v1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
k6 `v1.0.0` is here 🎉!

After 9 years, 9k+ commits and 58 releases from the first commit in 2015, we're excited to announce that we're going to leave behind the `v0.x` series. Starting from now k6 aligns with the industry standard of following the semantic versioning scheme and will release this and future versions by following its new stability policy.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
After 9 years, 9k+ commits and 58 releases from the first commit in 2015, we're excited to announce that we're going to leave behind the `v0.x` series. Starting from now k6 aligns with the industry standard of following the semantic versioning scheme and will release this and future versions by following its new stability policy.
After 9 years, 9k+ commits and 58 releases from the first commit in 2016, we're excited to announce that we're going to leave behind the `v0.x` series. Starting from now k6 aligns with the industry standard of following the semantic versioning scheme and will release this and future versions by following its new stability policy.


This release includes:

- Native support for extensions in the Cloud
- New test failure control with `execution.test.fail`
- Documentation for the stability guarantees

## New features

### Native support for extensions in the Cloud [#4670](https://github.com/grafana/k6/pull/4671)

The new Binary provisioning feature automatically requests and uses custom k6 binaries with the required extensions for your tests. This allows you to run scripts that use extensions without manually rebuilding k6 as it was in the past by depending on tools like `xk6`. The system caches binaries locally for efficiency, and any additional runs with the same dependencies will use the same binary and will run faster.

Binary provisioning is available for all k6 Cloud users (free and paid plans), and it's enabled by opt-in with the feature flag `K6_BINARY_PROVISIONING=true`.

Binary provisioning is a limited set of extensions that are supported, and it's not available for the `k6 run` command that might be added in the future. However, local development is supported with the `k6 cloud --local-execution` command if a cloud token is provided by the canonical login methods.

### Test failure control with `execution.test.fail` [#4672](https://github.com/grafana/k6/pull/4672)

The new `execution.test.fail` function enables controlled test failure reporting without interrupting the test execution. When called, this method marks the entire test run as failed while allowing all iterations to complete normally. The test will exit with code `110`, making failures detectable by external systems. This provides graceful error handling for scenarios akin to [functional testing](https://github.com/grafana/k6-jslib-testing).

For example, the following script:
```javascript
import http from "k6/http";
import exec from "k6/execution";

export const options = {
iterations: 10,
};

export default function () {
http.get("https://quickpizza.grafana.com");

if (exec.vu.iterationInInstance === 3) {
exec.test.fail(`iteration ${exec.vu.iterationInInstance}: marked the test as failed`);
}

console.log(`iteration ${exec.vu.iterationInInstance} executed`);
}
```

When ran:
```bash
k6 run script.js; echo $?
```

Will display the following and return with exit code `110`:
Comment on lines +49 to +50
Copy link
Contributor Author

@codebien codebien Apr 24, 2025

Choose a reason for hiding this comment

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

Suggested change
Will display the following and return with exit code `110`:
Will return with exit code `110` and it display the following output:
ERRO[0001] test run was marked as failed
k6 exited with status: 110
Expand below to see the full output for the example:

@oleiade What about reporting only the critical part and have a full version collapsed?

```
/\ Grafana /‾‾/
/\ / \ |\ __ / /
/ \/ \ | |/ / / ‾‾\
/ \ | ( | (‾) |
/ __________ \ |_|\_\ \_____/

execution: local
script: script.js
output: -

scenarios: (100.00%) 1 scenario, 1 max VUs, 10m30s max duration (incl. graceful stop):
* default: 10 iterations shared among 1 VUs (maxDuration: 10m0s, gracefulStop: 30s)

INFO[0000] iteration 0 executed source=console
INFO[0000] iteration 1 executed source=console
INFO[0000] iteration 2 executed source=console
ERRO[0000] iteration 3: marked the test as failed
INFO[0000] iteration 3 executed source=console
INFO[0001] iteration 4 executed source=console
INFO[0001] iteration 5 executed source=console
INFO[0001] iteration 6 executed source=console
INFO[0001] iteration 7 executed source=console
INFO[0001] iteration 8 executed source=console
INFO[0001] iteration 9 executed source=console


█ TOTAL RESULTS

HTTP
http_req_duration.......................................................: avg=129.22ms min=127.9ms med=129.17ms max=130.83ms p(90)=130.51ms p(95)=130.67ms
{ expected_response:true }............................................: avg=129.22ms min=127.9ms med=129.17ms max=130.83ms p(90)=130.51ms p(95)=130.67ms
http_req_failed.........................................................: 0.00% 0 out of 10
http_reqs...............................................................: 10 5.763858/s

EXECUTION
iteration_duration......................................................: avg=173.46ms min=128.07ms med=129.43ms max=569.82ms p(90)=174.89ms p(95)=372.36ms
iterations..............................................................: 10 5.763858/s
vus.....................................................................: 1 min=1 max=1
vus_max.................................................................: 1 min=1 max=1

NETWORK
data_received...........................................................: 32 kB 19 kB/s
data_sent...............................................................: 1.0 kB 601 B/s

running (00m01.7s), 0/1 VUs, 10 complete and 0 interrupted iterations
default ✓ [======================================] 1 VUs 00m01.7s/10m0s 10/10 shared iters
ERRO[0001] test run was marked as failed
k6 exited with status: 110
```

## UX improvements and enhancements

- [#4698](https://github.com/grafana/k6/pull/4698) Displays threshold values even when are not configured in `summaryTrendStats` option.
- [#4699](https://github.com/grafana/k6/pull/4699) Drops the link of the legacy k6 website from the user agent.

## Bug fixes

- [#4717](https://github.com/grafana/k6/pull/4717) Safeguards against `pressedKeys` being updated concurrently in browser module. Also empty struct instead of a bool for a set in browser module.
- [#4665](https://github.com/grafana/k6/pull/4665) Prevents race condition between `Ended` & `Interrupted` execution states.
- [#4677](https://github.com/grafana/k6/pull/4677) Makes `secretsource` also redact `float32` and `float64` values.

## Maintenance and internal improvements

- [#4675](https://github.com/grafana/k6/pull/4675), [#4676](https://github.com/grafana/k6/pull/4676), [#4678](https://github.com/grafana/k6/pull/4678) Move several packages to `internal` as preparations for v1.0.0 stabilization
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
- [#4675](https://github.com/grafana/k6/pull/4675), [#4676](https://github.com/grafana/k6/pull/4676), [#4678](https://github.com/grafana/k6/pull/4678) Move several packages to `internal` as preparations for v1.0.0 stabilization
- [#4675](https://github.com/grafana/k6/pull/4675), [#4676](https://github.com/grafana/k6/pull/4676), [#4678](https://github.com/grafana/k6/pull/4678) Move several packages to `internal` as preparations for v1.0.0 stabilization.

- [#4686](https://github.com/grafana/k6/pull/4686) Drops the redundant `NO_COLOR` detection.
- [#4709](https://github.com/grafana/k6/pull/4709) Fixes JS native objects override to avoid a page under the test from overwriting native JavaScript objects, like `Set` and `Map`.
- [#4726](https://github.com/grafana/k6/pull/4726) Unifies the internal/cmd.Execute methods.
- [#4669](https://github.com/grafana/k6/pull/4669) Do not report runs during tests.
- [#4693](https://github.com/grafana/k6/pull/4693) Bumps OTel dependency.
- [#4691](https://github.com/grafana/k6/pull/4691) Bumps x509roots/fallback dependency.
- [#4701](https://github.com/grafana/k6/pull/4701) Fixes WebCrypto errors not propagating from the tests.
- [#4703](https://github.com/grafana/k6/pull/4703) Makes wptTests run without tags or skip if repos not checkout.
- [#4674](https://github.com/grafana/k6/pull/4674) Bumps the golangx group across 1 directory with 6 updates.
- [#4673](https://github.com/grafana/k6/pull/4673) Bumps google.golang.org/grpc in the googles group.
- [#4663](https://github.com/grafana/k6/pull/4663) Bumps github.com/evanw/esbuild from 0.25.1 to 0.25.2.
Comment on lines +121 to +126
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reminder: Collapse the dependencies items

Loading