I think there is some confusion around Berkshelf here. When we call out our Berkshelf dependencies we are not specifying them by their sha...just their version. The Berksfike.lock is an artifact of a berks run and is used almost as a cache for Berkshelf...so that it doesnt have to re-verify, through introspection, that it has the right version of the cookbook.
We should not be hand-modifying the Berksfile.lock. Having the lock file speeds up build time and provides the consumer of a cookbook a "known good" reference. They are obviously free to update at will.
--
You received this message because you are subscribed to the Google Groups "opscode-chef-openstack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opscode-chef-open...@googlegroups.com.
To post to this group, send email to opscode-che...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opscode-chef-openstack/CAAD%2BY3WOuqoqkfHu%3DXoiCnT-5F74eh-7%2B3N1K_9606WaduWJKw%40mail.gmail.com.
I think there is some confusion around Berkshelf here. When we call out our Berkshelf dependencies we are not specifying them by their sha...just their version. The Berksfike.lock is an artifact of a berks run and is used almost as a cache for Berkshelf...so that it doesnt have to re-verify, through introspection, that it has the right version of the cookbook.
We should not be hand-modifying the Berksfile.lock. Having the lock file speeds up build time and provides the consumer of a cookbook a "known good" reference. They are obviously free to update at will.
We should not be hand-modifying the Berksfile.lock. Having the lock file speeds up build time and provides the consumer of a cookbook a "known good" reference. They are obviously free to update at will.
So what would have happened in your case is that the CI berkshelf process would have used all of the cached cookbooks it knew about via the Berksfike.lock (with the exception of your ref removal) and then generated a new sha locally for the now-missing cookbook sha. Once it had that it would run the standard gates.
The problem with that is that now the Berksfile.lock on the CI slave is different than what is in git, and the "known good" reference is no longer valid for the next consumer.
This is very likely to be an issue during these periods of heavy churn between the cookbooks... such add where we are now. The correct way to pull in the correct shas is with a 'berks update'. Perhaps one way we could help alleviate this pain is with a script that sets up some precommit hooks... one of which being checking the berks status.
>
> --
> You received this message because you are subscribed to the Google Groups "opscode-chef-openstack" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opscode-chef-open...@googlegroups.com.
> To post to this group, send email to opscode-che...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/opscode-chef-openstack/5b2cbc0a-eb9b-4222-b6f1-08c0ae34c60d%40googlegroups.com.
FWIW I am not making commentary on the usefulness/maintainability of Berksfile.lock just stating that removing the shas invalidates its intended purpose.
--
You received this message because you are subscribed to the Google Groups "opscode-chef-openstack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opscode-chef-open...@googlegroups.com.
To post to this group, send email to opscode-che...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opscode-chef-openstack/CAAD%2BY3VzqD_7g3h%2BqXhLdcfXO4PZR7hd0eMPiF0ND6Jh%3DOv8eQ%40mail.gmail.com.
On Jan 17, 2014 8:50 AM, "Andy McCrae" <andy....@gmail.com> wrote:
>
>
>
> On Friday, 17 January 2014 13:42:54 UTC, Craig Tracey wrote:
>>
>> I think there is some confusion around Berkshelf here. When we call out our Berkshelf dependencies we are not specifying them by their sha...just their version. The Berksfike.lock is an artifact of a berks run and is used almost as a cache for Berkshelf...so that it doesnt have to re-verify, through introspection, that it has the right version of the cookbook.
>>
>> We should not be hand-modifying the Berksfile.lock. Having the lock file speeds up build time and provides the consumer of a cookbook a "known good" reference. They are obviously free to update at will.
>
> I haven't seen this happening though. I made a commit earlier today which failed gating because of the "ref:" line in the Berksfile.lock, which pointed to a much older commit - I had to manually edit and remove the "ref:" line, the tests then succeeded as expected. If that is the purpose of the Berksfile.lock file, then should it be removed from all parent repositories so that it is generated on a "per use" basis?So what would have happened in your case is that the CI berkshelf process would have used all of the cached cookbooks it knew about via the Berksfike.lock (with the exception of your ref removal) and then generated a new sha locally for the now-missing cookbook sha. Once it had that it would run the standard gates.
The problem with that is that now the Berksfile.lock on the CI slave is different than what is in git, and the "known good" reference is no longer valid for the next consumer.
This is very likely to be an issue during these periods of heavy churn between the cookbooks... such add where we are now. The correct way to pull in the correct shas is with a 'berks update'. Perhaps one way we could help alleviate this pain is with a script that sets up some precommit hooks... one of which being checking the berks status.
To view this discussion on the web visit https://groups.google.com/d/msgid/opscode-chef-openstack/41B7689F0255FC48AF2637D2B3B089BE0198FB76%40ORD1EXD04.RACKSPACE.CORP.
++
I was formulating essentially the same response.
To view this discussion on the web visit https://groups.google.com/d/msgid/opscode-chef-openstack/41B7689F0255FC48AF2637D2B3B089BE0198FB76%40ORD1EXD04.RACKSPACE.CORP.
To view this discussion on the web visit https://groups.google.com/d/msgid/opscode-chef-openstack/41B7689F0255FC48AF2637D2B3B089BE0198FB76%40ORD1EXD04.RACKSPACE.CORP.