Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parameters to work with property values #294

Merged
merged 10 commits into from Jan 17, 2024

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Jan 16, 2024

PR Summary

Before this PR, resources were being statically validated against their schema. This fails because a property value may use an expression and that string may fail schema validation as the expression hasn't been invoked yet. This change moves resource input validation later when the resource is actually getting invoked and expressions have been invoked.

There was also an issue where string parameters were being returned enclosed in quotes, this PR also fixes that issue.

Also added mock validate implementation for PowerShellGroup and WmiGroup resources rather than have code in DSC to skip validation.

Copy link
Collaborator

@anmenaga anmenaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Jan 17, 2024
Merged via the queue into PowerShell:main with commit ff71f3e Jan 17, 2024
4 checks passed
@SteveL-MSFT SteveL-MSFT deleted the validate-after-expression branch January 17, 2024 18:03
michaeltlombardi added a commit to michaeltlombardi/DSC that referenced this pull request Feb 5, 2024
This change adds documentation to the CLI and schema reference
for the parameters support  implementation in PowerShell#291 and PowerShell#294. It
also updates the changelog with the relevant information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants