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

replace validate_* with puppet4 datatypes #350

Merged
merged 19 commits into from
Jun 12, 2017
Merged

replace validate_* with puppet4 datatypes #350

merged 19 commits into from
Jun 12, 2017

Conversation

bastelfreak
Copy link
Member

No description provided.

@bastelfreak
Copy link
Member Author

this should be rebased after #349 got merged

@bastelfreak
Copy link
Member Author

I adjusted the types, there should be no backwards-incompatible changes.

Copy link
Member

@rnelson0 rnelson0 left a comment

Choose a reason for hiding this comment

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

It might also be a good time to remove leading colons as in manifests/dev/pp L12's $::php::ensure.

$proxy_server = undef,
Boolean $auto_update = true,
Integer $max_age = $::php::params::composer_max_age,
$root_group = $::php::params::root_group,
Copy link
Member

Choose a reason for hiding this comment

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

Variant[String, Integer]?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep

@@ -21,15 +21,13 @@
define php::config::setting(
$key,
$value,
$file,
String $file,
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be a Stdlib::AbsolutePath since it is passed to a path parameter.

Copy link
Member Author

Choose a reason for hiding this comment

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

yep

$ensure = $::php::ensure,
$package =
$ensure = $::php::ensure,
$package =
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't these be strings as in php::dev?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep

Copy link
Member

@rnelson0 rnelson0 left a comment

Choose a reason for hiding this comment

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

Fix the alignment issues, and is there a reason this is done as 18 commits?

$proxy_server = undef,
Boolean $auto_update = true,
Integer $max_age = $::php::params::composer_max_age,
Variant[Integer, String] $root_group = $::php::params::root_group,
Copy link
Member

Choose a reason for hiding this comment

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

Alignment is off here (I don't care but I think our standard does).

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

$fpm_pid_file = undef,
Optional[Pattern[/^[57].[0-9]/]] $php_version = undef,
Optional[Stdlib::Absolutepath] $config_root = undef,
Optional[Stdlib::Absolutepath] $fpm_pid_file = undef,
Copy link
Member

Choose a reason for hiding this comment

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

Alignment is off.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

$names_to_prefix = prefix(
String $ensure = $::php::ensure,
Boolean $manage_repos = $::php::manage_repos,
Array $names_to_prefix = prefix(
$::php::params::common_package_suffixes, $::php::package_prefix # lint:ignore:parameter_documentation
Copy link
Member

Choose a reason for hiding this comment

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

We should be consistent about how we merge two values for a parameter name. Compare to manifests/embedded.pp L18 or so.

Copy link
Member Author

Choose a reason for hiding this comment

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

I reviewed all files, the format is now consistant

@rnelson0 rnelson0 merged commit 00a0b8f into master Jun 12, 2017
@rnelson0 rnelson0 deleted the puppet4 branch June 12, 2017 18:33
@dbeckham
Copy link
Contributor

The changes for pool.pp (abee5c1) are missing all of the Puppet 4 Data Type definitions except for one.

@bastelfreak
Copy link
Member Author

@dbeckham this is actually intentional. The goal for me is to get rid of all the legacy validate_* calls, because they are spamming the puppetserver logs and they get removed in the future. My goal (at the moment) is not to provide perfect types for all parameter, I don't have enough for it at the moment. However, we're happily accepting patches :)

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.

3 participants