{"action":"closed","issue":{"url":"https://api.github.com/repos/chef/chef/issues/4207","repository_url":"https://api.github.com/repos/chef/chef","labels_url":"https://api.github.com/repos/chef/chef/issues/4207/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef/issues/4207/comments","events_url":"https://api.github.com/repos/chef/chef/issues/4207/events","html_url":"https://github.com/chef/chef/issues/4207","id":119231275,"number":4207,"title":"Attribute merge cache is not reset ","user":{"login":"sun77","id":16036436,"avatar_url":"https://avatars.githubusercontent.com/u/16036436?v=3","gravatar_id":"","url":"https://api.github.com/users/sun77","html_url":"https://github.com/sun77","followers_url":"https://api.github.com/users/sun77/followers","following_url":"https://api.github.com/users/sun77/following{/other_user}","gists_url":"https://api.github.com/users/sun77/gists{/gist_id}","starred_url":"https://api.github.com/users/sun77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sun77/subscriptions","organizations_url":"https://api.github.com/users/sun77/orgs","repos_url":"https://api.github.com/users/sun77/repos","events_url":"https://api.github.com/users/sun77/events{/privacy}","received_events_url":"https://api.github.com/users/sun77/received_events","type":"User","site_admin":false},"labels":[{"id":211134665,"url":"https://api.github.com/repos/chef/chef/labels/Medium%20Priority","name":"Medium Priority","color":"eb6420","default":false}],"state":"closed","locked":false,"assignee":{"login":"lamont-granquist","id":454857,"avatar_url":"https://avatars.githubusercontent.com/u/454857?v=3","gravatar_id":"","url":"https://api.github.com/users/lamont-granquist","html_url":"https://github.com/lamont-granquist","followers_url":"https://api.github.com/users/lamont-granquist/followers","following_url":"https://api.github.com/users/lamont-granquist/following{/other_user}","gists_url":"https://api.github.com/users/lamont-granquist/gists{/gist_id}","starred_url":"https://api.github.com/users/lamont-granquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamont-granquist/subscriptions","organizations_url":"https://api.github.com/users/lamont-granquist/orgs","repos_url":"https://api.github.com/users/lamont-granquist/repos","events_url":"https://api.github.com/users/lamont-granquist/events{/privacy}","received_events_url":"https://api.github.com/users/lamont-granquist/received_events","type":"User","site_admin":false},"assignees":[{"login":"lamont-granquist","id":454857,"avatar_url":"https://avatars.githubusercontent.com/u/454857?v=3","gravatar_id":"","url":"https://api.github.com/users/lamont-granquist","html_url":"https://github.com/lamont-granquist","followers_url":"https://api.github.com/users/lamont-granquist/followers","following_url":"https://api.github.com/users/lamont-granquist/following{/other_user}","gists_url":"https://api.github.com/users/lamont-granquist/gists{/gist_id}","starred_url":"https://api.github.com/users/lamont-granquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamont-granquist/subscriptions","organizations_url":"https://api.github.com/users/lamont-granquist/orgs","repos_url":"https://api.github.com/users/lamont-granquist/repos","events_url":"https://api.github.com/users/lamont-granquist/events{/privacy}","received_events_url":"https://api.github.com/users/lamont-granquist/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/chef/chef/milestones/13","html_url":"https://github.com/chef/chef/milestone/13","labels_url":"https://api.github.com/repos/chef/chef/milestones/13/labels","id":975715,"number":13,"title":"Accepted Minor","description":"Bucket to pull issues from for next minor. These issues should be fixable without needing a *major* version bump per semver; they're unlikely to cause a compatibility break or an API change.","creator":{"login":"lamont-granquist","id":454857,"avatar_url":"https://avatars.githubusercontent.com/u/454857?v=3","gravatar_id":"","url":"https://api.github.com/users/lamont-granquist","html_url":"https://github.com/lamont-granquist","followers_url":"https://api.github.com/users/lamont-granquist/followers","following_url":"https://api.github.com/users/lamont-granquist/following{/other_user}","gists_url":"https://api.github.com/users/lamont-granquist/gists{/gist_id}","starred_url":"https://api.github.com/users/lamont-granquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamont-granquist/subscriptions","organizations_url":"https://api.github.com/users/lamont-granquist/orgs","repos_url":"https://api.github.com/users/lamont-granquist/repos","events_url":"https://api.github.com/users/lamont-granquist/events{/privacy}","received_events_url":"https://api.github.com/users/lamont-granquist/received_events","type":"User","site_admin":false},"open_issues":308,"closed_issues":186,"state":"open","created_at":"2015-02-11T18:42:48Z","updated_at":"2016-12-20T22:43:17Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2015-11-27T17:59:31Z","updated_at":"2016-12-20T22:43:17Z","closed_at":"2016-12-20T22:43:17Z","body":"Hello, \n\nThis issue is linked to #3982\n\nThe following bug occurs with both chef 12.4.1 and 12.5.1.\n\nWe succeed to reproduce the issue in chef-shell : \n#### How to reproduce\n\n``` ruby\nchef:attributes > default['v1'] = 1\n => 1 \nchef:attributes (12.5.1)> node['a']                                #(1)\n => nil \nchef:attributes (12.5.1)> default['a'] = node['v1']                #(2)\n => 1 \nchef:attributes (12.5.1)> node['a']                                #(3)\n => nil \n```\n1. When we access to the attribute node['a'], the merge process set the value to 'nil'.\n2. When we set a value to node['a'] with another attribute, the merge process run on this attribute and set the \"root.top_level_breadcrumb\" value with this attribute.\n   Here => \"v1\".\n   So, the cache is reset on \"v1\" and not on \"a\".\n3. Then, when we access to node['a'], we can see the value is not updated.\n#### Conversely\n\nHere, we access first to the node['v2'] attribute.\n\n``` ruby\nchef:attributes (12.5.1)> default['v2'] = 2\n => 2\nchef:attributes (12.5.1)> node['v2']                               #(1)\n => 2 \nchef:attributes (12.5.1)> node['b']                                #(2)\n => nil \nchef:attributes (12.5.1)> default['b'] = node['v2']                #(3)\n => 2 \nchef:attributes (12.5.1)> node['b']                                #(4)\n => 2\n```\n1. We access first to the node['v2'] value.\n2. When we access to the attribute node['b'], the merge process set the value to 'nil'.\n3. When we set a value to node['b'] with another attribute, the merge process run correctly and reset the attribute \"b\"\n4. Then, when we access to node['b'], we can see the value is updated because of the access in step 2.\n## Conclusion\n\nSo, we strongly suppose there is a bug in the way to reset the attribute merge cache.\n\ncc:@aboten\n"}}
{"actor":{"display_login":"lamont-granquist"}}