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 k6 v0.30.0 #1809

Merged
merged 1 commit into from
Jan 20, 2021
Merged

Release k6 v0.30.0 #1809

merged 1 commit into from
Jan 20, 2021

Conversation

na--
Copy link
Member

@na-- na-- commented Jan 19, 2021

Reviewing the release notes probably is easiest by looking at them rendered: https://github.com/loadimpact/k6/blob/release-v0.30.0/release%20notes/v0.30.0.md

The current planned release date for v0.30.0 is tomorrow. Before that, I plan to make the jslib PR with the v0.0.1 JS summary functions, and hopefully also at least a WIP docs PR (help appreciated here)...

Copy link
Contributor

@imiric imiric left a comment

Choose a reason for hiding this comment

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

Nice work @na--! 👏 Just spotted some minor things.

release notes/v0.30.0.md Outdated Show resolved Hide resolved
release notes/v0.30.0.md Outdated Show resolved Hide resolved

Notice how `Loading users.json` is logged only once, but each VU uses the `users` variable like a normal JS array. The data is read only once and we have just a single copy of the huge array in memory! Behind the scenes, k6 uses a JS [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) to transparently copy only the row each VU requests in `users[randomUserID]` to it. This on-demand copying is a bit inefficient, but it's still leagues better than having a copy of the huge array in every VU! And you can avoid the copying in every iteration by pinning the data used by every VU and having `let user = users[randomUserID]` in the [init context](https://k6.io/docs/using-k6/test-life-cycle)!

And yes, you can have multiple `SharedArray` objects in the same script, just make sure to give them unique names - this is what `someName` in the script above was for. Because VUs are independent JS runtimes, we need some way to differentiate between the different shared memory objects, so we require them to have unique names. These names are also the IDs that any [xk6](https://github.com/k6io/xk6) extensions would need to use to access them.
Copy link
Contributor

Choose a reason for hiding this comment

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

The last sentence is a bit confusing. Why mention xk6 here at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

To give some more exposure to xk6 and for SEO 🤣 But also because this feature can be useful to any xk6 plugin authors - both for accessing SharedArrays, but also for implementing something similar to it, see https://github.com/loadimpact/k6/blob/45fff81b0b3af8d174c960450d16f5c4431ef9a4/js/common/initenv.go#L82-L84

Copy link
Contributor

Choose a reason for hiding this comment

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

Hhmm seems out of place to me, since we'd have to expand on what you mean, and that's too much detail for the release notes. But OK.

release notes/v0.30.0.md Outdated Show resolved Hide resolved
release notes/v0.30.0.md Show resolved Hide resolved
release notes/v0.30.0.md Outdated Show resolved Hide resolved
Copy link
Contributor

@mstoykov mstoykov left a comment

Choose a reason for hiding this comment

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

LGTM!. Mostly problems with some of the wording in the handleSummary section, and asking for some more links to relevant documentation that we(especially me) should've probably already started writing ... :(

release notes/v0.30.0.md Show resolved Hide resolved
release notes/v0.30.0.md Outdated Show resolved Hide resolved
release notes/v0.30.0.md Outdated Show resolved Hide resolved
release notes/v0.30.0.md Show resolved Hide resolved

And yes, you can have multiple `SharedArray` objects in the same script, just make sure to give them unique names - this is what `someName` in the script above was for. Because VUs are independent JS runtimes, we need some way to differentiate between the different shared memory objects, so we require them to have unique names. These names are also the IDs that any [xk6](https://github.com/k6io/xk6) extensions would need to use to access them.

This works both locally and in the cloud. We advise everyone that deals with huge data files to wrap them in a `SharedArray` and give this new feature a try. The required script changes should be minimal, while the benefits should be significant. Hopefully, we can finally consider one of the biggest blockers k6 users have had for a long time solved! :tada:
Copy link
Contributor

Choose a reason for hiding this comment

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

I vote for having the required changes (with a few examples) spelled out in the docs and that being linked from here. This will at least give us something to link to whenever people ask what "wrap them in a SharedArray" means.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 for that, we should include it in the docs PR after we release

release notes/v0.30.0.md Outdated Show resolved Hide resolved
release notes/v0.30.0.md Outdated Show resolved Hide resolved
release notes/v0.30.0.md Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Jan 20, 2021

Codecov Report

Merging #1809 (7f130a6) into master (6fd077d) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1809      +/-   ##
==========================================
- Coverage   71.61%   71.59%   -0.02%     
==========================================
  Files         181      181              
  Lines       13939    13939              
==========================================
- Hits         9982     9980       -2     
- Misses       3324     3326       +2     
  Partials      633      633              
Flag Coverage Δ
ubuntu 71.54% <ø> (ø)
windows 70.17% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/consts/consts.go 0.00% <ø> (ø)
lib/testutils/minirunner/minirunner.go 76.08% <0.00%> (-4.35%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fd077d...7f130a6. Read the comment docs.

imiric
imiric previously approved these changes Jan 20, 2021
Copy link
Contributor

@imiric imiric left a comment

Choose a reason for hiding this comment

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

:shipit:

mstoykov
mstoykov previously approved these changes Jan 20, 2021
@na-- na-- dismissed stale reviews from mstoykov and imiric via bf633cb January 20, 2021 12:37
@na-- na-- merged commit 2193de0 into master Jan 20, 2021
@na-- na-- deleted the release-v0.30.0 branch January 20, 2021 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants