Skip to content

Commit

Permalink
add deprecation notice for operation_name configuration option
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Dec 5, 2023
1 parent be56e57 commit 7b14b71
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 9 deletions.
10 changes: 10 additions & 0 deletions lib/datadog/ci/contrib/cucumber/configuration/settings.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require "datadog/core"

require_relative "../ext"
require_relative "../../settings"

Expand All @@ -26,6 +28,14 @@ class Settings < Datadog::CI::Contrib::Settings
o.type :string
o.env Ext::ENV_OPERATION_NAME
o.default Ext::OPERATION_NAME

o.after_set do |value|
if value
Datadog::Core.log_deprecation do
"The operation_name setting has no effect and will be removed in 1.0"
end
end
end
end
end
end
Expand Down
8 changes: 8 additions & 0 deletions lib/datadog/ci/contrib/minitest/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ class Settings < Datadog::CI::Contrib::Settings
o.type :string
o.env Ext::ENV_OPERATION_NAME
o.default Ext::OPERATION_NAME

o.after_set do |value|
if value
Datadog::Core.log_deprecation do
"The operation_name setting has no effect and will be removed in 1.0"
end
end
end
end
end
end
Expand Down
8 changes: 8 additions & 0 deletions lib/datadog/ci/contrib/rspec/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ class Settings < Datadog::CI::Contrib::Settings
o.type :string
o.env Ext::ENV_OPERATION_NAME
o.default Ext::OPERATION_NAME

o.after_set do |value|
if value
Datadog::Core.log_deprecation do
"The operation_name setting has no effect and will be removed in 1.0"
end
end
end
end
end
end
Expand Down
1 change: 1 addition & 0 deletions vendor/rbs/ddtrace/0/datadog/core.rbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module Datadog
module Core
def self.log_deprecation: () ?{() -> untyped} -> untyped
end

extend Core::Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,19 @@ module Datadog

attr_reader default: untyped

attr_reader experimental_default_proc: untyped
attr_reader default_proc: untyped

attr_reader env: untyped

attr_reader deprecated_env: untyped

attr_reader env_parser: untyped

attr_reader delegate_to: untyped

attr_reader depends_on: untyped

attr_reader name: untyped

attr_reader on_set: untyped
attr_reader after_set: untyped

attr_reader resetter: untyped

Expand All @@ -39,9 +37,7 @@ module Datadog

def default: (?untyped? value) ?{ () -> untyped } -> untyped

def experimental_default_proc: () { () -> untyped } -> untyped

def delegate_to: () { () -> untyped } -> untyped
def default_proc: () { () -> untyped } -> untyped

def env: (untyped value) -> untyped

Expand All @@ -53,7 +49,7 @@ module Datadog

def helper: (untyped name, *untyped _args) { () -> untyped } -> untyped

def on_set: () { (untyped value) -> untyped } -> untyped
def after_set: () { (untyped value) -> untyped } -> untyped

def resetter: () { (untyped value) -> untyped } -> untyped

Expand All @@ -63,7 +59,7 @@ module Datadog

def to_definition: () -> untyped

def meta: () -> { default: untyped, delegate_to: untyped, depends_on: untyped, on_set: untyped, resetter: untyped, setter: untyped }
def meta: () -> { default: untyped, after_set: untyped, resetter: untyped, setter: untyped }
end
end
end
Expand Down

0 comments on commit 7b14b71

Please sign in to comment.