{"action":"created","issue":{"url":"https://api.github.com/repos/chef-cookbooks/compat_resource/issues/37","labels_url":"https://api.github.com/repos/chef-cookbooks/compat_resource/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/compat_resource/issues/37/comments","events_url":"https://api.github.com/repos/chef-cookbooks/compat_resource/issues/37/events","html_url":"https://github.com/chef-cookbooks/compat_resource/issues/37","id":126309282,"number":37,"title":"Exception being thrown with Chef 12.6.0","user":{"login":"nickryand","id":1466214,"avatar_url":"https://avatars.githubusercontent.com/u/1466214?v=3","gravatar_id":"","url":"https://api.github.com/users/nickryand","html_url":"https://github.com/nickryand","followers_url":"https://api.github.com/users/nickryand/followers","following_url":"https://api.github.com/users/nickryand/following{/other_user}","gists_url":"https://api.github.com/users/nickryand/gists{/gist_id}","starred_url":"https://api.github.com/users/nickryand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickryand/subscriptions","organizations_url":"https://api.github.com/users/nickryand/orgs","repos_url":"https://api.github.com/users/nickryand/repos","events_url":"https://api.github.com/users/nickryand/events{/privacy}","received_events_url":"https://api.github.com/users/nickryand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-13T00:16:04Z","updated_at":"2016-01-20T11:02:59Z","closed_at":null,"body":"Method Location: https://github.com/chef-cookbooks/compat_resource/blob/master/files/lib/chef_compat/copied_from_chef/chef/resource_builder.rb#L39\r\n\r\nI am running into this really weird issue with the upstream iptables cookbook from Chef. The call to super is throwing an exception when used on ChefDK 10 and Chef 12.6.0. I created a cookbook here that replicates the issue: https://github.com/nickryand/test-iptables.\r\n\r\nIt feels to me like the conditional operator is returning 'Object' and the 'if defined?' call on line 39 is returning true therefore 'super' is being called. However, since the conditional operator returned 'Object', the constructor does not take parameters. The call to 'super' is passing the parameters from line 38 through and the exception is throw. I do not feel like I fully understand what the code is trying to do so this could be completely wrong.\r\n\r\n```\r\n      Recipe: test::default\r\n         * iptables_rule[test] action enable\r\n\r\n           ================================================================================\r\n           Error executing action `enable` on resource 'iptables_rule[test]'\r\n           ================================================================================\r\n\r\n           ArgumentError\r\n           -------------\r\n           wrong number of arguments (1 for 0)\r\n\r\n           Cookbook Trace:\r\n           ---------------\r\n           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource_builder.rb:39:in `initialize'\r\n           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource_builder.rb:39:in `initialize'\r\n           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/declare_resource.rb:100:in `new'\r\n           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/declare_resource.rb:100:in `build_resource'\r\n           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/declare_resource.rb:67:in `declare_resource'\r\n           /tmp/kitchen/cache/cookbooks/iptables/resources/rule.rb:26:in `block in class_from_file'\r\n           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:118:in `instance_eval'\r\n           /tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb:118:in `compile_and_converge_action'\r\n\r\n       Resource Declaration:\r\n           ---------------------\r\n           # In /tmp/kitchen/cache/cookbooks/test/recipes/default.rb\r\n\r\n             9: iptables_rule 'test' do\r\n            10:   action :enable\r\n        11: end\r\n\r\n       Compiled Resource:\r\n           ------------------\r\n       # Declared in /tmp/kitchen/cache/cookbooks/test/recipes/default.rb:9:in `from_file'\r\n\r\n       iptables_rule(\"test\") do\r\n\r\n             retries 0\r\n         retry_delay 2\r\n\r\n             declared_type :iptables_rule\r\n             cookbook_name \"test\"\r\n             recipe_name \"default\"\r\n           end\r\n\r\n\r\n       Running handlers:\r\n       [2016-01-13T00:02:34+00:00] ERROR: Running exception handlers\r\n       Running handlers complete\r\n       [2016-01-13T00:02:34+00:00] ERROR: Exception handlers complete\r\n       Chef Client failed. 3 resources updated in 01 seconds\r\n       [2016-01-13T00:02:34+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out\r\n       [2016-01-13T00:02:34+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report\r\n       [2016-01-13T00:02:34+00:00] ERROR: iptables_rule[test] (test::default line 9) had an error: ArgumentError: wrong number of arguments (1 for 0)\r\n       [2016-01-13T00:02:34+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)\r\n```"},"comment":{"url":"https://api.github.com/repos/chef-cookbooks/compat_resource/issues/comments/173171977","html_url":"https://github.com/chef-cookbooks/compat_resource/issues/37#issuecomment-173171977","issue_url":"https://api.github.com/repos/chef-cookbooks/compat_resource/issues/37","id":173171977,"user":{"login":"zhelyan","id":1583967,"avatar_url":"https://avatars.githubusercontent.com/u/1583967?v=3","gravatar_id":"","url":"https://api.github.com/users/zhelyan","html_url":"https://github.com/zhelyan","followers_url":"https://api.github.com/users/zhelyan/followers","following_url":"https://api.github.com/users/zhelyan/following{/other_user}","gists_url":"https://api.github.com/users/zhelyan/gists{/gist_id}","starred_url":"https://api.github.com/users/zhelyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhelyan/subscriptions","organizations_url":"https://api.github.com/users/zhelyan/orgs","repos_url":"https://api.github.com/users/zhelyan/repos","events_url":"https://api.github.com/users/zhelyan/events{/privacy}","received_events_url":"https://api.github.com/users/zhelyan/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T11:02:59Z","updated_at":"2016-01-20T11:02:59Z","body":"same here with chef 12.5.1"}}