Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Done
-
PUP 3.7.5
-
None
-
1
-
Language 2015-04-29
-
Bug Fix
Description
The 4x parser generally refuses to produce values from resource collectors, and errors if you put one where a value is expected. But since the value of a chaining statement is just the final term of the statement (regardless of arrow direction) and they accept collectors as operands:
notify {"I go last.":}
|
$myweirdchain = (file {"/tmp/thing": ensure => file,} -> Notify <| |>)
|
notice( $myweirdchain )
|
Notice: Scope(Class[main]): [#<Puppet::Pops::Evaluator::Collectors::CatalogCollector:0x007fe33da72c90>]
|
I don't really have anything to add, and probably no one will ever try to do that. But it does seem unintended.
risk: medium (manual validate only for now)
probability: low
severity: medium (confusion, possible abuse?)
test layer: unit (no unit tests added in PR. henrik.lindberg can you comment on if you think this needs testing, and at what layer?)
Attachments
Issue Links
- relates to
-
PUP-7541 Explore removing export / collect / virtual / realize syntax
-
- Open
-
- links to