Chef Deprecation Warnings

[edit on GitHub]

When we wish to remove a feature or an API in Chef, we try to first mark it with a deprecation warning that contains a link to a description of the change and how to fix it. For example:

Deprecated features used!
  JSON auto inflation is not supported (CHEF-1) at (irb):7:in `irb_binding'.
  Please see for further details and information on how to correct this problem.

Testing for Deprecations

To test your code for deprecations, you can put Test Kitchen in a mode where any deprecations cause the chef run to fail. Ensure your .kitchen.yml includes:

  deprecations_as_errors: true

and then run Test Kitchen as usual. Test Kitchen will fail if any deprecation errors are issued. This feature was added in Test Kitchen 1.13, which shipped in ChefDK 1.0.

All Deprecations

ID Description Deprecated Expected Removal
CHEF-0 Many internal APIs have been improved. various varies
CHEF-1 Consumers of JSON are now required to be explicit in how it is turned in to a Chef object. 12.7.2 13.0
CHEF-2 Chef’s exit codes are now defined so that it’s easy to understand why Chef exited. 12.11.4 13.0
CHEF-3 When using the chef_gem resource, the phase to install the gem in must be specified. 12.1.0 13.0
CHEF-4 Various improvements have been made to attribute syntax. various varies
CHEF-5 Various improvements have been made to custom resource syntax. various varies
CHEF-6 The easy_install resource will be removed. 12.10.17 13.0
CHEF-7 The verify metaproperty’s file substitution will be removed. 12.5.1 13.0
CHEF-8 The supports metaproperty will be removed. 12.14.17 13.0
CHEF-9 The Chef::REST API will be removed. 12.7.2 13.0
CHEF-13 Deprecated Chef::Platform methods 12.18.x 13.0
CHEF-3694 Resource Cloning will no longer work. 10.18.0 13.0