Forwarded message:
From: Daniel DeLeo < >
To: Bryan McLellan < >
Date: Monday, December 10, 2012 12:10:43 PM
Subject: Re: [chef-dev] Re: Re: Re: local file copy resource?
On Monday, December 10, 2012 at 10:07 AM, Bryan McLellan wrote:On Sun, Dec 9, 2012 at 1:44 PM, Jesse Campbell < "> > wrote:Take a look here:You could create pull request for this sort of patch, even if you'renot done. That would allow people to comment in the PR against thespecific parts of the code.It looks like #action_create no longer differentiates between creatinga file that doesn't exist and updating the content of a file that doesexist. This seems minor, but my gut tells me it is important for Chefto know the difference so we can be completely honest with the userabout what we did or are going to do, for purposes like whyrun,auditing, reporting, etc.I don't think I like overloading the 'create' action to also be a'copy' action, differing on if a source file exists or not, as we'renot really creating a file.In #action_move, you remote the source file if it already matches thedestination file. Conceptually this makes sense, but I'd be prettysurprised if I asked Chef to move a file and it told me that itdeleted it instead.#copy reports "create a new cookbook_file " butis used in both Chef::File#action_move and Chef::File#action_create(when copying a file). Again, we need to be accurate in what we'rereporting.Personally the 'to' attribute made more sense to me than 'source.'When I think about what I'm copying or what I'm moving, I think what Iam describing is the source, not the destination. But I can totallysee how this is possibly personal preference. We see this inremote_file, cookbook_file and template today. The resource managesthe destination and there is a source attribute. In link, where wealready deal with two files on disk, we use 'to' since we realizedthis made more sense in CHEF-30 [1].Bryan
Archive powered by MHonArc 2.6.16.