Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

Fix enabling Chef 13 warnings as errors #73

Conversation

zuazo
Copy link

@zuazo zuazo commented Feb 25, 2017

Description

The YAML keys used here and other cookbooks to enable treating Chef 13 warnings as errors are wrong. They are currently being ignored.

After doing some tests, I think the Preparing for Chef Client 13 blog post example is a bit incomplete. Two things should be clarified:

  • Those options must be under the provisioner key.
  • Test-kitchen uses chef_solo provisioner by default. The correct sub-key used for Chef Solo is solo_rb, not client_rb.

So, the proper way to enable them with Chef Solo is:

provisioner:
  name: chef_solo # This is the default value if not specified
  solo_rb:
    treat_deprecation_warnings_as_errors: true
    resource_cloning: false

If you want to enable them with Chef Zero:

provisioner:
  name: chef_zero
  client_rb:
    treat_deprecation_warnings_as_errors: true
    resource_cloning: false

There is a way that works for both Chef Solo and Chef Zero, but AFAIK there is no way to disable resource cloning:

provisioner:
  deprecations_as_errors: true

Issues Resolved

Related Issues in Other Cookbooks

Check List

  • All tests pass.
  • New functionality includes testing
  • New functionality has been documented in the README if applicable

CC @thommay

@damacus damacus closed this Feb 27, 2017
@damacus
Copy link
Contributor

damacus commented Feb 27, 2017

This is now in the default config in my PR #74

@zuazo
Copy link
Author

zuazo commented Feb 27, 2017

OK. Yes, using Chef Zero is always better than Chef Solo.

@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants