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

SCSensitivityLabel: Parameter Settings needs to be renamed or DSCParser needs to support parameter named "Settings" #2314

Closed
andikrueger opened this issue Sep 21, 2022 · 2 comments · Fixed by #2370 or #2371

Comments

@andikrueger
Copy link
Collaborator

The SCSensitivityLabel resource is using a Settings parameter. This works fine when extracting the configuration, but the Delta report and Documentation generation is using the DSCParser module. That module is treating this Settings parameter incorrectly. This needs to get changed to another name, which is a breaking change.

Originally posted by @ykuijs in #1880 (comment)

Changing this parameters name to LabelSetting should resolve the issue.

[Write, Description("The locale settings display names."),EmbeddedInstance("MSFT_SCLabelSetting")] String Settings[];

This change would need to be made within the module as well.

@NikCharlebois
Copy link
Collaborator

I have not yet done any investigation, but it may make more sense to modify DSCParser to properly handle the Settings parameter. Ideally we would like to keep the parameter set of the resources aligned with the properties of the related cmdlet.

@andikrueger andikrueger changed the title SCSensitivityLabel: Parameter Settings needs to be renamed SCSensitivityLabel: Parameter Settings needs to be renamed or DSCParser needs to support parameter named "Settings" Sep 21, 2022
@ykuijs
Copy link
Member

ykuijs commented Oct 1, 2022

The AST sees the Settings parameter as a Keyword, causing the DSCParser to fail. Of course we can change the DSCParser to ignore Settings being a keyword, but this is solving the symptom instead of the root cause. I prefer not using keywords as parameter.

To prevent these types of issues we can add a genetic test to the unit test. That way we detect these issue when a PR is created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants