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

BREAKING: Drop puppet 3 support. Replace validate_* with datatypes #1031

Merged
merged 10 commits into from
Mar 9, 2017

Conversation

bastelfreak
Copy link
Member

No description provided.

@bastelfreak bastelfreak self-assigned this Mar 7, 2017
fail('$port must be an integer.')
}

$ensure_real = $ensure ? {
Copy link
Member

Choose a reason for hiding this comment

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

Not sure $ensure is used at all at the moment. Use of $ensure_real was removed in e40ce7c ??

Copy link
Member Author

Choose a reason for hiding this comment

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

as mentioned in the other comment. We will drop the param. We can safely do this since the next release has to be a major one.

@@ -37,26 +37,11 @@
define nginx::resource::upstream::member (
$upstream,
$server,
$ensure = 'present',
$port = 80,
Enum['present', 'absent'] $ensure = 'present',
Copy link
Member

Choose a reason for hiding this comment

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

Since this parameter isn't used anymore, maybe default it to undef instead?

Then

if $ensure { warning('DEPRECATION: some useful message here') }

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 would prefer it to directly drop it in the next release, since this has to be a major one we can get rid of a lot of stuff.

@bastelfreak
Copy link
Member Author

reminder for @bastelfreak: drop the parameter in a separate PR to get it into the changelog.

@bastelfreak bastelfreak changed the title [WIP] replace validate_* with datatypes in member.pp [WIP] replace validate_* with datatypes Mar 7, 2017
@bastelfreak bastelfreak force-pushed the puppet4 branch 3 times, most recently from b1ce4a0 to 46973e6 Compare March 7, 2017 22:56
@bastelfreak bastelfreak changed the title [WIP] replace validate_* with datatypes replace validate_* with datatypes Mar 7, 2017
@bastelfreak
Copy link
Member Author

This should be enough for the first run. I don't want to create a bigger diff. Let me know if it is already too big, I could cherry-pick the changes in each file to own PRs.

@alexjfisher
Copy link
Member

Just picking out the breaking change(s) into their own PR(s) works for me.

@bastelfreak
Copy link
Member Author

we should wait with merging until I opened PRs for all breaking changes

validate_re($string, '^.{2,}$',
"Invalid string value [${string}]. Expected a minimum of 2 characters.")
if ! ( is_array($mappings) or is_hash($mappings) ) {
Copy link
Member

Choose a reason for hiding this comment

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

this one might be useful to keep around? The error message is a little more explanatory than the default.

Copy link
Member Author

Choose a reason for hiding this comment

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

as discussed on IRC: we can kep the fail() call but this will never be reached. I wanted to move it as comments to the header documentation, but I jut noticed that it is already present.

Variant[Array, String] $ipv6_listen_ip = '::',
Integer $ipv6_listen_port = 80,
String $ipv6_listen_options = 'default ipv6only=on',
$proxy = undef,
Copy link
Member

Choose a reason for hiding this comment

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

do we have data types for these handful of un-decorated parameters?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes. But I want to add them in another PR. I want to keep the focus here on replacing validate functions. and in the next step adding types for all parameters + maybe improve existing ones.

@yastupin yastupin merged commit 81837ec into voxpupuli:master Mar 9, 2017
@alexjfisher alexjfisher changed the title replace validate_* with datatypes BREAKING: Drop puppet 3 support. Replace validate_* with datatypes Aug 1, 2017
Rubueno pushed a commit to Rubueno/puppet-nginx that referenced this pull request Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants