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

Refactor #13678

Facter should implement its own which command

Added by Stefan Schulte about 2 years ago. Updated almost 2 years ago.

Status:ClosedStart date:04/06/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:library
Target version:1.6.10
Keywords: Affected Facter version:
Branch:https://github.com/puppetlabs/facter/pull/189

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

Currently Facter::Util::Resolution.exec relies on which to check if a command can be executed. This basically means that for every command we want to execute, we fork a second time just to execute which.

Facter should implement its own which command so we don’t need to invoke the shell all the time. Puppet already has some similar methods we may be able to port to facter.


Related issues

Related to Facter - Bug #5013: Facter assumes path that isn't there always Accepted 10/15/2010
Related to Facter - Bug #12831: recursion on fact resultion: kernel Closed 02/25/2012
Related to Puppet - Bug #12980: Puppet::Util.execute on Windows should search 64-bit path... Accepted 03/06/2012
Related to Facter - Bug #20054: virtual facts show error about gsub on nil Closed

History

#1 Updated by Stefan Schulte about 2 years ago

  • Tracker changed from Feature to Refactor

#2 Updated by Stefan Schulte about 2 years ago

  • Assignee set to Stefan Schulte
  • Branch set to https://github.com/stschulte/facter/tree/refactor/1.6.x/13678

I’ve written something that will currently pass all tests but I still have to add a few additional test cases

#3 Updated by Stefan Schulte about 2 years ago

  • Category set to library
  • Status changed from Unreviewed to In Topic Branch Pending Review
  • Assignee deleted (Stefan Schulte)
  • Branch changed from https://github.com/stschulte/facter/tree/refactor/1.6.x/13678 to https://github.com/puppetlabs/facter/pull/189

#4 Updated by Anonymous almost 2 years ago

We took a look at the pull request, everything looks good. It merged cleaning and all the tests still run. Just waiting to see if anyone has any additional feedback before we merge this into 1.6.x.

#5 Updated by Jeff Weiss almost 2 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version set to 1.6.10

#6 Updated by Ken Barber almost 2 years ago

Stefan thanks very much for all your great work on this – its a very awesome change indeed and I appreciate your patience and attitude towards getting this ‘just right’.

Jeff – I don’t know if you have noticed, but there is a number of marked deprecations and warnings in this code that may warrant future deprecation. Not sure when (as in what version) you want to achieve this, but they may warrant tickets for tracking.

#7 Updated by Moses Mendoza almost 2 years ago

  • Status changed from Merged - Pending Release to Closed

Released in 1.6.10.

Also available in: Atom PDF