Comments (3)
I think normally it would be somewhat of an anti-pattern to have something that's an optional boolean, and having it a string (with true / false as possible options) would be breaking at best, and kind of wacky UI at worst.
Probably the best bet would be something like
Variant[Enum['network', 'network_unsafe', 'true', 'false'], Boolean]
, but might be good to get some other opinions from Voxpupuli collaborators (maybe on IRC) to confirm that this is a good way to go.
Are you willing / able to make a PR (including some updates / additions to tests) to handle this?
If this feature was added later, it might also be necessary to gate it depending on RMQ version, though I'm not strongly opinionated about this.
from puppet-rabbitmq.
Boolean are tricky because undef
and false
both evaluate to false
, so we must be sure to output a value when the setting is set to false
.
Changing the accepted value from Boolean to String is a backwards-incompatible change, maybe we can accept a Boolean as before, optionally emitting a deprecation warning if a Boolean is passed, so that we can remove it later. I am not a user of this module, IMHO the most important is to have some consistency at the module level: if it use Boolean in other places, it make sense to accept a Boolean value. If it is an exception, it make sense to deprecate this usage.
from puppet-rabbitmq.
@smortex: thanks for weighing in
Changing the accepted value from Boolean to String is a backwards-incompatible change, maybe we can accept a Boolean as before, optionally emitting a deprecation warning if a Boolean is passed
From an interface standpoint, I agree it's not ideal having both bools and strings work, though it's the best chance at avoiding breaking changes here, and having the strings "true" / "false" be the only way to set true / false doesn't seem ideal anyway.
That said, I don't think there's any worry about undef if we used the variant above, since undef
still wouldn't be allowed, and we are not evaluating ldap_log
as a boolean directly anywhere I can see -- just using it in a template, where I think we're already ending up with the string "true" or "false" in the config file anyway, if I'm reading
puppet-rabbitmq/templates/rabbitmq.config.erb
Line 194 in 8854872
If we were to add an if
statement around ldap_log
somewhere in that template in the future (doesn't look like there's one now), agree that could cause some unpredictable results.
from puppet-rabbitmq.
Related Issues (20)
- Reference for log_levels does not apply
- Compatibility with puppet-systemd HOT 3
- need support for newer versions of dependency puppet-archive HOT 1
- rabbitmq_plugin not working properly with RabbitMQ 3.10.x
- Feature-request: Configure prometheus exporter HOT 5
- Unable to use custom list inside enabled_plugins file HOT 1
- Missing option to add members to quorum queue
- Idempotency issue with implicitly enabled plugins
- PackageCloud repos are no longer available (see RabbitMQ issue) HOT 2
- Method to enable HSTS? HOT 1
- rabbitmq_queue takes a long time when a large number of vhosts is present
- rabbitmq::install::rabbitmqadmin keeps installing python package HOT 2
- Question: Will support be added for Puppet 8 and RHEL8? HOT 5
- Policy "applyto" options missing HOT 2
- resources fail to prefetch when rabbitmq is not intended to be installed (via --noop or --tags) HOT 5
- Missing support for Vhost Metadata HOT 5
- puppet-archive version HOT 2
- Use epp template to handle sensitive data
- Add support for policy definition consumer-timeout as a integer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-rabbitmq.