Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object_to_hash fails with recursive-open-struct v1.3.0 #161

Open
agrare opened this issue Oct 3, 2024 · 0 comments
Open

Object_to_hash fails with recursive-open-struct v1.3.0 #161

agrare opened this issue Oct 3, 2024 · 0 comments

Comments

@agrare
Copy link
Collaborator

agrare commented Oct 3, 2024

TypeError:
       no implicit conversion of Hash into Integer
     # ~/.gem/ruby/3.1.6/gems/fog-kubevirt-1.4.0/lib/fog/kubevirt/compute/compute.rb:96:in `[]='
     # ~/.gem/ruby/3.1.6/gems/fog-kubevirt-1.4.0/lib/fog/kubevirt/compute/compute.rb:96:in `block in object_to_hash'
     # ~/.gem/ruby/3.1.6/gems/fog-kubevirt-1.4.0/lib/fog/kubevirt/compute/compute.rb:95:in `each'
     # ~/.gem/ruby/3.1.6/gems/fog-kubevirt-1.4.0/lib/fog/kubevirt/compute/compute.rb:95:in `object_to_hash'
     # ~/.gem/ruby/3.1.6/gems/fog-kubevirt-1.4.0/lib/fog/kubevirt/compute/requests/list_nodes.rb:7:in `block in list_nodes'
     # ~/.gem/ruby/3.1.6/gems/fog-kubevirt-1.4.0/lib/fog/kubevirt/compute/requests/list_nodes.rb:7:in `list_nodes'
     # ~/.gem/ruby/3.1.6/gems/fog-kubevirt-1.4.0/lib/fog/kubevirt/compute/models/nodes.rb:13:in `all'

The issue appears to be that now #marshal_dump returns an array rather than just the ostruct hash, causing this loop https://github.com/fog/fog-kubevirt/blob/master/lib/fog/kubevirt/compute/compute.rb#L94 to loop over the [hash, options] rather than the hash keys, vals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant