On 9/17/15, 4:20 PM, “Daniel DeLeo” <email@example.com on behalf of firstname.lastname@example.org> wrote:
On Thursday, September 17, 2015 at 4:01 PM, Jos Backus wrote:
https://github.com/chef/chef-dk/blob/master/POLICYFILE_README.md talks about ‘lock’, but would ‘snapshot’ not be a better name? After all, it looks like a snapshot of cookbooks and their metadata (although granted the effect is to lock machines in the policy group to those cookbooks). Maybe I misunderstand?
“lock” and “lockfile" are the terms I’d expect people to be familiar with, as they’re used by bundler and berkshelf and probably other tools as well.
To me the term “lock” feels more natural since you generally have dependencies that are floating to some degree (for example, if you specify a dependency in your metadata like “~> 2.0”) and you’re locking that to a specific version. Likewise, “snapshot” feels more like a “freeze frame” of a thing that’s changing naturally, like a nightly build of a project or something. I’m probably heavily biased by the way these terms are used elsewhere, but I suspect most users will have similar experiences with these terms.
While I understand what you are saying, I’d argue that what it is and what it does are separate things. It is a snapshot with the effect of locking things down (because the ‘chef install/update’ resolves the cookbook versions and ultimately picks a single version of each cookbook, which together I’d call a snapshot of the state of the cookbook universe). So in that sense you could indeed call it a lock based on the effect that it has. But when I look at it, I can’t help but see a snapshot.
At any rate, as you and Lamont point out, the consistency gained with other software is of course valuable.
Thanks for taking the time to explain, Daniel.