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

Refs #32037: Add parameters to disable qpid services #148

Merged
merged 1 commit into from Mar 29, 2021

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Mar 8, 2021

No description provided.

Copy link
Contributor

@wbclark wbclark left a comment

Choose a reason for hiding this comment

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

This looks very straightforward.

I don't see a particular need to set defaults via $qpid::{router::,}params::service_{ensure,enable} at this time as I don't see anywhere in our ecosystem where we include either params class. (I don't recall what were the other benefits, if any, of adhering to that pattern)

I wouldn't mind seeing a test case for the proper default behavior, and another test that the defaults can be overridden, but it feels very trivial given the simplicity of this code to hold things up over it. I am assuming your reasoning for not implementing that was probably similar.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I'm ok with this if you fix the typo.

@@ -9,7 +9,7 @@
# $acl_file:: File name for Qpid ACL
#
# $acl_content:: Content for Access Control List file

#
Copy link
Member

Choose a reason for hiding this comment

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

Nice additional fix that we should have caught earlier

manifests/init.pp Outdated Show resolved Hide resolved
manifests/router.pp Outdated Show resolved Hide resolved
@ehelms ehelms force-pushed the refs-32037 branch 2 times, most recently from 9339801 to 05ebea4 Compare March 29, 2021 19:30
@ehelms ehelms requested a review from wbclark March 29, 2021 19:30
ensure => running,
enable => true,
ensure => $qpid::router::service_ensure,
enable => $qpid::router::service_enable,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it intentional or an oversight that we don't use the same pattern here?

Suggested change
enable => $qpid::router::service_enable,
enable => pick($qpid::router::service_enable, $qpid::router::service_ensure),

If there is no reason for the different behavior here, then let's make it consistent.

Copy link
Member Author

Choose a reason for hiding this comment

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

Blind addressing of direct comments :) I have updated both to the same pattern now with tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great, thanks!

@wbclark wbclark merged commit 34583bb into theforeman:master Mar 29, 2021
Comment on lines +32 to +33
$service_ensure = true,
$service_enable = undef,
Copy link
Member

Choose a reason for hiding this comment

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

I would have liked to see data types here. Ideally whenever you add a parameter, you use a data type.

Copy link
Member Author

Choose a reason for hiding this comment

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

Given this class did not have data types already, it was either add it just for these two, add it for all (and possibly overreach the point of the PR) or stick with what was present already. I chose the latter to make the focused changed. And plan to follow up adding types.

Copy link
Member

Choose a reason for hiding this comment

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

#152 for those reading along :)

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