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

Refactor #6753

Faces should be available as `puppet ${face}` without a stub `lib/puppet/application/${face}.rb` file.

Added by Markus Roberts about 3 years ago. Updated almost 2 years ago.

Status:AcceptedStart date:03/17/2011
Priority:HighDue date:
Assignee:-% Done:

0%

Category:Faces
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

The plugin form of interfaces requires a small file for each indirection noun of the form:

require 'puppet/application/indirection_base'

class Puppet::Application::Catalog < Puppet::Application::IndirectionBase
end

These share a directory with 1) base class implementations, 2) the actual “interface” implementation.

This has a number of unintended and confusing user-visible consequences (e.g. interface_base shows up in “puppet —help” as a command when it is not, etc.) and asking users to understand / maintain this structure imposes an unnecessary barrier to use / extension of the interface facility.

Therefore, in the integrated version of interfaces:

1) interface_base & indirection_base should be moved to a more appropriate location 2) the “boilerplate” files should be auto-discovered / created by an appropriate hook in core 3) the interface command should be moved into the application directory with agent, etc. 4) this interface-specific application directory should be eliminated


Related issues

Related to Puppet - Bug #7316: puppet face applications (subcommands) delivered via modu... Closed 05/02/2011

History

#1 Updated by Paul Berry about 3 years ago

  • Category changed from 21 to Faces
  • Target version set to 2.6.x

#2 Updated by Luke Kanies about 3 years ago

It’s worth pointing out that while there’s some amount of extra work here, I’ve also had consistent user feedback that they prefer to at least see enough information so that they understand how the code flows. This is a reasonable change as long as it’s clear to the user how the commands they type track to code — thus, for instance, it would be a bad idea to also autocreate the ‘interface’ files.

#3 Updated by Daniel Pittman about 3 years ago

To reflect the various viewpoints, we have elected to move the “plumbing” parts of the code away from the user focus parts, but retain the majority of the current infrastructure. There are some costs to this, but we aim to make it possible to revisit the boilerplate parts of the decision later on, once we have real world experience in this.

#4 Updated by Daniel Pittman almost 3 years ago

  • Assignee set to Nigel Kersten
  • Target version deleted (2.6.x)
  • Affected Puppet version set to 2.7.0rc1

Nigel, this needs your decision on action at all, and scheduling; I agree with the issue, and think the change is good, but Luke notes that we have historically received complaints when we did magic to generate things like the list of subcommands this way.

#5 Updated by Daniel Pittman almost 3 years ago

  • Status changed from Accepted to Needs Decision

#6 Updated by Nigel Kersten almost 3 years ago

  • Status changed from Needs Decision to Accepted
  • Assignee deleted (Nigel Kersten)
  • Priority changed from Normal to High
  • Target version set to 3.x

Lets target removing this for Telly, when we’ve migrated the rest of the applications to Faces.

#7 Updated by Luke Kanies almost 3 years ago

I definitely agree with waiting until the next release.

#8 Updated by Nigel Kersten over 2 years ago

  • Affected Puppet version deleted (2.7.0rc1)

Adding Randall as a watcher for API/UX visibility.

#9 Updated by Ben Hughes over 2 years ago

  • Description updated (diff)
  • Status changed from Accepted to Unreviewed

#10 Updated by Devon Peters over 2 years ago

  • Description updated (diff)

#11 Updated by Luke Kanies over 2 years ago

  • Status changed from Unreviewed to Accepted

#12 Updated by Daniel Pittman about 2 years ago

  • Subject changed from Redundant application files for interfaces is customer facing debt to Faces should be available as `puppet ${face}` without a stub `lib/puppet/application/${face}.rb` file.

#13 Updated by Chris Price about 2 years ago

  • Assignee set to Chris Price

#14 Updated by Chris Price about 2 years ago

An initial acceptance test that covers this (tangentially) is here:

https://github.com/puppetlabs/puppet/pull/518

#15 Updated by Chris Price almost 2 years ago

  • Assignee deleted (Chris Price)

Also available in: Atom PDF