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

Simplify data types and array handling #2457

Merged
merged 1 commit into from Sep 12, 2023

Conversation

ekohl
Copy link
Collaborator

@ekohl ekohl commented Sep 12, 2023

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.

@@ -1,10 +1,10 @@
<%- |
String $header,
Optional[Array[Variant[Stdlib::Host,Stdlib::IP::Address]]] $internal_proxy = undef,
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.
@bastelfreak bastelfreak merged commit 48b6e04 into puppetlabs:main Sep 12, 2023
38 checks passed
Comment on lines +54 to +55
Optional[Array[Stdlib::IP::Address]] $internal_proxy = undef,
Optional[Array[Stdlib::IP::Address]] $proxy_ips = undef,
Copy link
Collaborator

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,

🤔

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ekohl ekohl deleted the simplify-remote-ip branch September 12, 2023 16:58
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.

None yet

4 participants