-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat 'no reports found' as a suboptimal parsing issue (#305)
Part of [TRUNK-14095](https://linear.app/trunk/issue/TRUNK-14095/qa-bug-no-reports-found-message-on-uploads-page) The goal here is to not flag an invalid-level data quality error to the user in the uploads view when a bundle contains one or more empty XML files. See ticket ^ and relevant slack [thread](https://trunk-io.slack.com/archives/C07PYM8K0PQ/p1736980140133479). However, I think we should still track that a bundle contained an empty XML file - so I decided to relegate it's error level to suboptimal (which currently won't show up in the uploads view). So, This PR introduces the concept of 'invalid' & 'suboptimal' junit _parsing_ issues; similar to the paradigm we have for validation issues. A new `BindingsParseResult` struct is introduced such that a Python or JS client can access any invalid / suboptimal parsing issues encountered during junit parsing _in addition_ to the parsed report. This also tangentially cleans up the `validate` CLI command to ensure its output is in line with how we're validating junits in our systems. Example output: ``` max@max-cloudtop:~$ ./src/analytics-cli/target/debug/trunk-analytics-cli validate --junit-paths="test.xml,test2.xml,test3.xml,test4.xml" 2025-01-16T19:54:37 [INFO] - Starting trunk flakytests 0.0.0 (git=714a55e17fa8e1f3c3ab4b480771109b7ac3eadc) rustc=1.80.0-nightly Validating the following 4 files: File set matching test.xml: test.xml File set matching test2.xml: test2.xml File set matching test3.xml: test3.xml File set matching test4.xml: test4.xml test.xml - 0 validation errors, 1 validation warnings OPTIONAL - no reports found test2.xml - 1 validation errors INVALID - multiple reports found test3.xml - 1 test suites, 33 test cases, 0 validation errors, 1 validation warnings OPTIONAL - report has stale (> 1 hour(s)) timestamps test4.xml - 1 test suites, 1 test cases, 0 validation errors, 1 validation warnings OPTIONAL - report has stale (> 1 hour(s)) timestamps 3 files are valid, 1 files are not valid, 3 files have validation warnings ❌ Checking for codeowners file... OPTIONAL - No codeowners file found. max@max-cloudtop:~$ ``
- Loading branch information
Showing
11 changed files
with
380 additions
and
193 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.