-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Narrow down Datatypes #2245
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
Narrow down Datatypes #2245
Conversation
cocker-cc
commented
Jun 10, 2022
- use Datatypes from Stdlib
- use Variant[Integer, Pattern[/^[0-9]+$/]] where Strings represent Integers
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. |
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.
I am very happy with stricter data types, but this is quite hard to review due to the various things going on. I'd prefer starting with the simple things like whitespace/coding style changes. Those can be merged pretty easily.
@@ -40,8 +40,8 @@ | |||
# | |||
define apache::balancermember ( | |||
String $balancer_cluster, | |||
String $url = "http://${$facts['networking']['fqdn']}/", | |||
Array $options = [], | |||
Stdlib::HTTPUrl $url = "http://${$facts['networking']['fqdn']}/", |
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.
Just for context, https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#balancermember is the documentation. That just mentions url, but I think HTTP/HTTPS is sufficient in schemes.
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.
Just as an additional Note: stdlib/types/httpurl.pp
:
type Stdlib::HTTPUrl = Pattern[/(?i:\Ahttps?:\/\/.*\z)/]
So, HTTPS is included there.
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.
Yes, I was mostly thinking out loud. Should have been explicit in that.
@cocker-cc Look's like a lot of good changes so far. |
@david22swan: just wait for the Changes out of the Discussions above. Okay? |
Yeh, that's what I meant sorry. Should have been clearer. |
@cocker-cc Hey, just checking if there are any updates on this coming soon? |
It may be good to wait for #2255 before rebasing this. |
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.
Please rebase this now that the related PRs have been merged.
Also, as I suggested inline, feel free to narrow things down if they make more sense. It's going to be a major version bump, let's make use of it.
ef41982
to
55e7bc7
Compare
55e7bc7
to
0c28a88
Compare
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.
Once CI passes I'd be happy to merge this and iterate on it further if we find breakages.
0c28a88
to
bdf1020
Compare
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.
I'm going to merge this. We'll probably see some fallout from this given its size, but it's moving things forward a lot.
Oh, I missed that there is now a merge conflict in |
bdf1020
to
280ec5f
Compare
done |
280ec5f
to
bfa81ab
Compare
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.
Let's see if CI is green.
Look's like a few type mismatches in the test's:
|
bfa81ab
to
64a9d68
Compare
I updated some Puppet-Datatypes. |
235894e
to
93e7d0d
Compare
Again I reverted some Datatypes back to |
8489efe
to
5b2d902
Compare
Have no Idea, why these appear. In the Specfile it's set to |
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.
Those also happen in main. I'll take a quick look.
@@ -1,3 +1,4 @@ | |||
# @summary disable Apache-Module event |
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.
Perhaps this and the other disable classes should also have @api private
I believe #2266 should fix it. |
- use Datatypes from Stdlib, particularly a Port now only accepts Stdlib::Port - use Variant[Integer, Pattern[/^[0-9]+$/]] where Strings represent Integers
5b2d902
to
f41251e
Compare
Looks like the tests will be green (Puppet 7 already passed). The only thing appears to be the CLA. |
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.
It's been a long road but LGTM
Thank you @cocker-cc for putting in the work and @ekohl for all the reviews.
Won't merge immediately as with the size of this I'd like some others on the team to give it a look over first, but all being good should be merged in by Monday evening at the latest, with it and all the other changes released by that Friday or the next Monday.
ldap_cache_ttl: '600', | ||
ldap_opcache_entries: '1024', | ||
ldap_opcache_ttl: '600', | ||
ldap_shared_cache_size: 500_000, |
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 underscore a typo?
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.
No, in Ruby this is a convention to make numbers easier to read. Because it's quite hard to see if it's 5 or 6 zeros, this makes it visually easier to see it's 500k, not 5m. Rubocop even enforces it.
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.
Amazing, never knew this 👍 will definitely come in handy at some point :-)
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.
@pmcmaw: Sharp Eyes 👀
I do not like it, but Rubocop with its Config-File coming from the PDK-Templates sais so.
I have just posted one of the tiniest questions, other than that it LGTM. |
@cocker-cc Could you sign the CLA? |
I did, but it does not show up. |
Yeh sorry bout that, it can happen sometimes. |
@cocker-cc Amazing PR, thank you for your time and effort! 🥳 |