Skip to content

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Oct 1, 2025

PR Summary

Add error handling when an extension fails discovery to emit a warning message instead of bubbling up the error which causes discovery to entirely fail

Unrelated, but prevented local clippy run, needed to change build.ps1 to use rustup explicitly to install clippy since msrustup doesn't support installing it.

PR Context

Fix #1150

@SteveL-MSFT SteveL-MSFT requested a review from Copilot October 1, 2025 21:13
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds graceful error handling so that a single extension discovery failure no longer aborts overall resource discovery. Introduces a localized warning message and a test validating that discovery continues when an extension fails.

  • Wraps extension.discover() in match, logs warn! and continues on error
  • Adds new localization string extensionDiscoverFailed
  • Adds test ensuring discovery proceeds after an extension failure on Windows

Reviewed Changes

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

File Description
dsc_lib/src/discovery/command_discovery.rs Added error-handling around extension discovery to continue on individual failures
dsc_lib/locales/en-us.toml Added new localized warning string for failed extension discovery
dsc/tests/dsc_extension_discover.tests.ps1 Added test to verify discovery continues when an extension fails

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Steve Lee (POWERSHELL HE/HIM) (from Dev Box) added 2 commits October 1, 2025 14:19
@SteveL-MSFT SteveL-MSFT merged commit f3d1b42 into PowerShell:main Oct 2, 2025
4 checks passed
@SteveL-MSFT SteveL-MSFT deleted the ext-discover-error branch October 2, 2025 20:46
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.

resource list fails if any resource cannot find its discovery executable

1 participant