Skip to content

fix: don't inject -json for go test -bench runs - #1610

Merged
aeppling merged 1 commit into
rtk-ai:developfrom
mykaul:fix/go-bench-no-json
May 8, 2026
Merged

aeppling merged 1 commit into
rtk-ai:developfrom
mykaul:fix/go-bench-no-json

Conversation

@mykaul

@mykaul mykaul commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Skip -json injection when -bench is present in go test args
  • Use passthrough filter instead of filter_go_test_json for benchmark runs
  • Benchmark output is already compact and useful; the JSON filter was discarding it

Fixes #1609

@CLAassistant

CLAassistant commented Apr 29, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@pszymkowiak pszymkowiak added bug Something isn't working effort-small Quelques heures, 1 fichier filter-quality Filter produces incorrect/truncated signal labels Apr 29, 2026
@pszymkowiak

Copy link
Copy Markdown
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

This PR fixes go test benchmark runs by skipping the -json flag injection when -bench is present in the arguments. It uses a passthrough filter instead of filter_go_test_json for benchmark runs, since benchmark output is already compact and the JSON filter was discarding it.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #1609


Analyzed automatically by wshm · This is an automated analysis, not a human review.

@mykaul

mykaul commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

CI failure - unsure about it.

@aeppling

aeppling commented May 7, 2026

Copy link
Copy Markdown
Contributor

Hey, this is correct fix, please just target develop branch and retag me so we can merge :)

Thanks for contribution

When -bench is present, benchmark output is already compact and useful.
Injecting -json causes the filter to discard benchmark results since they
don't produce pass/fail events the JSON parser expects.

Fixes rtk-ai#1609
@mykaul
mykaul force-pushed the fix/go-bench-no-json branch from 431d82c to b058c96 Compare May 8, 2026 06:53
@mykaul

mykaul commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

Hey, this is correct fix, please just target develop branch and retag me so we can merge :)

Thanks for contribution

Done, sorry for the confusion. It is indeed written in the contribution part to work against develop branch, my bad.

@aeppling

aeppling commented May 8, 2026

Copy link
Copy Markdown
Contributor

Hey @mykaul , LGTM !

Thank you for contributing to RTK with this fix !

Should be released by end of week

@aeppling aeppling mentioned this pull request May 8, 2026
@aeppling
aeppling merged commit 380a7c9 into rtk-ai:develop May 8, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working effort-small Quelques heures, 1 fichier filter-quality Filter produces incorrect/truncated signal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rtk for 'go test -bench' fails - since it adds '-json' to it, but benchmarks produce a different output that is not filtered properly

4 participants