Uh oh!
There was an error while loading. Please reload this page.
Deduplicate published-results parsing in Azure DevOps client - #10735
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d952f592-db2e-4a30-b46d-312c105eca7c
There was a problem hiding this comment.
Note
🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.
✅ 22/22 dimensions clean — no findings.
Small, well-scoped refactoring: the duplicated try/catch/parse-response blocks in PublishTestResultsWithSubResultsAsync and UpdateTestResultsWithSubResultsAsync are consolidated into the private TryReadAndParsePublishedResultsAsync helper. Parameter forwarding (readTimeoutToken, userCancellationToken, validateAutomatedTestName) is correct, trimming/AOT suppression attributes are correctly carried to the helper, and no behavioral change is introduced. No test changes needed for a purely mechanical extraction.
There was a problem hiding this comment.
Pull request overview
Deduplicates Azure DevOps response parsing while preserving validation and cancellation behavior.
Changes:
- Extracts shared parsing and exception handling into one helper.
- Reuses it for publish and update paths.
Show a summary per file
| File | Description |
|---|---|
AzureDevOpsTestResultsClient.cs | Centralizes published-result response handling. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
Uh oh!
There was an error while loading. Please reload this page.
Publishing and updating Azure DevOps test results duplicated the same response parsing and non-retry exception handling, making the two paths easier to drift apart.
Extract the shared behavior into
TryReadAndParsePublishedResultsAsyncand use it from both paths while preserving their distinct result validation and user-cancellation semantics.Tests:
AzureDevOpsLivePublishingTests(128 passed).Fixes#10732