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 for v0.54.0 #3949

Merged
merged 42 commits into from
Sep 30, 2024
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
99bb3aa
v0.54.0 release notes from template
olegbespalov Aug 21, 2024
8b29604
Add browser#1406 to v0.54.0 release notes
ankur22 Aug 21, 2024
10b57a8
Add release notes for experimental csv module
oleiade Sep 12, 2024
ec5a854
Oleg's changelog
olegbespalov Sep 12, 2024
a85e5a0
External contributors' changelog
olegbespalov Sep 12, 2024
b42d1b1
Minor alignments of release notes
olegbespalov Sep 12, 2024
a52892e
Add browser#1420 & browser#1421 to release notes
ankur22 Sep 13, 2024
b3bce17
Joan's changelog
joanlopez Sep 13, 2024
5c3bbaf
Merge branch 'release-v0.54.0' of github.com:grafana/k6 into release-…
joanlopez Sep 13, 2024
cd79b78
Breaking changes, minor adjustments
olegbespalov Sep 13, 2024
8da0ce8
Extract gRPC updates under the feature
olegbespalov Sep 13, 2024
befe03c
Add setChecked to release notes
inancgumus Sep 13, 2024
dfe6c0f
Add file upload protocol to release notes
inancgumus Sep 13, 2024
a42b2ff
Add browser#1408 & #1422 to release notes
ankur22 Sep 13, 2024
f13b796
mstoykov: most of my release notes changes
mstoykov Sep 17, 2024
901251f
Add notes specific to --local-execution
oleiade Sep 17, 2024
4fd717d
Improve browser release notes
inancgumus Sep 17, 2024
dea59ed
Add branding changes
mstoykov Sep 17, 2024
4b63d34
add usage changes to release notes
mstoykov Sep 17, 2024
4b33ce6
xk6-websockets changes
mstoykov Sep 17, 2024
be907c9
Add browser module notice
inancgumus Sep 17, 2024
469ecb4
Add future plans notice back
inancgumus Sep 17, 2024
d30a86d
Fix regex code block release notes
inancgumus Sep 17, 2024
802430d
Fix doc next links to latest
inancgumus Sep 17, 2024
e575ea4
Add setChecked links
inancgumus Sep 17, 2024
6a9971b
Add async check utility
inancgumus Sep 18, 2024
cac0382
Fix k6lib check next to latest
inancgumus Sep 18, 2024
af29a66
Improve async check notes
inancgumus Sep 19, 2024
ad5a90a
Improve browser release notes
inancgumus Sep 20, 2024
856dec1
Apply suggestions from code review
olegbespalov Sep 23, 2024
317abfd
Adding missing dependencies PRs, aligning the style
olegbespalov Sep 23, 2024
44c1f51
Mention further bug fixes and maintenance work
oleiade Sep 23, 2024
1c2ae2a
Apply suggestions from code review
olegbespalov Sep 23, 2024
4199f09
Add fix browser#1435
ankur22 Sep 23, 2024
e032c06
Apply suggestions from code review
olegbespalov Sep 24, 2024
abb23cf
Add most recent browser related fixes
ankur22 Sep 26, 2024
83a656c
Apply suggestions from code review
olegbespalov Sep 26, 2024
92c120d
Apply code review suggestions, mentioning new PRs
olegbespalov Sep 26, 2024
2570cd9
Apply suggestions from code review
olegbespalov Sep 26, 2024
774a421
Apply suggestions from code review
olegbespalov Sep 30, 2024
88f6226
Apply suggestions from code review
olegbespalov Sep 30, 2024
1fa1587
Apply suggestions from code review
olegbespalov Sep 30, 2024
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
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Heitor Tashiro Sergent <[email protected]>
  • Loading branch information
olegbespalov and heitortsergent authored Sep 23, 2024
commit 856dec1df599971058faf1b0915ddab8f2deb5d8
72 changes: 35 additions & 37 deletions release notes/v0.54.0.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
k6 `v0.54.0` is here 🎉! This release includes:

- A new experimental CSV module
- new ECMAScript features
- New ECMAScript features
- Updated logo and branding

## Breaking changes

- [#3913](https://github.com/grafana/k6/pull/3913) changes mapping of the Golang's `math/big.Int` type to `bigint` type in k6.
- [#3913](https://github.com/grafana/k6/pull/3913) changes the mapping of Golang's `math/big.Int` type to `bigint` type in k6.
- [#3922](https://github.com/grafana/k6/pull/3922) removes `lib.Min` and `lib.Max` from k6's Go API, which could affect custom extensions that rely on these functions.
- [#3838](https://github.com/grafana/k6/pull/3838) remove `k6/experimental/timers` - they are now available globally and no import is needed.
- [#3838](https://github.com/grafana/k6/pull/3838) removes `k6/experimental/timers` - they are now available globally and no import is needed.
- [#3944](https://github.com/grafana/k6/pull/3844) updates to `k6/experimental/websockets` made the default to binaryType to be `"blob"` as per the specification. Previously it was not set by default and required to be set and before that it was `"arraybuffer"`. With this change `k6/experimental/websockets` is now compliant with the specification.
olegbespalov marked this conversation as resolved.
Show resolved Hide resolved

### (_optional h3_) `<big_breaking_change>` `#pr`
Expand All @@ -25,9 +25,10 @@ As such in this release we also got a new logo and the terminal banner has been

### New `k6 cloud run --local-execution` flag for local execution of cloud tests [`#3904`](https://github.com/grafana/k6/pull/3904), and [#3931](https://github.com/grafana/k6/pull/3931)
olegbespalov marked this conversation as resolved.
Show resolved Hide resolved

This release introduces the --local-execution flag for the k6 cloud run command, allowing you to run test executions locally while sending the metrics to Grafana Cloud k6.
This release introduces the `--local-execution` flag for the k6 cloud run command, allowing you to run test executions locally while sending metrics to Grafana Cloud k6.

```bash
k6 cloud run --local-execution
k6 cloud run --local-execution script.js
```

By default, using the `--local-execution` flag uploads the test archive to Grafana Cloud k6. If you want to disable this upload, use the `--no-archive-upload` flag.
Expand All @@ -36,27 +37,27 @@ The `--local-execution` flag currently functions similarly to the `k6 run -o clo

### New experimental CSV module for efficient CSV data handling [`#3743`](https://github.com/grafana/k6/pull/3743)

We’ve added a new experimental csv module to k6 for more efficient and convenient CSV parsing and streaming, addressing the limitations of preexisting JavaScript-based solutions like [papaparse](https://www.papaparse.com/).
We’ve added a new experimental CSV module to k6 for more efficient and convenient CSV parsing and streaming, addressing the limitations of preexisting JavaScript-based solutions like [papaparse](https://www.papaparse.com/).

#### What is it?

The csv module offers two key features:
The CSV module offers two key features:

* `csv.parse()` **Function**: Parses an entire CSV file at once into a [SharedArray](https://grafana.com/docs/k6/latest/javascript-api/k6-data/sharedarray/), using Go-based processing to using Go-based processing for faster parsing and lower memory usage compared to JavaScript alternatives.
* `csv.Parser` **Class**: Provides a streaming parser to read CSV files line-by-line, minimizing memory consumption and offering more control over parsing through a stream-like API. This is ideal for scenarios where memory optimization or fine-grained control of the parsing process is crucial.
* `csv.parse()`: This function parses a CSV file into a [SharedArray](https://grafana.com/docs/k6/latest/javascript-api/k6-data/sharedarray/) at once using Go-based processing for faster parsing and lower memory usage compared to JavaScript alternatives.
* `csv.Parser`: This class provides a streaming parser to read CSV files line-by-line, minimizing memory consumption and offering more control over parsing through a stream-like API. This is ideal for scenarios where memory optimization or fine-grained control of the parsing process is crucial.

#### Benefits for Users
#### Benefits for users

* **Faster Parsing**: `csv.parse` bypasses most of the JavaScript runtime, offering significant speed improvements for large files.
* **Lower Memory Usage**: both solution support shared memory across virtual users (VUs) with the `fs.open` function.
* **Flexibility**: choose between full-file parsing with csv.parse() or memory-efficient streaming with csv.Parser.
* **Lower Memory Usage**: Both solutions support shared memory across virtual users (VUs) with the `fs.open` function.
* **Flexibility**: Choose between full-file parsing with `csv.parse()` or memory-efficient streaming with `csv.Parser`.

#### Tradeoffs

* **`csv.Parse`**: Parses the entire file in the initialization phase of the test, which can increase startup time and memory usage for large files. Best suited for scenarios where performance is prioritized over memory consumption.
* **`csv.Parser`**: Reads the file line-by-line, making it more memory-efficient but potentially slower due to reading overhead for each line. Ideal for scenarios where memory usage is a concern or where fine-grained control over parsing is needed.

#### Example Usage
#### Example usage

<details>
<summary> Expand to see an example of Parsing a full CSV file into a SharedArray.</summary>
Expand Down Expand Up @@ -131,27 +132,25 @@ export default async function() {

### New `k6 cloud upload` command for uploading test files to the cloud [`#3906`](https://github.com/grafana/k6/pull/3906)
olegbespalov marked this conversation as resolved.
Show resolved Hide resolved

Although we continue to refine and improve the cloud service to handle better the uploading of test files,
as well as the overall user experience, we've added a new `k6 cloud upload` command that replaces the
`k6 cloud --upload-only` flag used so far, which is now considered deprecated.
We continue to refine and improve the cloud service to improve how we handle uploading test files, so we've added a new `k6 cloud upload` command that replaces the `k6 cloud --upload-only` flag, which is now considered deprecated.

### gRPC module updates driven by contributors

#### New `discardResponseMessage` option

[#3877](https://github.com/grafana/k6/pull/3877) and [#3820](https://github.com/grafana/k6/pull/3820) add a new option for gRPC module `discardResponseMessage` which allows users to discard the messages received from the server.
[#3877](https://github.com/grafana/k6/pull/3877) and [#3820](https://github.com/grafana/k6/pull/3820) add a new option for the gRPC module `discardResponseMessage`, which allows users to discard the messages received from the server.

```javascript
const resp = client.invoke('main.RouteGuide/GetFeature', req, {discardResponseMessage: true});
```

This reduces the amount of memory required, and the amount of garbage collection, which reduces the load on the testing machine and can help produce more reliable test results.
This reduces the amount of memory required and the amount of garbage collection, which reduces the load on the testing machine and can help produce more reliable test results.

Thank you, @lzakharov!

#### New argument `meta` for gRPC's stream callbacks
olegbespalov marked this conversation as resolved.
Show resolved Hide resolved

[#3801](https://github.com/grafana/k6/pull/3801) adds a new argument `meta` to gRPC's stream callback, which handles the timestamp of the original event (e.g. when message has been received).
[#3801](https://github.com/grafana/k6/pull/3801) adds a new argument `meta` to gRPC's stream callback, which handles the timestamp of the original event (for example, when a message has been received).

```javascript
let stream = new grpc.Stream(client, "main.FeatureExplorer/ListFeatures")
Expand All @@ -173,21 +172,21 @@ Thank you, @Lordnibbler!

With this release, we've updated [Sobek](https://github.com/grafana/sobek) (the `ECMAScript` implementation in Go) which contains the new ECMAScript features that are now available in k6.

This includes support for numeric literal separators, like:
This includes support for numeric literal separators:

```javascript
const billion = 1_000_000_000
```

Support for `BigInt`, the values which are too large to be represented by the number primitive.
Support for `BigInt`, the values which are too large to be represented by the number primitive:

```javascript
const huge = BigInt(9007199254740991);
```

Note: that prior k6 version v0.54, Golang's type `math/big.Int` mapped to another type, so it might be a breaking change for some extensions or users.
Note: Before k6 version v0.54, Golang's type `math/big.Int` mapped to another type, so this might be a breaking change for some extensions or users.

Regexp dotall support - letting you match newline characters with `.`.
RegExp dotAll support, where you can match newline characters with `.`:

```javascript
const str1 = "bar\nexample foo example";
Expand Down Expand Up @@ -240,32 +239,31 @@ check(page, {

Check out [the `check` utility function's documentation](https://grafana.com/docs/k6/latest/javascript-api/jslib/utils/check/) for more information on how to use it.

### Support ArrayBufferViews in send for `k6/experimental/websockets` [#3944](https://github.com/grafana/k6/pull/3844)
### Support ArrayBufferViews in `send` for `k6/experimental/websockets` [#3944](https://github.com/grafana/k6/pull/3844)

As part of making `k6/experimental/websockets` complaint with the [WebSocket API](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) it now support Uint8Array and other ArrayBufferViews directly as arguments to `send`, instead of having to specifically provide their `buffer`.
As part of making `k6/experimental/websockets` compliant with the [WebSocket API](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket), it now supports Uint8Array and other ArrayBufferViews directly as arguments to `send`, instead of having to specifically provide their `buffer`.

This should make it more compliant with libraries that use WebSocket API.
This should make the module more compliant with libraries that use the WebSocket API.

Thanks to @pixeldrew for [reporting](https://github.com/grafana/xk6-websockets/issues/75) this :bow:
Thanks to @pixeldrew for [reporting](https://github.com/grafana/xk6-websockets/issues/75) this. :bow:

olegbespalov marked this conversation as resolved.
Show resolved Hide resolved

### Rework of how usage is being collected internally and additional counters [`#3917`](https://github.com/grafana/k6/pull/3917) and [`#3951`](https://github.com/grafana/k6/pull/3951)

As part of working on k6 over the years we have many times wondered if given features is used or if this strange corner case behavior is being used.
As part of working on k6 over the years, we have often wondered if users use certain features or if they see a strange corner case behavior.

We usually made guesses or tried to extrapolate from experience on issues we see or maybe even cloud customers. This unfortunately isn't always easy or possible at all and definitely is very skewed. As such we usually also added warning messages to thing we intend on breaking to let people know and ask them to report if they see problems. This usually see very little activity especially before we make the changes.
We have usually made guesses or tried to extrapolate from experience on issues we see. Unfortunately, this isn't always easy or possible, and it's definitely very skewed. As such, we usually also add warning messages to things we intend to break to inform people and ask them to report problems. But we usually see very little activity, especially before we make changes.

This also only works for things we want to remove, but doesn't help us know if people use new functionality at all or if there are patterns that we do not expect.
This also only works for things we want to remove, and it doesn't help us know if people use new functionality at all or if there are patterns we don't expect.

While k6 has been collecting usage for a while it is usually very surface level stuff, such as how many VUs were run, k6 version, what *internal* modules were loaded and such.
While k6 has been collecting usage for a while, they're surface-level things, such as how many VUs were run, the k6 version, or which *internal* modules were loaded. The system for this was also very rigid, requiring a lot of work to add simple things, such as if someone used the `require` function.

And the system for this was very rigid requiring usually a lot of work to add simple stuff, like if someone used the `require` function.
This process has been reworked to make things easier, and a few new usage reports have been added:

This has been reworked to make this a lot easier to do and a few new usage reports have been added:
- when cloud is used it will also tell us which test run it is. We already have most if not actually more of the information reported through metrics and it being ran in the cloud. But this will also help us filter cloud from not cloud runs easier and also potentially tell cloud users that they are using experimental modules that are to be removed soon.
- number of files parsed as well as number of ts files parsed. This will be useful both in us figuring out if people use small projects or bigger ones as well as if ts file support is being used.
- usage of `require`. Now that we have ESM native support, using `require` and CommonJS adds complexity. It is interesting to us whether removing this in the future - likely years, given it support in other runtimes, is even feasable.
- usage of `global`. This for help us decide if we can [drop compatility-mode](https://github.com/grafana/k6/issues/3864) differences or even the whole concept of them.
- When Grafana Cloud is used, it will also tell us which test run it is. We already have most of the information reported through metrics and from the test being executed in the cloud. But this will help us filter cloud test runs from local runs and potentially warn cloud users if they're using experimental modules that will be removed.
- The number of files parsed, as well as the number of .ts files parsed. This will help us understand if people use small or big projects and if TypeScript support is being used.
- Usage of `require`. Now that we have ESM native support, using `require` and CommonJS adds complexity. It's interesting to us whether removing this in the future - likely years, given its support in other runtimes, is feasible.
- Usage of `global`. This will help us decide if we can [drop compatibility-mode](https://github.com/grafana/k6/issues/3864) differences or even the whole concept.

## UX improvements and enhancements

Expand Down
Loading