The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Refactor #14986

Stop using Thread.current for tracking the environment

Added by Andrew Parker almost 2 years ago. Updated over 1 year ago.

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

0%

Category:-
Target version:3.x
Affected Puppet version: Branch:
Keywords:

We've Moved!

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:


Description

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

History

#1 Updated by Brice Figureau almost 2 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 1 year ago

  • Status changed from Unreviewed to Accepted
  • Assignee set to Andrew Parker

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

Also available in: Atom PDF