Refactor #6753
Faces should be available as `puppet ${face}` without a stub `lib/puppet/application/${face}.rb` file.
| Status: | Accepted | Start date: | 03/17/2011 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | Faces | |||
| Target version: | 3.X | |||
| Affected Puppet version: | Branch: | |||
| Keywords: | ||||
| Votes: | 0 |
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
History
Updated by Paul Berry about 1 year ago
- Category changed from 21 to Faces
- Target version set to 2.6.x
Updated by Luke Kanies about 1 year 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.
Updated by Daniel Pittman about 1 year 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.
Updated by Daniel Pittman about 1 year 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.
Updated by Daniel Pittman about 1 year ago
- Status changed from Accepted to Needs Decision
Updated by Nigel Kersten about 1 year 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.
Updated by Luke Kanies about 1 year ago
I definitely agree with waiting until the next release.
Updated by Nigel Kersten 8 months ago
- Affected Puppet version deleted (
2.7.0rc1)
Adding Randall as a watcher for API/UX visibility.
Updated by Ben Hughes 4 months ago
- Description updated (diff)
- Status changed from Accepted to Unreviewed
Updated by Devon Peters 4 months ago
- Description updated (diff)
Updated by Luke Kanies 4 months ago
- Status changed from Unreviewed to Accepted
Updated by Daniel Pittman 4 months 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.
Updated by Chris Price 3 months ago
- Assignee set to Chris Price
Updated by Chris Price 3 months ago
An initial acceptance test that covers this (tangentially) is here:
https://github.com/puppetlabs/puppet/pull/518