fix(go): preserve coverage output from go test -cover on passing runs#1906
Open
tylern91 wants to merge 1 commit into
Open
fix(go): preserve coverage output from go test -cover on passing runs#1906tylern91 wants to merge 1 commit into
tylern91 wants to merge 1 commit into
Conversation
Coverage lines arrive as package-level output events with no Test field,
causing filter_go_test_json() to route them to package_fail_output which
is only emitted on failures. Add coverage Vec<String> to PackageResult,
detect starts_with("coverage:") in the output handler, and append
per-package coverage below the passing summary line.
Closes rtk-ai#1765
Author
|
@aeppling friendly bump when you have a chance to take a look — thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
coverage:lines infilter_go_test_json()and route them to a dedicatedcoveragefield onPackageResult, notpackage_fail_output-coverRoot Cause
Coverage lines arrive as package-level output JSON events (no
Testfield). The handler previously pushed all package-level output topackage_fail_output, which is only emitted whenpackage_failed == true. On passing runs, coverage data was silently discarded.Output Format
Test plan
test_filter_go_test_cover_output_preserved()verifying coverage lines appear in passing-run outputcargo fmt --all && cargo clippy --all-targets && cargo test --all— 1871 passed, 0 failures-coverunchanged (coverage vec empty, indented block skipped)Closes #1765