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.
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. KickingChef::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 withknife cookbook upload
— producing 500 error during upload.