Skip to content

Conversation

@tgauth
Copy link
Collaborator

@tgauth tgauth commented Feb 2, 2026

PR Summary

  • adds whatIfArg within set block in manifest
  • adds deprecation warning when what-if block in manifest is used and removes what-if from capabilities for dsc list
  • splits process_args() into process_get_args() and process_set_delete_args()

PR Context

@tgauth tgauth requested a review from Copilot February 2, 2026 21:54
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

This PR updates the handling of what-if functionality in DSC by introducing a new whatIfArg parameter within the set block of resource manifests, deprecating the standalone whatIf block, and refactoring argument processing to distinguish between get/test operations and set/delete operations.

Changes:

  • Introduces whatIfArg within set/delete blocks to enable native what-if support
  • Adds deprecation warning for resources using the legacy whatIf block and removes WhatIf capability from dsc list output
  • Splits process_args() into process_get_args() and process_set_delete_args() to handle different argument types

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/dsctest/dsctest.dsc.manifests.json Adds test manifest for Test/WhatIfArgKind resource demonstrating new whatIfArg usage
lib/dsc-lib/src/extensions/discover.rs Updates to use process_get_args and GetArgKind type
lib/dsc-lib/src/dscresources/resource_manifest.rs Splits ArgKind into GetArgKind and SetDeleteArgKind, adds WhatIf variant to latter
lib/dsc-lib/src/dscresources/command_resource.rs Refactors argument processing and updates what-if execution logic to check for native support
lib/dsc-lib/src/discovery/command_discovery.rs Removes WhatIf capability from being reported in resource discovery
lib/dsc-lib/locales/en-us.toml Adds deprecation warning message for legacy whatIf operation
dsc/tests/dsc_whatif.tests.ps1 Adds tests for new WhatIfArgKind functionality and synthetic what-if
dsc/src/subcommand.rs Removes WhatIf capability indicator from resource list output

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

@tgauth tgauth requested a review from SteveL-MSFT February 2, 2026 22:00
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.

Add new arg type for set and delete to support what-if

1 participant