jonlives / knife-spork

A workflow plugin to help many devs work with cookbooks and environments at once
Other
335 stars 97 forks source link

Fix for spork upload of cookbook with no deps #210

Closed timurb closed 7 years ago

timurb commented 7 years ago

This closes https://github.com/jonlives/knife-spork/issues/209

To make knife negotiate correct protocol it has to call Chef::CookbookVersion.list_all_versions before trying first upload. No idea why it works like this. Kicking Chef::CookbookVersion.list_all_versions during upload instantly fixes the issue with uploading cookbook with no deps.

I tried removing list_all_versions call in stock knife locally (https://github.com/chef/chef/blob/6705acbd7f301d1b04388043a3dfa0308655f120/lib/chef/knife/cookbook_upload.rb#L103) and I was able to reproduce exactly the same issue as https://github.com/jonlives/knife-spork/issues/209 with knife cookbook upload — producing 500 error during upload.