Skip to content

Conversation

dvordrova
Copy link
Contributor

@dvordrova dvordrova commented Mar 20, 2025

What?

Fix easyjson behaviour when buffer grows

Why?

Tried to output samples as json and it failed

Checklist

  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests for my changes.
  • I have run linter and tests locally (make check) and all pass.

Checklist: Documentation (only for k6 maintainers and if relevant)

Please do not merge this PR until the following items are filled out.

  • I have added the correct milestone and labels to the PR.
  • I have updated the release notes: link
  • I have updated or added an issue to the k6-documentation: grafana/k6-docs#NUMBER if applicable
  • I have updated or added an issue to the TypeScript definitions: grafana/k6-DefinitelyTyped#NUMBER if applicable

Related PR(s)/Issue(s)

@dvordrova dvordrova requested a review from a team as a code owner March 20, 2025 23:38
@dvordrova dvordrova requested review from mstoykov and olegbespalov and removed request for a team March 20, 2025 23:38
@CLAassistant
Copy link

CLAassistant commented Mar 20, 2025

CLA assistant check
All committers have signed the CLA.

@dvordrova dvordrova force-pushed the fix/tagset-json-buffer-content branch from 7bae65a to 3cccf05 Compare March 20, 2025 23:46
mstoykov
mstoykov previously approved these changes Mar 21, 2025
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.

Thank you for the contribution 🙇

Looking at the code I see what the problem is, but can't figure out how have we not hit this earlier for the last 3 years. I also can not reproduce it locally :(

Do I understand correctly that you produced this, just by using -o json ?

@dvordrova
Copy link
Contributor Author

dvordrova commented Mar 21, 2025

Looking at the code I see what the problem is, but can't figure out how have we not hit this earlier for the last 3 years. I also can not reproduce it locally :(

Do I understand correctly that you produced this, just by using -o json ?

I produced it when wrote plugin for xk6 and needed some debug output for samples, not sure that is the thing with -o json

Co-authored-by: Mihail Stoykov <312246+mstoykov@users.noreply.github.com>
@mstoykov
Copy link
Contributor

Looked into it more and the json output doesn't use this at all.

I guess this was only used for the old cloud output, and I guess it had bugs then as well 🤦

Given the current lack of usage, I wonder if we should be going through the trouble of using easyjson for htis at all 🤔

cc @grafana/k6-core

@mstoykov mstoykov added this to the v1.0.0-rc1 milestone Mar 21, 2025
@mstoykov mstoykov merged commit 2e66f47 into grafana:master Mar 21, 2025
28 checks passed
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.

4 participants