Backport: Fix discovering incompatible resource manifests to be non-fatal#1446
Open
SteveL-MSFT wants to merge 11 commits intoPowerShell:release/v3.1from
Open
Backport: Fix discovering incompatible resource manifests to be non-fatal#1446SteveL-MSFT wants to merge 11 commits intoPowerShell:release/v3.1from
SteveL-MSFT wants to merge 11 commits intoPowerShell:release/v3.1from
Conversation
Contributor
There was a problem hiding this comment.
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
infomessage 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
INFOlog 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.
adityapatwardhan
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
infomessage and skips that resource. This means that any future changes to the schema won't break the existing version.