summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-01-29 10:52:46 -0800
committerTim Smith <tsmith@chef.io>2019-01-29 10:52:46 -0800
commit30ad75adeb0ff65e52deefa620b2bf238d0a2162 (patch)
tree7c79f2207da9035ae8f39cfde27b888a4c7696d1
parenta16ebbb01d3b591577813d3415c3a99216166e38 (diff)
downloadchef-30ad75adeb0ff65e52deefa620b2bf238d0a2162.tar.gz
Officially deprecate cookbook shadowing and audit mode
These will throw full stop deprecations now. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/application/client.rb4
-rw-r--r--lib/chef/cookbook_loader.rb4
-rw-r--r--lib/chef/deprecated.rb20
3 files changed, 20 insertions, 8 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb
index 0e5584ded3..af77f6c584 100644
--- a/lib/chef/application/client.rb
+++ b/lib/chef/application/client.rb
@@ -376,6 +376,10 @@ class Chef::Application::Client < Chef::Application
end
if mode = config[:audit_mode] || Chef::Config[:audit_mode]
+ if [:enabled, :audit_only].include?(mode)
+ Chef.deprecated(:audit_mode, "Chef's Audit mode has been deprecated and will be removed in Chef 15 (April 2019). Consider migrating to InSpec as a replacement for this functionality.")
+ end
+
expected_modes = [:enabled, :disabled, :audit_only]
unless expected_modes.include?(mode)
Chef::Application.fatal!(unrecognized_audit_mode(mode))
diff --git a/lib/chef/cookbook_loader.rb b/lib/chef/cookbook_loader.rb
index 32fd71f604..70b9e0fc50 100644
--- a/lib/chef/cookbook_loader.rb
+++ b/lib/chef/cookbook_loader.rb
@@ -68,8 +68,8 @@ class Chef
def warn_about_cookbook_shadowing
unless merged_cookbooks.empty?
- Chef::Log.deprecation "The cookbook(s): #{merged_cookbooks.join(', ')} exist in multiple places in your cookbook_path. " +
- "A composite version has been compiled. This has been deprecated since 0.10.4, in Chef 13 this behavior will be REMOVED."
+ Chef.deprecated(:cookbook_shadowing, "The cookbook(s): #{merged_cookbooks.join(', ')} exist in multiple places in your cookbook_path. " +
+ "A composite version has been compiled. This has been deprecated since 0.10.4, in Chef 15 this behavior will be REMOVED.")
end
end
diff --git a/lib/chef/deprecated.rb b/lib/chef/deprecated.rb
index 1e33fdde0a..825614b96c 100644
--- a/lib/chef/deprecated.rb
+++ b/lib/chef/deprecated.rb
@@ -207,12 +207,6 @@ class Chef
target 23
end
- class MapCollision < Base
- target 25
- end
-
- # id 3694 was deleted
-
# Returned when using the deprecated option on a property
class Property < Base
target 24
@@ -222,10 +216,24 @@ class Chef
end
end
+ class MapCollision < Base
+ target 25
+ end
+
class ShellOut < Base
target 26
end
+ class AuditMode < Base
+ target 27
+ end
+
+ class CookbookShadowing < Base
+ target 28
+ end
+
+ # id 3694 was deleted and should not be reused
+
class Generic < Base
def url
"https://docs.chef.io/chef_deprecations_client.html"