Search and environments


As it stands currently search() in the recipe DSL has not been changed
in any way related to environments. nDuff brought this up in IRC
tonight as a source of possible confusion in the future. It would seem
to be Least Surprising to make it so that the default behavior of
search(:node) is to limit things to only the environment of the
current node (or the current context in whatever sense is possible).
An optional argument could be added to remove this implicit filter,
but it seems like this is definitely going to be the exception. To
further complicate all this is that data bags and roles (and I think
envs themselves are indexed too) shouldn’t do this. What do people
think? I feel like this is definitely a special case, but the current
behavior opens the door to too many newbie errors.