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

timeout: switch from String to Integer datatype #2241

Closed
wants to merge 1 commit into from

Conversation

cocker-cc
Copy link
Contributor

Put Parameter $apache::timeout on Datatype Integer instead of String.

@cocker-cc cocker-cc requested a review from a team as a code owner June 9, 2022 08:30
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Cocker Koch seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@puppet-community-rangefinder
Copy link

apache is a class

Breaking changes to this file WILL impact these 144 modules (exact match):
Breaking changes to this file MAY impact these 55 modules (near match):

This module is declared in 174 of 579 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@bastelfreak bastelfreak changed the title Fix Datatype timeout: switch from String to Integer datatype Jun 9, 2022
cocker-cc pushed a commit to cocker-cc/puppetlabs-apache that referenced this pull request Jun 9, 2022
@@ -491,7 +491,7 @@
Optional[Enum['On', 'Off', 'on', 'off']] $ldap_verify_server_cert = undef,
Optional[String] $ldap_trusted_mode = undef,
Boolean $error_documents = false,
String $timeout = '60',
Integer $timeout = 60,
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMHO an integer would be better, but it is a breaking change. Would it be better to make it

Suggested change
Integer $timeout = 60,
Variant[Integer[0], String[1]] $timeout = 60,

(and then properly align it, that's hard in GH)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you think of Variant[Integer[0], Pattern[/^[0-9]+$/]]?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably even better since it's stricter.

Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI: The next release will be a major one, so if we want to break things, now is a good time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI: The next release will be a major one, so if we want to break things, now is a good time

Adding Datatypes to the Parameters actually was a good Idea, but IMHO it was done only half-hearted. This should be improved for the next Major-Release.

cocker-cc pushed a commit to cocker-cc/puppetlabs-apache that referenced this pull request Jun 9, 2022
@david22swan
Copy link
Member

@cocker-cc Did not see this PR prior to putting up my own fix sorry, a bugfix which has been merged in to set the type to Variant[Integer,String].
Again sorry for the inconvenience this has caused.

@david22swan david22swan closed this Jun 9, 2022
@ekohl
Copy link
Collaborator

ekohl commented Jun 9, 2022

I'm not sure I agree with this being closed. It actually narrows the data types further to disallow misconfigurations.

@cocker-cc cocker-cc deleted the fix_Datatypes branch June 10, 2022 00:54
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.

6 participants