Skip to content
This repository has been archived by the owner on Mar 21, 2018. It is now read-only.

Remove usage of Hash#slice #255

Merged
merged 1 commit into from
Oct 23, 2014
Merged

Remove usage of Hash#slice #255

merged 1 commit into from
Oct 23, 2014

Conversation

coderanger
Copy link
Contributor

Hash#slice, at least for me, is coming from the i18n gem (by way of Vagrant) and this seems to have different semantics from what the Ridley code expects. Specifically it appears the buff-extensions version won't throw an error if a given key isn't found, while with i18n it will. In general having a library that relies on non-standardized core extensions is :-(

The original traceback is:

/usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `fetch': key not found: :retries (KeyError)
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `block in slice'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `each'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/i18n-0.6.9/lib/i18n/core_ext/hash.rb:4:in `slice'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/ridley-2.5.1/lib/ridley/client.rb:10:in `initialize'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in `dispatch'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
    from (celluloid):0:in `remote procedure call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid.rb:189:in `new'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/ridley-2.5.1/lib/ridley/client.rb:146:in `initialize'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in `dispatch'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
    from (celluloid):0:in `remote procedure call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid.rb:189:in `new'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/ridley-2.5.1/lib/ridley/client.rb:35:in `open'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/ridley-2.5.1/lib/ridley.rb:51:in `open'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/downloader.rb:72:in `try_download'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/downloader.rb:37:in `block in download'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/downloader.rb:36:in `each'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/downloader.rb:36:in `download'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/installer.rb:64:in `block in run'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/installer.rb:53:in `collect'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/installer.rb:53:in `run'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/berksfile.rb:353:in `install'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/berkshelf-3.0.0.beta6/lib/berkshelf/berksfile.rb:574:in `vendor'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-berkshelf-8fca7b2f0089/lib/berkshelf/vagrant/action/install.rb:46:in `install'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-berkshelf-8fca7b2f0089/lib/berkshelf/vagrant/action/install.rb:30:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/provision.rb:52:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:13:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/plugins/providers/virtualbox/action/set_name.rb:19:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builder.rb:116:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `block in run'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/util/busy.rb:19:in `busy'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `run'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builder.rb:116:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `block in run'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/util/busy.rb:19:in `busy'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `run'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builder.rb:116:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `block in run'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/util/busy.rb:19:in `busy'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `run'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-berkshelf-8fca7b2f0089/lib/berkshelf/vagrant/action/configure_chef.rb:23:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-berkshelf-8fca7b2f0089/lib/berkshelf/vagrant/action/load_shelf.rb:28:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-berkshelf-8fca7b2f0089/lib/berkshelf/vagrant/action/set_ui.rb:12:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/env_set.rb:19:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/builder.rb:116:in `call'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `block in run'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/util/busy.rb:19:in `busy'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/action/runner.rb:69:in `run'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/machine.rb:147:in `action'
    from /usr/local/opt/rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/vagrant-4f0eb9504cc7/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'

@sethvargo
Copy link
Contributor

👎 on re-implementing this on Ridley. It already exists in https://github.com/RiotGames/buff-extensions. We should figure out why it's not being picked up correctly.

@coderanger
Copy link
Contributor Author

@sethvargo The issue is that if this changes so that we get the buff-extensions behavior, anything using the other behavior will break if they happen to require ridley.

@sethvargo
Copy link
Contributor

Then we should fix buff to match

@coderanger
Copy link
Contributor Author

Using a core monkeypatch to polyfill features the user might not have is one thing, but for a library to invent new core semantics seems like a really bad idea. There is no common agreement on this that I can find.

@coderanger
Copy link
Contributor Author

Maybe have buff-extensions offer its core_exts as module methods too so they can be called directly rather than used via monkey patch?

@sethvargo
Copy link
Contributor

Sure. But I think this is the wrong solution.

@coderanger
Copy link
Contributor Author

Looking at this some more, I don't see where in ridley it requires buff/extensions.

@reset
Copy link
Collaborator

reset commented Mar 8, 2014

@coderanger thats weird, it is intended that Ridley leverages buff-extensions. I think we should ensure it's required and stick with that instead of re-implementing the slice function in Ridley itself.

We can also update buff-extensions to allow the functions to be called as class methods on the module instead of just mixins.

@dawilliams
Copy link

I ran into this as well when I tried to upgrade Vagrant 1.5.4 and vagrant-berkshelf 2.0.1

@reset reset added the bug label Apr 26, 2014
@jjasghar
Copy link

This seems to be bubbling up to schubergphilis/vagrant-chef-zero#51 also.

==> ubuntu1204: Importing base box 'opscode-ubuntu-12.04'...
==> ubuntu1204: Matching MAC address for NAT networking...
==> ubuntu1204: Setting the name of the VM: os-chef-repo_ubuntu1204_1405089680512_97039
Starting Chef Zero at http://10.0.1.34:4002
Waiting for Chef Zero to start
E, [2014-07-11T09:41:22.170837 #64789] ERROR -- : Ridley::Client::ConnectionSupervisor crashed!
KeyError: key not found: :retries
    /Users/jasghar/.vagrant.d/gems/gems/i18n-0.6.11/lib/i18n/core_ext/hash.rb:4:in `fetch'
    /Users/jasghar/.vagrant.d/gems/gems/i18n-0.6.11/lib/i18n/core_ext/hash.rb:4:in `block in slice'
    /Users/jasghar/.vagrant.d/gems/gems/i18n-0.6.11/lib/i18n/core_ext/hash.rb:4:in `each'
    /Users/jasghar/.vagrant.d/gems/gems/i18n-0.6.11/lib/i18n/core_ext/hash.rb:4:in `slice'
    /Users/jasghar/.vagrant.d/gems/gems/ridley-2.5.0/lib/ridley/client.rb:10:in `initialize'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in `dispatch'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
E, [2014-07-11T09:41:22.171187 #64789] ERROR -- : Ridley::Client crashed!
KeyError: key not found: :retries
    /Users/jasghar/.vagrant.d/gems/gems/i18n-0.6.11/lib/i18n/core_ext/hash.rb:4:in `fetch'
    /Users/jasghar/.vagrant.d/gems/gems/i18n-0.6.11/lib/i18n/core_ext/hash.rb:4:in `block in slice'
    /Users/jasghar/.vagrant.d/gems/gems/i18n-0.6.11/lib/i18n/core_ext/hash.rb:4:in `each'
    /Users/jasghar/.vagrant.d/gems/gems/i18n-0.6.11/lib/i18n/core_ext/hash.rb:4:in `slice'
    /Users/jasghar/.vagrant.d/gems/gems/ridley-2.5.0/lib/ridley/client.rb:10:in `initialize'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in `dispatch'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
    (celluloid):0:in `remote procedure call'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid.rb:189:in `new'
    /Users/jasghar/.vagrant.d/gems/gems/ridley-2.5.0/lib/ridley/client.rb:146:in `initialize'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in `dispatch'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
    /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
==> ubuntu1204: Destroying VM and associated drives...
==> ubuntu1204: Running cleanup tasks for 'chef_client' provisioner...
/Users/jasghar/.vagrant.d/gems/gems/i18n-0.6.11/lib/i18n/core_ext/hash.rb:4:in `fetch': key not found: :retries (KeyError)
    from /Users/jasghar/.vagrant.d/gems/gems/i18n-0.6.11/lib/i18n/core_ext/hash.rb:4:in `block in slice'
    from /Users/jasghar/.vagrant.d/gems/gems/i18n-0.6.11/lib/i18n/core_ext/hash.rb:4:in `each'
    from /Users/jasghar/.vagrant.d/gems/gems/i18n-0.6.11/lib/i18n/core_ext/hash.rb:4:in `slice'
    from /Users/jasghar/.vagrant.d/gems/gems/ridley-2.5.0/lib/ridley/client.rb:10:in `initialize'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in `dispatch'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
    from (celluloid):0:in `remote procedure call'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid.rb:189:in `new'
    from /Users/jasghar/.vagrant.d/gems/gems/ridley-2.5.0/lib/ridley/client.rb:146:in `initialize'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in `dispatch'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
    from (celluloid):0:in `remote procedure call'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
    from /Applications/Vagrant/embedded/gems/gems/celluloid-0.15.2/lib/celluloid.rb:189:in `new'
    from /Users/jasghar/.vagrant.d/gems/gems/ridley-2.5.0/lib/ridley.rb:27:in `new'
    from /Users/jasghar/.vagrant.d/gems/gems/vagrant-chef-zero-0.7.1/lib/vagrant-chef-zero/action/upload.rb:195:in `setup_connection'
    from /Users/jasghar/.vagrant.d/gems/gems/vagrant-chef-zero-0.7.1/lib/vagrant-chef-zero/action/upload.rb:26:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jasghar/.vagrant.d/gems/gems/vagrant-chef-zero-0.7.1/lib/vagrant-chef-zero/action/start.rb:23:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/set_name.rb:50:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/box_check_outdated.rb:33:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/jasghar/.vagrant.d/gems/gems/vagrant-chef-zero-0.7.1/lib/vagrant-chef-zero/action/reconfig.rb:33:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/env_set.rb:19:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/machine.rb:157:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/batch_action.rb:72:in `block (2 levels) in run'

@willejs
Copy link

willejs commented Sep 3, 2014

+1 having an issue with this

@reset reset merged commit 04a6dd9 into berkshelf:master Oct 23, 2014
@reset
Copy link
Collaborator

reset commented Oct 23, 2014

@coderanger thanks for providing this and sorry for sitting on it for so long

@berkshelf berkshelf locked and limited conversation to collaborators Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants