-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Simplify data types and array handling #2457
Conversation
@@ -1,10 +1,10 @@ | |||
<%- | | |||
String $header, | |||
Optional[Array[Variant[Stdlib::Host,Stdlib::IP::Address]]] $internal_proxy = undef, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the template used anywhere where the Variant type is used as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. https://github.com/puppetlabs/puppetlabs-apache/blob/main/manifests/mod/remoteip.pp should also be simplified.
The type Stdlib::Host includes Stdlib::IP::Address, so the variant is redundant. There's also no way to pass nested arrays so flatten is not needed.
c69f55b
to
df6862a
Compare
Optional[Array[Stdlib::IP::Address]] $internal_proxy = undef, | ||
Optional[Array[Stdlib::IP::Address]] $proxy_ips = undef, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, "The type Stdlib::Host includes Stdlib::IP::Address", was it not supposed to be the other way around?
Optional[Array[Stdlib::Host]] $internal_proxy = undef,
Optional[Array[Stdlib::Host]] $proxy_ips = undef,
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bleh, that's what you get for quickly doing the work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type Stdlib::Host includes Stdlib::IP::Address, so the variant is redundant. There's also no way to pass nested arrays so flatten is not needed.