Skip to content

Fix not failing discovery when finding unsupported manifests#1445

Open
SteveL-MSFT wants to merge 4 commits intoPowerShell:mainfrom
SteveL-MSFT:discover-ignore
Open

Fix not failing discovery when finding unsupported manifests#1445
SteveL-MSFT wants to merge 4 commits intoPowerShell:mainfrom
SteveL-MSFT:discover-ignore

Conversation

@SteveL-MSFT
Copy link
Member

PR Summary

When DSC encounters a resource manifest it can't deserialize, it fails discovery completely. This was not intended. This can occur when we update the manifests with new fields that an older DSC does not understand. Instead, DSC should only support resources it can deserialize and emit info messages (so they don't show by default) for resources it can't use.

Copilot AI review requested due to automatic review settings March 23, 2026 21:48
@SteveL-MSFT SteveL-MSFT added this to the 3.2-Consider milestone Mar 23, 2026
Copy link
Contributor

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

This PR adjusts DSC resource/extension discovery so that manifests that can’t be loaded/deserialized no longer cause discovery to fail; instead they are skipped and an info-level message is emitted (to avoid showing by default), improving forward/backward compatibility when manifest schemas evolve.

Changes:

  • Skip (instead of failing) when load_manifest(...) errors during extension discovery; emit an info log with context.
  • Downgrade some discovery failure logs to info and add localized failedLoadManifest messages.
  • Add PowerShell tests asserting invalid manifests don’t break overall discovery and that an info message is produced.

Reviewed changes

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

Show a summary per file
File Description
lib/dsc-lib/src/extensions/discover.rs Handles load_manifest failures by logging at info and continuing.
lib/dsc-lib/src/discovery/mod.rs Changes discovery-type failure logging from error to info.
lib/dsc-lib/src/discovery/command_discovery.rs Logs manifest-load failures as localized info messages.
lib/dsc-lib/locales/en-us.toml Adds failedLoadManifest localized strings for discovery and extension contexts.
dsc/tests/dsc_extension_discover.tests.ps1 Adds test ensuring invalid extension-discovered manifests don’t fail overall discovery.
dsc/tests/dsc_discovery.tests.ps1 Adds test ensuring invalid resource manifests generate an info message.

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

Steve Lee (POWERSHELL HE/HIM) (from Dev Box) added 2 commits March 23, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants