puppetlabs/puppet — pull request #691 by pcarlisle (2012-04-19 22:10:55+00:00)
Title: #3910 - finish up making enc authoritative for environments

This series of commits refactors the way environments are handled on the agent so that an ENC can override an agent's environment without incurring the expense of an extra catalog compilation, and so that the new environment is correctly used for pluginsync and any requests to the master (e.g. for file contents). To make this work I had to stop using Puppet[:environment] as the current environment, as it is not always possible to override that value within the agent. The environment is now local to a catalog and any resources that need the environment check with the catalog. It also removes the default yaml cache for nodes on the master, as it's impossible to correctly invalidate this cache when the ENC changes. Ideally caching could be left up to the
ENC.