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

Warnings from Hashie gem #1665

Closed
shortdudey123 opened this issue Feb 1, 2017 · 2 comments
Closed

Warnings from Hashie gem #1665

shortdudey123 opened this issue Feb 1, 2017 · 2 comments

Comments

@shortdudey123
Copy link

I updated the hashie in my gemfile to the newest (3.5.1) and am getting warnings now anytime i use the berks command

W, [2017-01-31T17:36:52.072937 #15970]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-01-31T17:36:52.073207 #15970]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-01-31T17:36:52.073426 #15970]  WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-01-31T17:36:52.073604 #15970]  WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-01-31T17:36:52.161900 #15970]  WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#default defined in Hash. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-01-31T17:36:52.162095 #15970]  WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#default defined in Hash. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.

These warnings were added by Hashie:
hashie/hashie#381

I will see if i can track down what in Berkshelf is causing these warnings. Using these warnings show up before any other log messages even with --debug

@shortdudey123
Copy link
Author

Looks like Hashie::Mash is actually called downstream in ridley

@shortdudey123
Copy link
Author

Moved to ridley repo

exospheredata pushed a commit to exospheredata/veeam that referenced this issue Feb 8, 2017
UPDATE:  metadata.rb dependency to include ms_dotnet cookbook.
ADD:  recipes/catalog.rb to install Veeam Backup Catalog server from the ISO and install DOTNET 4.5.2
ADD:  unit/recipes/catalog_spec.rb and unit/recipes/veeam_catalog_spec.rb initial test files
ADD:  spec matcher helper for tests
ADD:  LWRP for veeam_catalog
ADD:  inspec profile test for Catalog
UPDATE:   windows_helper.rb to include mocking win_friendly_path method
UPDATE:   Gemfile to set berkshelf to 5.6.2 to resolve issues with berkshelf/berkshelf#1665
exospheredata pushed a commit to exospheredata/veeam that referenced this issue Feb 13, 2017
* feature/veeam_server:
  ADD:  recipes/catalog.rb to install Veeam Backup Catalog server from the ISO and install DOTNET 4.5.2
  ADD:  unit/recipes/catalog_spec.rb and unit/recipes/veeam_catalog_spec.rb initial test files
  ADD:  spec matcher helper for tests
  ADD:  LWRP for veeam_catalog
  ADD:  inspec profile test for Catalog
  UPDATE:   windows_helper.rb to include mocking win_friendly_path method
  UPDATE:   Gemfile to set berkshelf to 5.6.2 to resolve issues with berkshelf/berkshelf#1665
  ADD:  default attributes file and node attributes for catalog provider
  UPDATE:  catalog resource to handle optional installation arguments
  UPDATE:  catalog provider to include refactoring of the installation process to DRY up the code base and improve reusability of the methods. Include support for installation with optional parameters. Added a lot of robust logging and error handling
  UPDATE:  catalog recipe to include optional installation arguments based on node attributes
  UPDATE:  overhaul on veeam_catalog_spec unit tests to cover more scenarios based on changes
  UPDATE:  README.md with details on Catalog LWRP
  UPDATE:  default.rb Copyright details
  UPDATE:  metadata.rb dependency to include ms_dotnet cookbook.
  UPDATE:  README to include details on the username requirements to include the computer name or domain name in the account.
lamont-granquist added a commit to chef/chef that referenced this issue Mar 13, 2017
So again the reasons why we break this:

- node.class vs. node['class'] kinds of problems
- adding node#foo to Chef::Node as an extension to the API and
  breaking node.foo meaning node["foo"] (we can't make exensions
  to that class without possibly breaking someone)
- crazy things like the old CHEF-3799 issue in the old ticketing
  system where IO#puts in ruby blindly calls #to_ary on stuff and
  expects it to raise -- whereas we would potentially autovivify
  a 'to_ary' hash key and return nil which breaks the world.

This also has caused issues with the hashie gem and they've gone to
spamming warnings by default to try to deal with it:

berkshelf/berkshelf#1665

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
@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
None yet
Projects
None yet
Development

No branches or pull requests

1 participant