Skip to content

Commit 7134a68

Browse files
lrafeeimergify[bot]hmstepanek
authored
Deprecate record_deploy command (#1500)
* Deprecate record_deploy command * Add alternative to deprecation message * import warnings * [MegaLinter] Apply linters fixes * Update newrelic/admin/record_deploy.py Co-authored-by: Hannah Stepanek <[email protected]> --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Hannah Stepanek <[email protected]> Co-authored-by: hmstepanek <[email protected]>
1 parent 00f1b14 commit 7134a68

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

newrelic/admin/record_deploy.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import getpass
16+
import warnings
1617

1718
from newrelic.admin import command, usage
1819
from newrelic.common import agent_http, encoding_utils
@@ -109,6 +110,15 @@ def record_deploy(
109110
def record_deploy_cmd(args):
110111
import sys
111112

113+
# Deprecation Warning
114+
warnings.warn(
115+
(
116+
"The record_deploy command is deprecated and will be removed in the next major release. It is being removed in favor of other methods of creating a change tracking marker. See the documentation for replacement alternatives: https://docs.newrelic.com/docs/change-tracking/change-tracking-introduction/"
117+
),
118+
DeprecationWarning,
119+
stacklevel=2,
120+
)
121+
112122
if len(args) < 2:
113123
usage("record-deploy")
114124
sys.exit(1)

newrelic/newrelic.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ browser_monitoring.auto_instrument = true
187187
# https://docs.newrelic.com/docs/apm/apm-ui-pages/events/thread-profiler-tool/
188188
thread_profiler.enabled = true
189189

190+
# This setting has been deprecated and will be removed in the
191+
# next major release:
190192
# Your application deployments can be recorded through the
191193
# New Relic REST API. To use this feature provide your API key
192194
# below then use the `newrelic-admin record-deploy` command.

0 commit comments

Comments
 (0)