[devops] Show "(Publish failed)" instead of broken VSDrops link when html report publish fails.#25233
[devops] Show "(Publish failed)" instead of broken VSDrops link when html report publish fails.#25233rolfbjarne wants to merge 5 commits intomainfrom
Conversation
…html report publish fails. When the "Publish to Artifact Services Drop" step times out or fails, the VSDrops link in the GitHub comment would point to a non-existent page. Now detect the failure by setting an output variable when the step does not succeed, and show "(Publish failed)" in plain text instead of a broken link. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the DevOps pipeline and GitHub comment formatting to avoid posting a broken VSDrops HTML report link when publishing to VSDrops fails/timeouts.
Changes:
- Add pipeline steps intended to detect VSDrops publish failures and expose the result as an output variable.
- Update test-results comment generation to display “(Publish failed)” instead of a VSDrops link when the publish failed.
- Plumb the new output variable through the stage-dependencies parsing into
TestResult.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tools/devops/automation/templates/tests/run-tests.yml | Adds steps around the VSDrops publish to capture status and attempt to set an output variable on failure. |
| tools/devops/automation/templates/mac/build.yml | Same status-capture/output-variable approach for mac build/test jobs publishing to VSDrops. |
| tools/devops/automation/scripts/TestResults.psm1 | Adds a flag to suppress the VSDrops link in GitHub comments and parses the new output variable from job outputs. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…tion.
- Use condition: failed('publishVSDrops') instead of comparing
$AGENT_JOBSTATUS before/after, which reliably detects publish
failures even when the job was already Failed.
- Add Sort-Object | Select-Object -Last 1 to VSDROPS_PUBLISHED key
lookup to handle retries/attempts deterministically.
- Change text from '(Publish failed)' to
'(:warning: Html Report Publish failed :warning:)'.
- Add Pester test for VSDrops publish failed behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Azure DevOps step conditions don't support failed('stepName') -
that syntax only works for jobs and stages. Revert to the
before/after AGENT_JOBSTATUS comparison, which is the only
reliable way to detect individual step failures in Azure DevOps.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #b8e5d27] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #b8e5d27] Build passed (Build packages) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [PR Build #b8e5d27] Build passed (Build macOS tests) ✅Pipeline on Agent |
🔥 [CI Build #b8e5d27] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 18 tests failed, 138 tests passed. Failures❌ interdependent-binding-projects tests2 tests failed, 2 tests passed.Failed tests
Html Report (VSDrops) Download ❌ introspection tests4 tests failed, 2 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (iOS)11 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ Tests on macOS Monterey (12) tests1 tests failed, 4 tests passed.Failed tests
Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
When the "Publish to Artifact Services Drop" step times out or fails, the VSDrops
link in the GitHub comment would point to a non-existent page. Now detect the
failure by setting an output variable when the step does not succeed, and show
"(Publish failed)" in plain text instead of a broken link.