Skip to content

Backport: Fix discovering incompatible resource manifests to be non-fatal#1446

Open
SteveL-MSFT wants to merge 11 commits intoPowerShell:release/v3.1from
SteveL-MSFT:discover-invalid
Open

Backport: Fix discovering incompatible resource manifests to be non-fatal#1446
SteveL-MSFT wants to merge 11 commits intoPowerShell:release/v3.1from
SteveL-MSFT:discover-invalid

Conversation

@SteveL-MSFT
Copy link
Member

PR Summary

When having both 3.1 and 3.2-preview installed, 3.1 fails because during discovery it finds the 3.2 resources which have an updated manifest that 3.1 doesn't deserialize. This ends up stopping the entire discovery process making 3.1 unusable.

This change handles the case whether an extension or DSC itself finds an incompatible resource manifest and emits an info message and skips that resource. This means that any future changes to the schema won't break the existing version.

@SteveL-MSFT SteveL-MSFT requested a review from Copilot March 24, 2026 22:18
@SteveL-MSFT SteveL-MSFT changed the title Fix discovering incompatible resource manifests to be non-fatal Backport: Fix discovering incompatible resource manifests to be non-fatal Mar 24, 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

Addresses a discovery failure mode where encountering an incompatible/invalid resource manifest (e.g., from a newer DSC/extension version) aborts discovery, making older versions unusable when both are installed.

Changes:

  • Make extension-driven discovery skip manifests that fail to load, logging an info message instead of failing discovery.
  • Make command-based discovery log invalid manifest load failures as info (localized) and continue.
  • Add PowerShell tests asserting invalid manifests are skipped and produce INFO log entries.

Reviewed changes

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

Show a summary per file
File Description
dsc_lib/src/extensions/dscextension.rs Swallows load_manifest failures during extension discovery and logs at info while continuing.
dsc_lib/src/dscerror.rs Removes an unused tracing::error import.
dsc_lib/src/discovery/command_discovery.rs Changes invalid manifest logging from warn! to localized info! and continues discovery.
dsc_lib/locales/en-us.toml Adds new localized strings for “failed to load manifest” scenarios.
dsc/tests/dsc_extension_discover.tests.ps1 Adds coverage ensuring invalid manifests returned by an extension don’t break overall discovery.
dsc/tests/dsc_discovery.tests.ps1 Adds coverage ensuring invalid resource manifests produce an INFO message and don’t fail listing.
build.ps1 Updates clippy “unclean” project path entries.

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

Steve Lee (POWERSHELL HE/HIM) (from Dev Box) added 3 commits March 24, 2026 15:31
@SteveL-MSFT SteveL-MSFT requested a review from tgauth March 25, 2026 20:25
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