You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had previously uploaded some cookbooks to my chef-zero repo with zero in single cookbook version mode and then I switched to versioned cookbooks mode (I was using knife serve to run zero and a custom script to upload cookbooks, but my debugging doesn't indicate this was an issue with my script). When trying to list cookbooks, chef-zero returned a 500 with the following error:
ERROR: internal server error
Response: Exception raised! #<ArgumentError: Malformed version number string omnibus>
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/version.rb:191:in `initialize'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-zero-2.2/lib/chef_zero/endpoints/cookbooks_base.rb:44:in `new'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-zero-2.2/lib/chef_zero/endpoints/cookbooks_base.rb:44:in `block (2 levels) in filter_cookbooks'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-zero-2.2/lib/chef_zero/endpoints/cookbooks_base.rb:44:in `each'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-zero-2.2/lib/chef_zero/endpoints/cookbooks_base.rb:44:in `sort_by'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-zero-2.2/lib/chef_zero/endpoints/cookbooks_base.rb:44:in `block in filter_cookbooks'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-zero-2.2/lib/chef_zero/endpoints/cookbooks_base.rb:38:in `each'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-zero-2.2/lib/chef_zero/endpoints/cookbooks_base.rb:38:in `filter_cookbooks'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-zero-2.2/lib/chef_zero/endpoints/cookbooks_base.rb:13:in `format_cookbooks_list'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-zero-2.2/lib/chef_zero/endpoints/cookbooks_endpoint.rb:15:in `get'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-zero-2.2/lib/chef_zero/rest_base.rb:29:in `call'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-zero-2.2/lib/chef_zero/rest_router.rb:23:in `call'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-zero-2.2/lib/chef_zero/server.rb:443:in `block in app'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `call'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
Adding some debugging output to chef-zero (by editing the gem directly) it appears that chef-zero had parsed the directory name as a cookbook name of "" (empty string) and a version of "omnibus" (the directory's name).
{:cookbook_list=>
{""=>["omnibus"],
# other stuff that doesn't matter
It would be cool if chef-zero validated the directory names and returned a nice error message when invalid ones are present.
The text was updated successfully, but these errors were encountered:
I had previously uploaded some cookbooks to my chef-zero repo with zero in single cookbook version mode and then I switched to versioned cookbooks mode (I was using
knife serve
to run zero and a custom script to upload cookbooks, but my debugging doesn't indicate this was an issue with my script). When trying to list cookbooks, chef-zero returned a 500 with the following error:Adding some debugging output to chef-zero (by editing the gem directly) it appears that chef-zero had parsed the directory name as a cookbook name of
""
(empty string) and a version of"omnibus"
(the directory's name).It would be cool if chef-zero validated the directory names and returned a nice error message when invalid ones are present.
The text was updated successfully, but these errors were encountered: