-
Notifications
You must be signed in to change notification settings - Fork 289
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
module rewrite #126
module rewrite #126
Conversation
Looks like some test failures beyond the other errored out 1.8.7 failures |
Fixed, rebased into the original commit. Thoughts on the path? |
I think it seems a lot more sane. +1 from my perspective. |
Okay - I think this should just be merged. It's a lot better than the previous version. Thanks @jlambert121 👍 |
I think this should bump a major version though because I expect it to break someone's config and it isn't 100% backward compatible ($api and $dashboard). |
@fadenb 👍 - this breaks our wrapper module for sensu :( For example: Do classes like |
With the rewrite I can add an apt_source and yum_source to the main module. The reason I made them fail at the individual module level is parameters are no longer being passed to individual classes but referenced from the main class. If someone overrides a param in only one subclass you could get inconsistent results. I need to do a fix for this today anyway - str2bool(Boolean) is only available in stdlib 4.0 and the latest PE only runs 3.2.0. |
@fadenb @codec I added a repo_source parameter to the main class in #130, does that meet your needs? When this module is ready to release again it is going to be a major version bump (1.0.0) because there are some breaking changes in it. The two I'm aware of are if you're directly overriding parameters at a subclass (if any aren't available in the main class to do what you need that's a bug) and the addition of the api and dashboard parameter rather than rolling those into server. |
@jlambert121 That should work out for us - now we can databind all necessary parameters, thanks... I'm still not sure how I feel about this "pattern" ... 👎 |
Glad that works for you. What do you mean by "pattern" and what is bothering you? |
I wanted to add the ability to disable the dashboard service and resolve some dependency issues and ended up with a large number of conditionals which get hard to maintain and tend to go against recommended suggestions on how to use puppet. I have tried to keep breaking changes to a minimum.
Breaking changes I know of:
$server => true no longer also enables the dashboard and api service. These are now controlled by their own parameters.
Many (all that can be?) parameters are now validated. Shouldn't break anything, but I may have missed an option
Changes:
All 4 sensu services are now controlled by their own config/service class
Parameters validated
Sensu must be installed from the main class. Any attempt to call private classes will fail. This allows not having to pass parameters to sub classes for consistent results.
I am running this in my environment without any issues (or changes between the old and new module), but I would like some other people to take a look at this as well.
This should resolve #123, #124,