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

Chef-13: remove method_missing access to node object. #5895

Merged
merged 2 commits into from Mar 14, 2017

Conversation

lamont-granquist
Copy link
Contributor

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

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>
@lamont-granquist
Copy link
Contributor Author

@chef/client-core travis willing this should be ready to review

@coderanger
Copy link
Contributor

yjliv51

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
@stevendanna
Copy link
Contributor

gif-keyboard-17097229626904590709

@lamont-granquist lamont-granquist merged commit 7b65a18 into master Mar 14, 2017
@lamont-granquist lamont-granquist deleted the lcg/remove-node-method-missing branch March 14, 2017 01:14
@lamont-granquist lamont-granquist added the Type: Enhancement Adds new functionality. label Mar 21, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants