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

Cannot set delivery-limit policy #846

Closed
philomory opened this issue Jul 9, 2020 · 0 comments · Fixed by #847
Closed

Cannot set delivery-limit policy #846

philomory opened this issue Jul 9, 2020 · 0 comments · Fixed by #847
Labels
bug Something isn't working

Comments

@philomory
Copy link
Contributor

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.18
  • Ruby: 2.4.4
  • Distribution: CentOS 7
  • Module version: 10.0.0

How to reproduce (e.g Puppet code you use)

rabbitmq_policy { 'example1@/':
  pattern    => "^example1$",
  priority   => 50,
  applyto    => 'queues',
  definition => {
    'delivery-limit' => 3,
  },
}

rabbitmq_policy { 'example2@/':
  pattern    => "^example2$",
  priority   => 50,
  applyto    => 'queues',
  definition => {
    'delivery-limit' => '3',
  },
}

What are you seeing

For the integer delivery-limit:

Error: Failed to apply catalog: Parameter definition failed on Rabbitmq_policy[example1]: Invalid definition, value 3 is not a string 

For the string delivery-limit:

Error:
Validation failed

<<"3">> is not a valid delivery limit

What behaviour did you expect instead

I should be able to set a delivery limit via policy with the RabbitMQ module.

Any additional information you'd like to impart

I can see in the code that the module expects all policy values to be Strings as they come in from the manifest, and the Type munges a select whitelist of values to integers; obviously delivery-limit could be added to this whitelist, but, I wonder if it wouldn't make more sense to instead stop trying to enforce stringiness in the first place - example 1 should be allowed to 'just work', without the module needing to be aware that the delivery-limit policy takes an integer.

@wyardley wyardley added the bug Something isn't working label Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants