fix: surface subprocess errors when pytest XML is missing#2141
Merged
KRRT7 merged 1 commit intofix/test-files-silent-dedupfrom May 8, 2026
Merged
fix: surface subprocess errors when pytest XML is missing#2141KRRT7 merged 1 commit intofix/test-files-silent-dedupfrom
KRRT7 merged 1 commit intofix/test-files-silent-dedupfrom
Conversation
5 tasks
38c2445 to
3e83a5c
Compare
184dae6 to
a2ddf54
Compare
3e83a5c to
1728cd4
Compare
When the test subprocess exits non-zero and produces no JUnit XML, log the return code and stdout/stderr at WARNING level so the root cause is visible in CI logs. Previously this was a generic "No test results found" message that made Windows CI flakes impossible to diagnose. Also fixes pre-existing mypy strict errors in parse_xml.py: - Add return type to _parse_func - Type CompletedProcess[str] (subprocess uses text=True) - Parameterize generic types (tuple, re.Match) - Remove dead .decode() branches (stdout is already str)
1728cd4 to
aa98bc1
Compare
a2ddf54 to
81b0358
Compare
Base automatically changed from
fix/windows-junitxml-path
to
fix/test-files-silent-dedup
May 8, 2026 00:09
aseembits93
reviewed
May 8, 2026
| if not test_xml_file_path.exists(): | ||
| logger.warning(f"No test results for {test_xml_file_path} found.") | ||
| if run_result is not None and run_result.returncode != 0: | ||
| stderr_snippet = (run_result.stderr or "")[:500] |
Contributor
There was a problem hiding this comment.
why 500? why not the entire string?
aseembits93
reviewed
May 8, 2026
| except AttributeError: | ||
| stdout = run_result.stderr | ||
| logger.debug(f"Test log - STDOUT : {stdout} \n STDERR : {stderr}") | ||
| logger.debug(f"Test log - STDOUT : {run_result.stdout} \n STDERR : {run_result.stderr}") |
Contributor
There was a problem hiding this comment.
you removed the try except here. are you sure there will be no exceptions?
aseembits93
approved these changes
May 8, 2026
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
Stack
Part of #2132 linear stack.
Test plan