From 3ce17eb29da56285d57130a1baad9127e92ccaba Mon Sep 17 00:00:00 2001 From: Remy Mathieu Date: Tue, 5 Mar 2019 12:03:02 +0100 Subject: [PATCH 1/2] Log deprecation message for recipes using easy_install. --- recipes/ddtrace-python.rb | 5 +++++ recipes/dogstatsd-python.rb | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/recipes/ddtrace-python.rb b/recipes/ddtrace-python.rb index d56fb0b2..cd869ac6 100644 --- a/recipes/ddtrace-python.rb +++ b/recipes/ddtrace-python.rb @@ -6,6 +6,11 @@ # NB: This recipe is compatible with Chef <= 12 only. If you're using Chef 13 or higher # please refer to the README of the cookbook. +log 'message' do + message 'This recipe will be deprecated in version 3.0.0 of the cookbook. See README.md chapter ddtrace-python for more infos.' + level :warn +end + easy_install_package 'ddtrace' do version node['datadog']['ddtrace_python_version'] end diff --git a/recipes/dogstatsd-python.rb b/recipes/dogstatsd-python.rb index 74996ef8..daf5c98c 100644 --- a/recipes/dogstatsd-python.rb +++ b/recipes/dogstatsd-python.rb @@ -20,4 +20,9 @@ # NB: This recipe is compatible with Chef <= 12 only. If you're using Chef 13 or higher # please refer to the README of the cookbook. +log 'message' do + message 'This recipe will be deprecated in version 3.0.0 of the cookbook. See README.md chapter dogstatsd-python for more infos.' + level :warn +end + easy_install_package 'dogstatsd-python' From 5ed9c78d7b610d5ef15a6989cdf1579d03cd6b33 Mon Sep 17 00:00:00 2001 From: Remy Mathieu Date: Thu, 7 Mar 2019 11:33:12 +0100 Subject: [PATCH 2/2] Better warning messages for depreaction of ddtrace-python and dogstatsd-python. --- recipes/ddtrace-python.rb | 5 +---- recipes/dogstatsd-python.rb | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/recipes/ddtrace-python.rb b/recipes/ddtrace-python.rb index cd869ac6..1f5d02a6 100644 --- a/recipes/ddtrace-python.rb +++ b/recipes/ddtrace-python.rb @@ -6,10 +6,7 @@ # NB: This recipe is compatible with Chef <= 12 only. If you're using Chef 13 or higher # please refer to the README of the cookbook. -log 'message' do - message 'This recipe will be deprecated in version 3.0.0 of the cookbook. See README.md chapter ddtrace-python for more infos.' - level :warn -end +Chef::Log.warn 'The ddtrace-python recipe will be deprecated in version 3.0.0 of the datadog cookbook. See README.md section ddtrace-python for more info.' easy_install_package 'ddtrace' do version node['datadog']['ddtrace_python_version'] diff --git a/recipes/dogstatsd-python.rb b/recipes/dogstatsd-python.rb index daf5c98c..7b6861b5 100644 --- a/recipes/dogstatsd-python.rb +++ b/recipes/dogstatsd-python.rb @@ -20,9 +20,6 @@ # NB: This recipe is compatible with Chef <= 12 only. If you're using Chef 13 or higher # please refer to the README of the cookbook. -log 'message' do - message 'This recipe will be deprecated in version 3.0.0 of the cookbook. See README.md chapter dogstatsd-python for more infos.' - level :warn -end +Chef::Log.warn 'The dogstatsd-python recipe will be deprecated in version 3.0.0 of the datadog cookbook. See README.md section dogstatsd-python for more info.' easy_install_package 'dogstatsd-python'