Issue #6750 has been updated by Paul Berry.

It's unclear to this point what this means in terms of backwards compatibility. 
 Currently, with existing Puppet applications, a user is required to specify 
all options after the application name, whether they are global or 
application-specific.  Thus this would be a backwards-incompatible change to 
the Puppet CLI.  Possible ways to resolve this:

(a) If the user specifies a global option in the interface-specific or 
action-specific slot, and Puppet can still infer what they meant, allow it but 
issue a warning.  Similar if the user specifies an interface-specific option in 
the action-specific slot.

(b) Same as (a), but in Statler change it from a warning to an error.  
Advantage: this forces users to put options in the right slot, so that if in 
the future we create ambiguities between global, interface-specific, and 
application-specific options, we won't cause unexpected errors because the user 
will already have sorted their options into the proper slots.  Disadvantage: 
potential user frustration at having to sort options into the proper slots.

(c) Same as (a), but don't issue a warning at all.  Advantage: the user doesn't 
even have to understand that there are multiple places to put options unless 
there is an ambiguous option that they want to use, and we aren't likely to 
have many of those.  Disadvantage: if we introduce an ambiguous meaning for an 
option in the future, we may change the behavior of a user's invocation of 
Puppet in an unexpected way.

Solution I've considered but I believe is unacceptable:

(d) Same as (b), but make the errors and warnings apply only to applications 
implemented using the new "interface" mechanism.  I believe this is 
unacceptable because one of our goals is that over time we will be able to 
gradually create interfaces as drop-in replacements for existing applications.  
An interface can't be a drop-in replacement for an application if it is more 
strict about where options are placed.

----------------------------------------
Bug #6750: Interfaces need to support "posix style" option handling
https://projects.puppetlabs.com/issues/6750

Author: Paul Berry
Status: Accepted
Priority: Normal
Assignee: 
Category: interface
Target version: 2.6.x
Affected Puppet version: 
Keywords: 
Branch: 


Posix style, in this context, means that Puppet needs to distinguish between 
options specified in three possible locations:

puppet <a> interface_name <b> action_name <c>

Options at location <a> are intended to be global options (those 
applicable to all Puppet interfaces and actions, like --debug)
Options at location <b> are intended to be interface-specific options
Options at location <c> are intended to be action-specific options.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to