fix(xcresult): support new 'Skip Message' test node type#1124
Closed
TylerJang27 wants to merge 2 commits into
Closed
fix(xcresult): support new 'Skip Message' test node type#1124TylerJang27 wants to merge 2 commits into
TylerJang27 wants to merge 2 commits into
Conversation
Newer Xcode (26.x) xcresulttool emits a 'Skip Message' child node (the XCTSkip reason, analogous to 'Failure Message') in the output of 'xcrun xcresulttool get test-results tests'. Our TestNodeType enum is codegen'd by typify from this snapshotted JSON schema and did not include that variant, so serde rejected the entire document and the whole .xcresult -> JUnit conversion failed: failed to parse json from xcresulttool output: unknown variant `Skip Message`, expected one of `Test Plan`, ... Any run containing a skipped test on a newer Xcode lost all of its xcresult-derived results (the --xcresult-path flow failed the whole upload; the glob flow silently dropped the bundle). Add 'Skip Message' to the TestNodeType enum so the document parses. Skipped tests are already handled via TestResult::Skipped, and all TestNodeType usages are non-exhaustive matches!/filter, so no match arms change. Sentry: ANALYTICS-CLI-6W2 / ANALYTICS-CLI-6W3
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Mirror the existing Failure Message handling: collect 'Skip Message' child nodes of a skipped test case and set their text as the JUnit skipped message. Build-verified; node placement should be confirmed during QA against a real skip xcresult.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1124 +/- ##
==========================================
+ Coverage 82.37% 82.61% +0.24%
==========================================
Files 69 69
Lines 15381 15396 +15
==========================================
+ Hits 12670 12720 +50
+ Misses 2711 2676 -35 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What
Add
Skip Messageto theTestNodeTypeenum in the xcresult test-results JSON schema.Why
Newer Xcode (26.x)
xcresulttoolemits aSkip Messagechild node (theXCTSkipreason, analogous toFailure Message) in the output ofxcrun xcresulttool get test-results tests.TestNodeTypeis codegen'd by typify from this snapshotted schema and lacked that variant, so serde rejected the entire document and the whole.xcresult-> JUnit conversion failed:Any run containing a skipped test on a newer Xcode lost all of its xcresult-derived results (the
--xcresult-pathflow failed the whole upload; the glob flow silently dropped the bundle).Change
One-line schema add;
build.rs/typify regenerates#[serde(rename = "Skip Message")] SkipMessage. Skipped tests are already handled viaTestResult::Skipped, and allTestNodeTypeusages are non-exhaustivematches!/filter, so no match arms change. Verified withcargo build -p xcresult.Follow-ups (not in this PR)
.xcresultwith an XCTSkip'd test from the newer Xcode.TestNodeTypeto tolerate unknown variants so future Apple schema drift degrades gracefully instead of dropping the whole upload.Sentry: ANALYTICS-CLI-6W2 / ANALYTICS-CLI-6W3