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

(maint) Update optional parameters #671

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

mhashizume
Copy link
Contributor

As part of 404df9d all parameters in this module were assigned a data type. However, some required parameters were mistakenly classed as Optional and vice-versa.

Puppet's documentation states "If a class parameter lacks a default value, the parameter is considered required."[1]

This commit updates all parameters with default values to Optional (and whatever other relevant data type) and all parameters without default value as required. The REFERENCE.md has been updated to reflect these changes.

Additionally, this commit updates all Optional parameters be set as undef, as suggested by the optional_default puppet-lint check.

[1] https://www.puppet.com/docs/puppet/7/lang_classes#class-parameters-and-variables

@mhashizume mhashizume requested a review from a team as a code owner September 23, 2023 20:03
@mhashizume mhashizume force-pushed the maint/main/optional-parameters branch 5 times, most recently from 4415e16 to 39a5d08 Compare September 24, 2023 04:54
As part of 404df9d all parameters in this module were assigned a data
type. However, some required parameters were mistakenly classed as
Optional and vice-versa.

Puppet's documentation states "If a class parameter lacks a default
value, the parameter is considered required."[1]

This commit updates all parameters with default values to Optional (and
whatever other relevant data type) and all parameters without default
value as required. The REFERENCE.md has been updated to reflect these
changes.

Additionally, this commit updates all Optional parameters be set as
undef, as suggested by the optional_default puppet-lint check.

[1] https://www.puppet.com/docs/puppet/7/lang_classes#class-parameters-and-variables
@mhashizume mhashizume force-pushed the maint/main/optional-parameters branch from 39a5d08 to 74e022d Compare September 26, 2023 17:59
@mhashizume mhashizume added the maintenance Maintenance chores are typically excluded from changelogs label Sep 26, 2023
@AriaXLi AriaXLi merged commit a078e0d into puppetlabs:main Sep 26, 2023
16 checks passed
@mhashizume mhashizume deleted the maint/main/optional-parameters branch September 28, 2023 19:39
@mhashizume mhashizume added bug Something isn't working and removed maintenance Maintenance chores are typically excluded from changelogs labels Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants