The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com
Stop using Thread.current for tracking the environment
|Assignee:||Andrew Parker||% Done:|
|Affected Puppet version:||Branch:|
Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com
This ticket may be automatically exported to the PUP project on JIRA using the button below:
Puppet::Node::Environment uses Thread.current for tracking the environment. This causes code that is hard to follow and tests that are very fragile. By removing this we should have a more understandable way of dealing with environments.
#1 Updated by Brice Figureau almost 2 years ago
The Thread.current was a kludge I added a long time ago to be able to at least survive to multiple threads compiling at the same time. IMHO, there should be one set of Environment instances per compiler instances in the master, as those are difficult to share.