Skip to content

Commit

Permalink
set MINIMUM_RUBY_VERSION to 2.7, use filter_map
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Jan 29, 2024
1 parent b711660 commit 7512edf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/datadog/ci/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def self.add_settings!(base)
o.after_set do |value|
if value
Datadog::Core.log_deprecation do
"The experimental_test_suite_level_visibility_enabled setting has no effect and will be removed in 1.0. " \
"The experimental_test_suite_level_visibility_enabled setting has no effect and will be removed in 2.0. " \
"Test suite level visibility is now enabled by default. " \
"If you want to disable test suite level visibility set configuration.ci.force_test_level_visibility = true."
end
Expand Down
8 changes: 1 addition & 7 deletions lib/datadog/ci/test_visibility/transport.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,7 @@ def send_payload(encoded_payload)

def encode_traces(traces)
traces.flat_map do |trace|
spans = trace.spans
# TODO: remove condition when 1.0 is released
if spans.respond_to?(:filter_map)
spans.filter_map { |span| encode_span(trace, span) }
else
spans.map { |span| encode_span(trace, span) }.reject(&:nil?)
end
trace.spans.filter_map { |span| encode_span(trace, span) }
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/ci/transport/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def adapter
end

# this is needed because Datadog::Tracing::Writer is not fully compatiple with Datadog::Core::Transport
# TODO: remove before 1.0 when CI implements its own worker
# TODO: remove when CI implements its own worker
class ResponseDecorator < ::SimpleDelegator
def trace_count
0
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/ci/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module VERSION

STRING = [MAJOR, MINOR, PATCH, PRE, BUILD].compact.join(".")

MINIMUM_RUBY_VERSION = "2.1.0"
MINIMUM_RUBY_VERSION = "2.7.0"

# Restrict the installation of this gem with untested future versions of Ruby.
#
Expand Down

0 comments on commit 7512edf

Please sign in to comment.