Fix export for filecontent resource - #1723
Open
Steve Lee (SteveL-MSFT) wants to merge 2 commits into
Open
Steve Lee (SteveL-MSFT) wants to merge 2 commits into
Steve Lee (SteveL-MSFT) wants to merge 2 commits into
Conversation
Steve Lee (SteveL-MSFT)
requested review from
Mikey Lombardi (He/Him) (michaeltlombardi)
and
a lite review from Copilot
September 16, 2026 23:47
Copilot started reviewing on behalf of
Steve Lee (SteveL-MSFT)
September 16, 2026 23:48
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Update localized diagnostics so they no longer advertise the removed export operation.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates the FileContent resource to rely on DSC’s get fallback for export.
Changes:
- Removes the redundant export declaration and implementation.
- Updates export tests to use the DSC CLI.
- Removes obsolete export dispatching.
File summaries
| File | Description |
|---|---|
resources/filecontent/tests/filecontent_export.tests.ps1 |
Tests export through the DSC CLI. |
resources/filecontent/src/main.rs |
Removes export dispatching. |
resources/filecontent/src/file.rs |
Removes duplicate export logic. |
resources/filecontent/filecontent.dsc.resource.json |
Removes the export declaration. |
Review note: Localized diagnostics still advertise export as a supported operation and should be updated.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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 the WG decided that file content should always be returned including
getand not just forexportthere was no need to have a separateexportoperation sincepathis required and can fallback toget. Changes here:exportdeclaration from resource manifest, thesupportsFilteringbeingfalsemeant that the input wasn't be passed to the resource since the resource is expected to return all instances and have the engine perform filtering which doesn't make sense for this resourceexport()since it's literally the same asget()nowdscinstead of calling the exe directly which masked this issue