Add new Microsoft.Windows/WindowsFeatureList resource#1541
Draft
Gijsreyn wants to merge 4 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new Rust-based DSC v3 resource for managing Windows Features via the DISM API, including schema/manifest wiring and Pester tests.
Changes:
- Introduces
Microsoft.Windows/WindowsFeatureListresource manifest + build/workspace registration. - Implements DISM-based get/set/export operations (including what-if and wildcard filtering for export).
- Adds Pester tests covering get/set/export and what-if behaviors.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/windows_feature/windows_feature.dsc.resource.json | Defines the DSC v3 resource manifest and embedded JSON schema for WindowsFeatureList. |
| resources/windows_feature/src/main.rs | Implements CLI entrypoint and argument parsing for get/set/export operations. |
| resources/windows_feature/src/dism.rs | Adds dynamic DISM API loading and feature operations (get, enable, disable, enumerate). |
| resources/windows_feature/src/get.rs | Implements resource get operation over DISM feature info. |
| resources/windows_feature/src/set.rs | Implements resource set operation, what-if metadata, and restart-required metadata emission. |
| resources/windows_feature/src/export.rs | Implements export with optional filters and wildcard matching optimization. |
| resources/windows_feature/src/types.rs | Defines serializable types for input/output and filter matching logic. |
| resources/windows_feature/src/util.rs | Adds DISM state mapping and wildcard/exact filter helpers. |
| resources/windows_feature/locales/en-us.toml | Adds localized strings for errors and what-if messages. |
| resources/windows_feature/Cargo.toml | Declares the new Rust crate/binary for the resource. |
| resources/windows_feature/.project.data.json | Registers the resource for packaging/copying the manifest. |
| resources/windows_feature/tests/windows_feature_get.tests.ps1 | Adds Pester tests for get behavior and validation. |
| resources/windows_feature/tests/windows_feature_set.tests.ps1 | Adds Pester tests for set behavior, idempotency, and validation. |
| resources/windows_feature/tests/windows_feature_export.tests.ps1 | Adds Pester tests for export behavior and filtering (including wildcard). |
| resources/windows_feature/tests/windows_featurelist_whatif.tests.ps1 | Adds Pester tests for what-if behavior asserting no mutation + metadata. |
| lib/dsc-lib-registry/src/config.rs | Aligns Metadata serialization to camelCase without explicit rename on what_if. |
| data.build.json | Registers the new resource artifacts for build/package output. |
| Cargo.toml | Adds the new crate to workspace members/default-members and Windows group. |
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
Add new
Microsoft.Windows/WindowsFeatureListresource, including whatIf support.Note
In an earlier pull request, the rename was removed from the struct. To keep it consistent, I also removed it from the registry library.
PR Context
Fixes #1540.