Issue #21948 has been updated by Henrik Lindberg.
Sadly, for 3.5 it will not be possible to make the query expressions smarter. They are handled by the compiler, and the plan for the "future evaluator" does not extend to reimplementing scope and compiler. The evaluation of the query is done under the control of the compiler in such a way that it is not possible to extend it. The query has a very simplistic form and it is delegated to a terminus for execution. The actual behavior comes from deep within the system; it is not just a matter of "adding expressional power" to the language. This will need to be addressed in a later version (than 3.5). ---------------------------------------- Feature #21948: resource collection == doesn't compare arrays vs arrays https://projects.puppetlabs.com/issues/21948#change-100143 * Author: Jeremy Kitchen * Status: Needs Decision * Priority: Normal * Assignee: eric sorenson * Category: language * Target version: * Affected Puppet version: * Keywords: * Branch: ---------------------------------------- given: <pre> @user { 'foo': groups => ['a','b'], } @user { 'bar': groups => ['b','c'], } </pre> This is what DOES happen: <pre> User<| groups == ['a', 'b'] |> # realizes only user foo User<| groups == 'b' |> # realizes both, as to be expected </pre> So, it would appear that an array on the left hand side is acceptable, but not on the right. This is what I would expect: <pre> User<| groups == ['a','b'] |> # realizes both User<| groups == ['a', 'c'] |> # realizes both </pre> I mainly want this so I can do: </pre> User<| groups == hiera_array('include_groups') |> </pre> I'm using puppet 3.2.3 on both master and agent. I'm not against doing something like: <pre> $include_groups = hiera_array('include_groups') $include_groups.each { | $group | User<| groups == $group |> } </pre> The only problem I have with that is it's experimental and may go away, so I don't want to rely upon that functionality if it may not be there next version. The documentation says it will pull in all resources matching the search key (the right hand operand), which I admittedly initially misread, but the fact that *anything* gets returned makes me wonder if there's more behind this issue. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
