The Puppet Labs Issue Tracker has Moved:

Refactor #14986

Stop using Thread.current for tracking the environment

Added by Anonymous almost 3 years ago. Updated over 2 years ago.

Status:AcceptedStart date:06/12/2012
Priority:NormalDue date:
Assignee:-% Done:


Target version:3.x
Affected Puppet version: Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


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.

Related issues

Related to Puppet - Bug #14927: agent changes environment based on environment state in m... Closed 06/08/2012


#1 Updated by Brice Figureau almost 3 years ago

Definitely +1

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.

#2 Updated by eric sorenson over 2 years ago

  • Status changed from Unreviewed to Accepted
  • Assignee set to Anonymous

Not sure if this is covered by related bug #14927 — feel free to close if so.

Also available in: Atom PDF