Skip to content

feat: add failure diagnostics collection for Github Actions#664

Draft
svasista-ms wants to merge 1 commit into
microsoft:mainfrom
svasista-ms:add-winget-failure-diagnostics
Draft

feat: add failure diagnostics collection for Github Actions#664
svasista-ms wants to merge 1 commit into
microsoft:mainfrom
svasista-ms:add-winget-failure-diagnostics

Conversation

@svasista-ms

Copy link
Copy Markdown
Contributor

TBD

Copilot AI review requested due to automatic review settings June 2, 2026 02:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a reusable composite GitHub Action to collect network and service diagnostics when WinGet or PowerShell Gallery operations fail, and wires it into existing WinGet installation actions to automatically emit that context on CI failures.

Changes:

  • Add a new composite action (winget-failure-diagnostics) that prints runner environment, egress IP, network config, service probes, and recent WinGet logs.
  • Invoke the diagnostics action on failure from the existing install-winget (PSGallery scope) and install-winget-package (WinGet scope) composite actions.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/actions/winget-failure-diagnostics/action.yaml New composite action to gather WinGet/PSGallery failure diagnostics.
.github/actions/install-winget/action.yaml Runs diagnostics action on failure for PSGallery-related install failures.
.github/actions/install-winget-package/action.yaml Runs diagnostics action on failure for WinGet package install failures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


Write-Host "--- $Label : $Method $Url ---"
try {
$resp = Invoke-WebRequest -Uri $Url -Method $Method -UseBasicParsing -MaximumRedirection 0 -TimeoutSec 15 -ErrorAction Stop
@codecov-commenter

codecov-commenter commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.61%. Comparing base (a90b267) to head (d69583a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #664   +/-   ##
=======================================
  Coverage   79.61%   79.61%           
=======================================
  Files          26       26           
  Lines        5544     5544           
  Branches     5544     5544           
=======================================
  Hits         4414     4414           
  Misses       1001     1001           
  Partials      129      129           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants