On Fri, Dec 20, 2013 at 7:45 AM, Jeff Bachtel <
jbach...@bericotechnologies.com> wrote:

>
> On 12/20/2013 10:03 AM, Felix Frank wrote:
>
>> On 12/20/2013 03:41 PM, DEGREMONT Aurelien wrote:
>>
>>> Assuming this patch is clean/adapted, is this something Puppet could
>>> accept? or there is still other problems?
>>>
>> I can't really give a well founded comment on this.
>>
>> I like Jeff's approach in spirit, but as far as execution is concerned,
>> my gut says that something more object oriented would be preferable.
>> What I'm saying is, instead of enriching interfaces with values that
>> need passing, an approach based on inheritance and method overrides
>> might lead to better maintainability later on.
>>
>>
> +1 - doing a rescue because I can't figure out where
> Type.retrieve_resource is going for the retrieve method when called from
> puppet agent is a pretty sure warning sign that this isn't the cleanest
> approach. I also noticed that my patch breaks application of stored
> resources in modules, probably because that's using the RAL resource
> indirector as well.
>
> As an aside, I tested Aurelien's original patch with the mcollective and
> datacat_collector modules and noticed the same breakage my patch exhibited:
> if ensure is not present in the resources returned from Type.retrieve, then
> modules using collected resources will break.
>
>
Ah, so there is other code out there that relies on the current behavior of
retrieve. I had suspect as much, but it is good to know :)


> To resolve problems with the patch would I think be intensive, as anything
> dealing with stored resources would need to set ignoreensure=true. It'd be
> better to go from the opposite direction and default to the current
> behavior, but have manifest application invoke retrieve in a different way
> (or define its own retrieve).
>
>
I'm thinking maybe a different `retrieve` might be the way to go. Passing
around a boolean just isn't a great way to go.


> Jeff
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-dev/52B46617.8080202%40bericotechnologies.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Andrew Parker
a...@puppetlabs.com
Freenode: zaphod42
Twitter: @aparker42
Software Developer

*Join us at PuppetConf 2014, September 23-24 in San Francisco*

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/CANhgQXv7H08o9S4cqxsagu5D55MihBr7AvFMQJLVQJxfWKGFPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to