{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef/issues/4127","labels_url":"https://api.github.com/repos/chef/chef/issues/4127/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef/issues/4127/comments","events_url":"https://api.github.com/repos/chef/chef/issues/4127/events","html_url":"https://github.com/chef/chef/issues/4127","id":114627964,"number":4127,"title":"LWRP non-string default values of new_resource are missing after hash conversion in chef client>12.4.3","user":{"login":"wp-vtuska","id":15613827,"avatar_url":"https://avatars.githubusercontent.com/u/15613827?v=3","gravatar_id":"","url":"https://api.github.com/users/wp-vtuska","html_url":"https://github.com/wp-vtuska","followers_url":"https://api.github.com/users/wp-vtuska/followers","following_url":"https://api.github.com/users/wp-vtuska/following{/other_user}","gists_url":"https://api.github.com/users/wp-vtuska/gists{/gist_id}","starred_url":"https://api.github.com/users/wp-vtuska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wp-vtuska/subscriptions","organizations_url":"https://api.github.com/users/wp-vtuska/orgs","repos_url":"https://api.github.com/users/wp-vtuska/repos","events_url":"https://api.github.com/users/wp-vtuska/events{/privacy}","received_events_url":"https://api.github.com/users/wp-vtuska/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-11-02T16:14:51Z","updated_at":"2015-11-02T23:42:30Z","closed_at":null,"body":"The following code doesn't work in chef client 12.5.1 https://gist.github.com/wp-vtuska/9b093542a6e03f37e709\r\nIt is only a gutted example. We are using the hash format of the new_resource object as a template variable. It worked before 12.5.1. \r\n\r\nIt looks like the undefined non-string default resource attribute values are missing from instance_variables even if we tried to access them explicitly before the object hash conversion. Is it an intentional modification in the newer chef client?\r\n\r\nCurrent workarounds:\r\n1. new_resource.variable = new_resource.variable\r\n2. using only string attribute values"},"comment":{"url":"https://api.github.com/repos/chef/chef/issues/comments/153194411","html_url":"https://github.com/chef/chef/issues/4127#issuecomment-153194411","issue_url":"https://api.github.com/repos/chef/chef/issues/4127","id":153194411,"user":{"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},"created_at":"2015-11-02T23:42:30Z","updated_at":"2015-11-02T23:42:30Z","body":"I think I'm :-1: on it being a flag to `.to_hash`\r\n\r\nI think if we want to fix it that .to_hash should just call a method which walks the list of properties and vivifies them before rendering the object."}}