feat: implement export filter functionality for resource exports#1621
Open
Gijsreyn wants to merge 7 commits into
Open
feat: implement export filter functionality for resource exports#1621Gijsreyn wants to merge 7 commits into
Gijsreyn wants to merge 7 commits into
Conversation
ba1baec to
664abad
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Implements engine-side post-filtering for dsc config export results via a new exportFilter resource directive, enabling consistent wildcard/equality filtering even for resources that don’t implement native export filtering.
Changes:
- Adds
exportFilterto the configuration resource directives schema and applies it in the export pipeline afterresource.export(...). - Introduces
configure::export_filtermatching logic (case-insensitive*wildcard for strings; OR across filter objects, AND within each object) plus unit tests. - Adds Pester coverage for
exportFilterbehavior and updates thedsctestexport resource to emit anameproperty for filtering.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/dsctest/src/main.rs | Emits per-instance name values to enable filter-driven tests. |
| tools/dsctest/src/export.rs | Extends the test export payload schema with optional name. |
| lib/dsc-lib/src/dscresources/command_resource.rs | Adjusts when “export filtering not supported” is raised (only for non-empty input). |
| lib/dsc-lib/src/configure/mod.rs | Wires exportFilter from directives into the export pipeline. |
| lib/dsc-lib/src/configure/export_filter.rs | Adds the engine-side filtering implementation + Rust unit tests. |
| lib/dsc-lib/src/configure/config_doc.rs | Adds export_filter directive field to the config document model/schema. |
| lib/dsc-lib/locales/en-us.toml | Adds localized message for filter reduction logging. |
| dsc/tests/dsc_export.tests.ps1 | Adds integration tests validating exportFilter behavior across scenarios. |
| dsc/src/resource_command.rs | Updates call site for the changed export helper function signature. |
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
Adds engine-side post-filtering for export via a new exportFilter resource directive.
PR Context
Fixes #1486.