The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Refactor #14986

Stop using Thread.current for tracking the environment

Added by Anonymous almost 4 years ago. Updated over 3 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 4 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 3 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