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 12 throws warnings for compile_time resources #189

Closed
wickett opened this issue Mar 24, 2015 · 3 comments · Fixed by #196
Closed

Chef 12 throws warnings for compile_time resources #189

wickett opened this issue Mar 24, 2015 · 3 comments · Fixed by #196
Assignees
Labels
Milestone

Comments

@wickett
Copy link
Contributor

wickett commented Mar 24, 2015

With Chef 12 these warnings now show up for the chef-datadog cookbook.

[2015-03-24T15:38:02+00:00] WARN: chef_gem[chef-handler-datadog] chef_gem compile_time installation is deprecated
[2015-03-24T15:38:02+00:00] WARN: chef_gem[chef-handler-datadog] Please set `compile_time false` on the resource to use the new behavior.
[2015-03-24T15:38:02+00:00] WARN: chef_gem[chef-handler-datadog] or set `compile_time true` on the resource if compile_time behavior is required.

As noted by @jtimberman these can be fixed by adding this line to the resource for maximum backward compatibility.

 compile_time true if Chef::Resource::ChefGem.instance_methods(false).include?(:compile_time)

See http://jtimberman.housepub.org/blog/2015/03/20/chef-gem-compile-time-compatibility/

@wickett
Copy link
Contributor Author

wickett commented Mar 31, 2015

Any update on this?

@alq666
Copy link
Member

alq666 commented Mar 31, 2015

@wickett thanks for filing the issue.

@miketheman any thoughts on this?

@miketheman
Copy link
Contributor

Thanks for reporting this. There's been an ongoing thread on the Chef mailing lists on the behavior of compile_time and Chef 12.
Yesterday, a post-mortem was produced: https://gist.github.com/thommay/42b033d2c877e74e6b1a

Chef have also publicly apologized for introducing the WARN spam here: https://www.chef.io/blog/2015/02/17/chef-12-1-0-chef_gem-resource-warnings/

Before changing the behavior, we would likely need to test whether or not we should be running at compile_time any more.

miketheman added a commit that referenced this issue Apr 9, 2015
In Chef 12, the compile_time behavior flag was added, leading to WARN
messages showing up in the Chef Client execution.

Since the current method to invoke a handler is via a recipe, we need to
install the gem during compile time to allow loading the handler to
caputer execution items.

See https://www.chef.io/blog/2015/02/17/chef-12-1-0-chef_gem-resource-warnings/
for more details on the new flag.

Fixes #189
@miketheman miketheman added this to the Next minor milestone Apr 9, 2015
@miketheman miketheman self-assigned this Apr 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants