Bug #6553

handling of array values in exec provider is inconsistent.

Added by Daniel Pittman about 1 year ago. Updated 4 months ago.

Status:Accepted Start date:03/02/2011
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:exec
Target version:2.7.x
Affected Puppet version:2.6.5 Branch:
Keywords:wtf
Votes: 0

Description

In the exec provider we handle arrays as arguments inconsistently:

exec { "foo": timeout => [1] }  # works
exec { "foo": tries => [1] } # boom!

We should make a call on which of these two is desired, then implement it. If necessary a deprecation period might be needed to ensure that we don’t surprise anyone using this (unintuitive) features.

Oh, and:

exec { "foo": timeout => [1,2,3] }  # guess which one we use?

History

Updated by Michael Stahnke 4 months ago

  • Target version changed from 2.6.x to 2.7.x

2.6.x is closed. Moving to 2.7.x

Updated by Daniel Pittman 4 months ago

  • Status changed from Needs Decision to Accepted
  • Assignee deleted (Nigel Kersten)

This should fail consistently: if you only want one value, take one value. No arrays, no value picked out of an array.

This will need to happen across a major release boundary, and should go through the normal deprecation period of one major release before we drop the ability entirely – though if that turns out impossibly hard we can accept a failure with a clear error message, provided it identifies to the user exactly what change they should make, and when.

Updated by Nigel Kersten 4 months ago

Did we ever make any promises around the behavior with arrays for these items? In docs or anywhere?

If not, I’m perfectly happy making the undefined behavior explicitly fail without the requirement for a whole release for deprecation.

I don’t believe this was ever defined behavior, and I don’t believe using arrays for these parameters is at all widespread.

Also available in: Atom PDF