Issue #7184 has been updated by Daniel Pittman.

Assignee deleted (Daniel Pittman)

----------------------------------------
Feature #7184: bind actions first, faces second, to support multiple versions 
with external extension
https://projects.puppetlabs.com/issues/7184#change-92362

* Author: Daniel Pittman
* Status: Closed
* Priority: High
* Assignee: 
* Category: Faces
* Target version: 2.7.3
* Affected Puppet version: development
* Keywords: 
* Branch: 
----------------------------------------
At the moment we bind to the face first, then find the action associated with 
that.  For external actions we really want to be binding to the action *first*, 
then running it in the context of the face version it was defined against.  
This gives coherent behaviour for the external user, and makes face versioning 
much more useful for them.

Specifically, the following properties:

 * actions can only be found in one of:
    * bound to the default face version, inside that file
    * in the load path as `lib/puppet/face/#{face}/#{action}.rb`
 * the *first* instance of `#{action}` is the one used
 * when loading an action, identify the face it wants, and load that

This means that invoking an action that binds to version 1 of a face *can't* 
call an action that binds to version 2 of the face, or vice-versa, without them 
making special arrangements for that to happen.  This is desirable; we are not 
including any "proxy" connection between the two in this version of the feature.

The general expectation of use is that folks will build their actions depending 
on one of two things:

 * actions provided in the core face, for the version they bind to
 * other actions they write, binding to the same core face version

Given that, these restrictions seem reasonable, without making actions vanish 
just because the default version of a face changes.



-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to