From 3f4560a6103e619f6ef1bfc1991b6e5d9167a31e Mon Sep 17 00:00:00 2001 From: quinna-h Date: Mon, 9 Dec 2024 12:55:35 -0500 Subject: [PATCH 01/43] add supported version script and table --- find_min_gemfile.rb | 145 +++++++++++++++++++++++++++ generate_table_versions.py | 21 ++++ integration_versions.md | 50 ++++++++++ minimum_gem_output.json | 194 +++++++++++++++++++++++++++++++++++++ 4 files changed, 410 insertions(+) create mode 100644 find_min_gemfile.rb create mode 100644 generate_table_versions.py create mode 100644 integration_versions.md create mode 100644 minimum_gem_output.json diff --git a/find_min_gemfile.rb b/find_min_gemfile.rb new file mode 100644 index 00000000000..ac87c557b3e --- /dev/null +++ b/find_min_gemfile.rb @@ -0,0 +1,145 @@ +require 'pathname' +require 'rubygems' +require 'json' + +def parse_gemfiles(directory = 'gemfiles/') + parsed_gems_ruby = {} + parsed_gems_jruby = {} + + gemfiles = Dir.glob(File.join(directory, '*')) + gemfiles.each do |gemfile_name| + runtime = File.basename(gemfile_name).split('_').first # ruby or jruby + # puts "Runtime: #{runtime}" + File.foreach(gemfile_name) do |line| + if gem_details = parse_gemfile_entry(line) + gem_name, version = gem_details + elsif gem_details = parse_gemfile_lock_entry(line) + gem_name, version = gem_details + else + next + end + + # Validate and store the minimum version + if version_valid?(version) + if runtime == 'ruby' + if parsed_gems_ruby[gem_name].nil? || Gem::Version.new(version) < Gem::Version.new(parsed_gems_ruby[gem_name]) + parsed_gems_ruby[gem_name] = version + end + end + if runtime == 'jruby' + if parsed_gems_jruby[gem_name].nil? || Gem::Version.new(version) < Gem::Version.new(parsed_gems_jruby[gem_name]) + parsed_gems_jruby[gem_name] = version + end + end + else + next + end + end + end + + [parsed_gems_ruby, parsed_gems_jruby] + end + + + # Helper: Parse a Gemfile-style gem declaration + # ex. gem 'ruby-kafka', '~> 5.0' + def parse_gemfile_entry(line) + if match = line.match(/^\s*gem\s+["']([^"']+)["']\s*,?\s*["']?([^"']*)["']?/) + gem_name, version_constraint = match[1], match[2] + version = extract_version(version_constraint) + [gem_name, version] + end + end + + # Helper: Parse a Gemfile.lock-style entry + # matches on ex. actionmailer (= 6.0.6) + def parse_gemfile_lock_entry(line) + if match = line.match(/^\s*([a-z0-9_-]+)\s+\(([^)]+)\)/) + [match[1], match[2]] + end + end + + # Helper: Validate the version format + def version_valid?(version) + version =~ /^\d+(\.\d+)*$/ + end + + # Helper: Extract the actual version number from a constraint + # Matches on the following version patterns: + # 1. "pessimistic" versions, ex. '~> 1.2.3' + # 2. '>= 1.2.3' + # 3. 1.2.3 + def extract_version(constraint) + if constraint =~ /\~>\s*([\d\.]+)/ || constraint =~ /\>=\s*([\d\.]+)/ || constraint =~ /([\d\.]+)/ + Regexp.last_match(1) + else + nil + end + end + + +def get_integration_names(directory = 'lib/datadog/tracing/contrib/') + unless Dir.exist?(directory) + puts "Directory '#{directory}' not found!" + return [] + end + + # Get all subdirectories inside the specified directory + integrations = Dir.children(directory).select do |entry| + File.directory?(File.join(directory, entry)) + end + + integrations +end + +mapping = { + "action_mailer" => "actionmailer", + "opensearch" => "opensearch-ruby", + "concurrent_ruby" => "concurrent-ruby", + "action_view" => "actionview", + "action_cable" => "actioncable", + "active_record" => "activerecord", + "mongodb" => "mongo", + "rest_client" => "rest-client", + "active_support" => "activesupport", + "action_pack" => "actionpack", + "active_job" => "activejob", + "httprb" => "http", + "kafka" => "ruby-kafka", + "presto" => "presto-client", + "aws" => "aws-sdk-core" +} + +excluded = ["configuration", "propagation", "utils"] +parsed_gems_ruby, parsed_gems_jruby = parse_gemfiles("gemfiles/") +integrations = get_integration_names('lib/datadog/tracing/contrib/') + +integration_json_mapping = {} + +integrations.each do |integration| + if excluded.include?(integration) + next + end + # puts "integration: #{integration}" + integration_name = mapping[integration] || integration + + min_version_jruby = parsed_gems_jruby[integration_name] + min_version_ruby = parsed_gems_ruby[integration_name] + + # if min_version_ruby + # puts "minimum version of gem '#{integration_name} for Ruby': #{min_version_ruby}" + # end + # if min_version_jruby + # puts "minimum version of gem '#{integration_name} for JRuby': #{min_version_jruby}" + # end + + # mapping jruby, ruby + integration_json_mapping[integration] = [min_version_ruby, min_version_jruby] + integration_json_mapping.replace(integration_json_mapping.sort.to_h) + +end + + +File.open("minimum_gem_output.json", "w") do |f| + f.write(JSON.pretty_generate(integration_json_mapping)) +end diff --git a/generate_table_versions.py b/generate_table_versions.py new file mode 100644 index 00000000000..739e9e439e3 --- /dev/null +++ b/generate_table_versions.py @@ -0,0 +1,21 @@ +import json +import pandas as pd + +input_file = 'minimum_gem_output.json' +with open(input_file, 'r') as file: + data = json.load(file) + +rows = [] +for integration_name, versions in data.items(): + ruby_min, jruby_min = versions + rows.append({"Integration": integration_name, "Ruby Min": ruby_min, "JRuby Min": jruby_min}) + +df = pd.DataFrame(rows) + +output_file = 'integration_versions.md' + +with open(output_file, 'w') as md_file: + md_file.write("| Integration | Ruby Min | JRuby Min |\n") + md_file.write("|-------------|-----------|----------|\n") + for _, row in df.iterrows(): + md_file.write(f"| {row['Integration']} | {row['Ruby Min']} | {row['JRuby Min']} |\n") \ No newline at end of file diff --git a/integration_versions.md b/integration_versions.md new file mode 100644 index 00000000000..a4ff823eac3 --- /dev/null +++ b/integration_versions.md @@ -0,0 +1,50 @@ +| Integration | Ruby Min | JRuby Min | +|-------------|-----------|----------| +| action_cable | 5.2.8.1 | 5.2.8.1 | +| action_mailer | 4.2.11.3 | 5.2.8.1 | +| action_pack | 4.2.11.3 | 5.2.8.1 | +| action_view | 4.2.11.3 | 5.2.8.1 | +| active_job | 4.2.11.3 | 5.2.8.1 | +| active_model_serializers | 0.10.0 | 0.10.0 | +| active_record | 4.2.11.3 | 5 | +| active_support | 4.2.11.3 | 5 | +| aws | 3.181.0 | 3.181.0 | +| concurrent_ruby | 1.2.2 | 1.1.10 | +| dalli | 2.7.11 | 2.7.11 | +| delayed_job | 4.1.11 | 4.1.11 | +| elasticsearch | 7 | 7 | +| ethon | 0.16.0 | 0.14.0 | +| excon | 0.102.0 | 0.102.0 | +| faraday | 0.17 | 0.17 | +| grape | 1.7.0 | 1.7.0 | +| graphql | 1.13.0 | 1.13.0 | +| grpc | 1.38.0 | None | +| hanami | 1 | None | +| http | 5.0.1 | 4 | +| httpclient | 2.8.3 | 2.8.3 | +| httprb | 5.0.1 | 4 | +| kafka | 0.7.10 | 0.7.10 | +| lograge | 0.11 | 0.11 | +| mongodb | 2.8.0 | 2.8.0 | +| mysql2 | 0.5 | None | +| opensearch | 2 | 2 | +| pg | 0.18.4 | None | +| presto | 0.5.14 | 0.5.14 | +| que | 1.0.0 | 1.0.0 | +| racecar | 0.3.5 | 0.3.5 | +| rack | 1 | 1 | +| rails | 4.2.11.3 | 5.2.1 | +| rake | 10.5 | 10.5 | +| redis | 3 | 3 | +| resque | 2.0 | 2.0 | +| rest_client | 2.1.0 | 2.1.0 | +| roda | 2.0.0 | 2.0.0 | +| semantic_logger | 4.0 | 4.0 | +| sequel | 5.83.1 | 5.83.1 | +| shoryuken | 6.0.0 | 6.0.0 | +| sidekiq | 5.2.8 | 6.1.2 | +| sinatra | 2 | 2 | +| sneakers | 2.12.0 | 2.12.0 | +| stripe | 5.15.0 | 5.15.0 | +| sucker_punch | 3.1.0 | 3.1.0 | +| trilogy | 2.6.0 | None | diff --git a/minimum_gem_output.json b/minimum_gem_output.json new file mode 100644 index 00000000000..a7855020f14 --- /dev/null +++ b/minimum_gem_output.json @@ -0,0 +1,194 @@ +{ + "action_cable": [ + "5.2.8.1", + "5.2.8.1" + ], + "action_mailer": [ + "4.2.11.3", + "5.2.8.1" + ], + "action_pack": [ + "4.2.11.3", + "5.2.8.1" + ], + "action_view": [ + "4.2.11.3", + "5.2.8.1" + ], + "active_job": [ + "4.2.11.3", + "5.2.8.1" + ], + "active_model_serializers": [ + "0.10.0", + "0.10.0" + ], + "active_record": [ + "4.2.11.3", + "5" + ], + "active_support": [ + "4.2.11.3", + "5" + ], + "aws": [ + "3.181.0", + "3.181.0" + ], + "concurrent_ruby": [ + "1.2.2", + "1.1.10" + ], + "dalli": [ + "2.7.11", + "2.7.11" + ], + "delayed_job": [ + "4.1.11", + "4.1.11" + ], + "elasticsearch": [ + "7", + "7" + ], + "ethon": [ + "0.16.0", + "0.14.0" + ], + "excon": [ + "0.102.0", + "0.102.0" + ], + "faraday": [ + "0.17", + "0.17" + ], + "grape": [ + "1.7.0", + "1.7.0" + ], + "graphql": [ + "1.13.0", + "1.13.0" + ], + "grpc": [ + "1.38.0", + null + ], + "hanami": [ + "1", + null + ], + "http": [ + "5.0.1", + "4" + ], + "httpclient": [ + "2.8.3", + "2.8.3" + ], + "httprb": [ + "5.0.1", + "4" + ], + "kafka": [ + "0.7.10", + "0.7.10" + ], + "lograge": [ + "0.11", + "0.11" + ], + "mongodb": [ + "2.8.0", + "2.8.0" + ], + "mysql2": [ + "0.5", + null + ], + "opensearch": [ + "2", + "2" + ], + "pg": [ + "0.18.4", + null + ], + "presto": [ + "0.5.14", + "0.5.14" + ], + "que": [ + "1.0.0", + "1.0.0" + ], + "racecar": [ + "0.3.5", + "0.3.5" + ], + "rack": [ + "1", + "1" + ], + "rails": [ + "4.2.11.3", + "5.2.1" + ], + "rake": [ + "10.5", + "10.5" + ], + "redis": [ + "3", + "3" + ], + "resque": [ + "2.0", + "2.0" + ], + "rest_client": [ + "2.1.0", + "2.1.0" + ], + "roda": [ + "2.0.0", + "2.0.0" + ], + "semantic_logger": [ + "4.0", + "4.0" + ], + "sequel": [ + "5.83.1", + "5.83.1" + ], + "shoryuken": [ + "6.0.0", + "6.0.0" + ], + "sidekiq": [ + "5.2.8", + "6.1.2" + ], + "sinatra": [ + "2", + "2" + ], + "sneakers": [ + "2.12.0", + "2.12.0" + ], + "stripe": [ + "5.15.0", + "5.15.0" + ], + "sucker_punch": [ + "3.1.0", + "3.1.0" + ], + "trilogy": [ + "2.6.0", + null + ] +} \ No newline at end of file From 1980b6fe02b340ff137d8c5bc11e970b5ef63738 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Mon, 9 Dec 2024 13:41:13 -0500 Subject: [PATCH 02/43] update script --- find_min_gemfile.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/find_min_gemfile.rb b/find_min_gemfile.rb index ac87c557b3e..946f99fab19 100644 --- a/find_min_gemfile.rb +++ b/find_min_gemfile.rb @@ -70,13 +70,15 @@ def version_valid?(version) # 2. '>= 1.2.3' # 3. 1.2.3 def extract_version(constraint) - if constraint =~ /\~>\s*([\d\.]+)/ || constraint =~ /\>=\s*([\d\.]+)/ || constraint =~ /([\d\.]+)/ - Regexp.last_match(1) + if constraint =~ /\~>\s*([\d\.]+(?:[-\.\w]*))| # Handles ~> constraints + \>=\s*([\d\.]+(?:[-\.\w]*))| # Handles >= constraints + ([\d\.]+(?:[-\.\w]*)) # Handles plain versions + /x + Regexp.last_match(1) || Regexp.last_match(2) || Regexp.last_match(3) else nil end - end - + end def get_integration_names(directory = 'lib/datadog/tracing/contrib/') unless Dir.exist?(directory) From 1b2986e234bc8ccdb114af008ee19930d8cc534d Mon Sep 17 00:00:00 2001 From: quinna-h Date: Mon, 9 Dec 2024 14:06:31 -0500 Subject: [PATCH 03/43] rubocop lint --- find_min_gemfile.rb | 157 +++++++++++++++++++++----------------------- 1 file changed, 74 insertions(+), 83 deletions(-) diff --git a/find_min_gemfile.rb b/find_min_gemfile.rb index 946f99fab19..424ec5a604a 100644 --- a/find_min_gemfile.rb +++ b/find_min_gemfile.rb @@ -3,95 +3,90 @@ require 'json' def parse_gemfiles(directory = 'gemfiles/') - parsed_gems_ruby = {} - parsed_gems_jruby = {} - - gemfiles = Dir.glob(File.join(directory, '*')) - gemfiles.each do |gemfile_name| - runtime = File.basename(gemfile_name).split('_').first # ruby or jruby - # puts "Runtime: #{runtime}" - File.foreach(gemfile_name) do |line| - if gem_details = parse_gemfile_entry(line) - gem_name, version = gem_details - elsif gem_details = parse_gemfile_lock_entry(line) - gem_name, version = gem_details - else - next - end - - # Validate and store the minimum version - if version_valid?(version) - if runtime == 'ruby' - if parsed_gems_ruby[gem_name].nil? || Gem::Version.new(version) < Gem::Version.new(parsed_gems_ruby[gem_name]) - parsed_gems_ruby[gem_name] = version - end + parsed_gems_ruby = {} + parsed_gems_jruby = {} + + gemfiles = Dir.glob(File.join(directory, '*')) + gemfiles.each do |gemfile_name| + runtime = File.basename(gemfile_name).split('_').first # ruby or jruby + # puts "Runtime: #{runtime}" + File.foreach(gemfile_name) do |line| + if (gem_details = parse_gemfile_entry(line)) + gem_name, version = gem_details + elsif (gem_details = parse_gemfile_lock_entry(line)) + gem_name, version = gem_details + else + next + end + + # Validate and store the minimum version + if version_valid?(version) + if runtime == 'ruby' + if parsed_gems_ruby[gem_name].nil? || Gem::Version.new(version) < Gem::Version.new(parsed_gems_ruby[gem_name]) + parsed_gems_ruby[gem_name] = version end - if runtime == 'jruby' - if parsed_gems_jruby[gem_name].nil? || Gem::Version.new(version) < Gem::Version.new(parsed_gems_jruby[gem_name]) - parsed_gems_jruby[gem_name] = version - end + end + if runtime == 'jruby' + if parsed_gems_jruby[gem_name].nil? || Gem::Version.new(version) < Gem::Version.new(parsed_gems_jruby[gem_name]) + parsed_gems_jruby[gem_name] = version end - else - next end + else + next end end - - [parsed_gems_ruby, parsed_gems_jruby] end - - - # Helper: Parse a Gemfile-style gem declaration - # ex. gem 'ruby-kafka', '~> 5.0' - def parse_gemfile_entry(line) - if match = line.match(/^\s*gem\s+["']([^"']+)["']\s*,?\s*["']?([^"']*)["']?/) - gem_name, version_constraint = match[1], match[2] - version = extract_version(version_constraint) - [gem_name, version] - end + + [parsed_gems_ruby, parsed_gems_jruby] +end + +# Helper: Parse a Gemfile-style gem declaration +# ex. gem 'ruby-kafka', '~> 5.0' +def parse_gemfile_entry(line) + if (match = line.match(/^\s*gem\s+["']([^"']+)["']\s*,?\s*["']?([^"']*)["']?/)) + gem_name, version_constraint = match[1], match[2] + version = extract_version(version_constraint) + [gem_name, version] end - - # Helper: Parse a Gemfile.lock-style entry - # matches on ex. actionmailer (= 6.0.6) - def parse_gemfile_lock_entry(line) - if match = line.match(/^\s*([a-z0-9_-]+)\s+\(([^)]+)\)/) - [match[1], match[2]] - end +end + +# Helper: Parse a Gemfile.lock-style entry +# matches on ex. actionmailer (= 6.0.6) +def parse_gemfile_lock_entry(line) + if (match = line.match(/^\s*([a-z0-9_-]+)\s+\(([^)]+)\)/)) + [match[1], match[2]] end - - # Helper: Validate the version format - def version_valid?(version) - version =~ /^\d+(\.\d+)*$/ +end + +# Helper: Validate the version format +def version_valid?(version) + version =~ /^\d+(\.\d+)*$/ +end + +# Helper: Extract the actual version number from a constraint +# Matches on the following version patterns: +# 1. "pessimistic" versions, ex. '~> 1.2.3' +# 2. '>= 1.2.3' +# 3. 1.2.3 +def extract_version(constraint) + if constraint =~ /~>\s*([\d.]+(?:[-.\w]*))| # Handles ~> constraints + >=\s*([\d.]+(?:[-.\w]*))| # Handles >= constraints + ([\d.]+(?:[-.\w]*)) # Handles plain versions + /x + Regexp.last_match(1) || Regexp.last_match(2) || Regexp.last_match(3) end - - # Helper: Extract the actual version number from a constraint - # Matches on the following version patterns: - # 1. "pessimistic" versions, ex. '~> 1.2.3' - # 2. '>= 1.2.3' - # 3. 1.2.3 - def extract_version(constraint) - if constraint =~ /\~>\s*([\d\.]+(?:[-\.\w]*))| # Handles ~> constraints - \>=\s*([\d\.]+(?:[-\.\w]*))| # Handles >= constraints - ([\d\.]+(?:[-\.\w]*)) # Handles plain versions - /x - Regexp.last_match(1) || Regexp.last_match(2) || Regexp.last_match(3) - else - nil - end - end +end def get_integration_names(directory = 'lib/datadog/tracing/contrib/') - unless Dir.exist?(directory) - puts "Directory '#{directory}' not found!" - return [] - end - - # Get all subdirectories inside the specified directory - integrations = Dir.children(directory).select do |entry| - File.directory?(File.join(directory, entry)) - end - - integrations + unless Dir.exist?(directory) + puts "Directory '#{directory}' not found!" + return [] + end + + # Get all subdirectories inside the specified directory + Dir.children(directory).select do |entry| + File.directory?(File.join(directory, entry)) + end end mapping = { @@ -138,10 +133,6 @@ def get_integration_names(directory = 'lib/datadog/tracing/contrib/') # mapping jruby, ruby integration_json_mapping[integration] = [min_version_ruby, min_version_jruby] integration_json_mapping.replace(integration_json_mapping.sort.to_h) - end - -File.open("minimum_gem_output.json", "w") do |f| - f.write(JSON.pretty_generate(integration_json_mapping)) -end +File.write("minimum_gem_output.json", JSON.pretty_generate(integration_json_mapping)) From 5bee3211bbd877361a8f6116ce3615db458136b4 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 11 Dec 2024 12:58:19 -0500 Subject: [PATCH 04/43] modify script locations, add description to md table --- .../scripts/find_min_gemfile.rb | 9 ------- .github/scripts/generate_table_versions.rb | 25 +++++++++++++++++++ generate_table_versions.py | 21 ---------------- integration_versions.md | 13 +++++----- 4 files changed, 32 insertions(+), 36 deletions(-) rename find_min_gemfile.rb => .github/scripts/find_min_gemfile.rb (92%) create mode 100644 .github/scripts/generate_table_versions.rb delete mode 100644 generate_table_versions.py diff --git a/find_min_gemfile.rb b/.github/scripts/find_min_gemfile.rb similarity index 92% rename from find_min_gemfile.rb rename to .github/scripts/find_min_gemfile.rb index 424ec5a604a..fbdd95dc49d 100644 --- a/find_min_gemfile.rb +++ b/.github/scripts/find_min_gemfile.rb @@ -9,7 +9,6 @@ def parse_gemfiles(directory = 'gemfiles/') gemfiles = Dir.glob(File.join(directory, '*')) gemfiles.each do |gemfile_name| runtime = File.basename(gemfile_name).split('_').first # ruby or jruby - # puts "Runtime: #{runtime}" File.foreach(gemfile_name) do |line| if (gem_details = parse_gemfile_entry(line)) gem_name, version = gem_details @@ -117,19 +116,11 @@ def get_integration_names(directory = 'lib/datadog/tracing/contrib/') if excluded.include?(integration) next end - # puts "integration: #{integration}" integration_name = mapping[integration] || integration min_version_jruby = parsed_gems_jruby[integration_name] min_version_ruby = parsed_gems_ruby[integration_name] - # if min_version_ruby - # puts "minimum version of gem '#{integration_name} for Ruby': #{min_version_ruby}" - # end - # if min_version_jruby - # puts "minimum version of gem '#{integration_name} for JRuby': #{min_version_jruby}" - # end - # mapping jruby, ruby integration_json_mapping[integration] = [min_version_ruby, min_version_jruby] integration_json_mapping.replace(integration_json_mapping.sort.to_h) diff --git a/.github/scripts/generate_table_versions.rb b/.github/scripts/generate_table_versions.rb new file mode 100644 index 00000000000..ed087ea19fa --- /dev/null +++ b/.github/scripts/generate_table_versions.rb @@ -0,0 +1,25 @@ +require 'json' + +# Input and output file names +input_file = 'minimum_gem_output.json' +output_file = 'integration_versions.md' + +# Read JSON data from the input file +data = JSON.parse(File.read(input_file)) + +# Prepare the Markdown content +comment = "# This is a table of supported integration versions generated from gemfiles." +header = "| Integration | Ruby Min | JRuby Min |\n" +separator = "|-------------|----------|-----------|\n" +rows = data.map do |integration_name, versions| + ruby_min, jruby_min = versions + "| #{integration_name} | #{ruby_min} | #{jruby_min} |" +end + +# Write the Markdown file +File.open(output_file, 'w') do |file| + file.puts comment + file.puts header + file.puts separator + rows.each { |row| file.puts row } +end diff --git a/generate_table_versions.py b/generate_table_versions.py deleted file mode 100644 index 739e9e439e3..00000000000 --- a/generate_table_versions.py +++ /dev/null @@ -1,21 +0,0 @@ -import json -import pandas as pd - -input_file = 'minimum_gem_output.json' -with open(input_file, 'r') as file: - data = json.load(file) - -rows = [] -for integration_name, versions in data.items(): - ruby_min, jruby_min = versions - rows.append({"Integration": integration_name, "Ruby Min": ruby_min, "JRuby Min": jruby_min}) - -df = pd.DataFrame(rows) - -output_file = 'integration_versions.md' - -with open(output_file, 'w') as md_file: - md_file.write("| Integration | Ruby Min | JRuby Min |\n") - md_file.write("|-------------|-----------|----------|\n") - for _, row in df.iterrows(): - md_file.write(f"| {row['Integration']} | {row['Ruby Min']} | {row['JRuby Min']} |\n") \ No newline at end of file diff --git a/integration_versions.md b/integration_versions.md index a4ff823eac3..4a8004059e8 100644 --- a/integration_versions.md +++ b/integration_versions.md @@ -1,5 +1,6 @@ +# This is a table of supported integration versions generated from gemfiles. | Integration | Ruby Min | JRuby Min | -|-------------|-----------|----------| +|-------------|----------|-----------| | action_cable | 5.2.8.1 | 5.2.8.1 | | action_mailer | 4.2.11.3 | 5.2.8.1 | | action_pack | 4.2.11.3 | 5.2.8.1 | @@ -18,17 +19,17 @@ | faraday | 0.17 | 0.17 | | grape | 1.7.0 | 1.7.0 | | graphql | 1.13.0 | 1.13.0 | -| grpc | 1.38.0 | None | -| hanami | 1 | None | +| grpc | 1.38.0 | | +| hanami | 1 | | | http | 5.0.1 | 4 | | httpclient | 2.8.3 | 2.8.3 | | httprb | 5.0.1 | 4 | | kafka | 0.7.10 | 0.7.10 | | lograge | 0.11 | 0.11 | | mongodb | 2.8.0 | 2.8.0 | -| mysql2 | 0.5 | None | +| mysql2 | 0.5 | | | opensearch | 2 | 2 | -| pg | 0.18.4 | None | +| pg | 0.18.4 | | | presto | 0.5.14 | 0.5.14 | | que | 1.0.0 | 1.0.0 | | racecar | 0.3.5 | 0.3.5 | @@ -47,4 +48,4 @@ | sneakers | 2.12.0 | 2.12.0 | | stripe | 5.15.0 | 5.15.0 | | sucker_punch | 3.1.0 | 3.1.0 | -| trilogy | 2.6.0 | None | +| trilogy | 2.6.0 | | From b2818a930a1c3a96bbfcc73caa4447c9a3ed04aa Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 11 Dec 2024 13:01:37 -0500 Subject: [PATCH 05/43] improve table output --- .github/scripts/generate_table_versions.rb | 2 +- integration_versions.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/scripts/generate_table_versions.rb b/.github/scripts/generate_table_versions.rb index ed087ea19fa..e69a0e57bb0 100644 --- a/.github/scripts/generate_table_versions.rb +++ b/.github/scripts/generate_table_versions.rb @@ -8,7 +8,7 @@ data = JSON.parse(File.read(input_file)) # Prepare the Markdown content -comment = "# This is a table of supported integration versions generated from gemfiles." +comment = "# This is a table of supported integration versions generated from gemfiles.\n\n" header = "| Integration | Ruby Min | JRuby Min |\n" separator = "|-------------|----------|-----------|\n" rows = data.map do |integration_name, versions| diff --git a/integration_versions.md b/integration_versions.md index 4a8004059e8..56eb60eeba8 100644 --- a/integration_versions.md +++ b/integration_versions.md @@ -1,4 +1,5 @@ # This is a table of supported integration versions generated from gemfiles. + | Integration | Ruby Min | JRuby Min | |-------------|----------|-----------| | action_cable | 5.2.8.1 | 5.2.8.1 | From 53b807f66b1f67787526eae44ad320060850f880 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 11 Dec 2024 13:19:29 -0500 Subject: [PATCH 06/43] wip --- ..._gemfile.rb => find_gem_version_bounds.rb} | 35 ++-- .github/scripts/generate_table_versions.rb | 10 +- minimum_gem_output.json => gem_output.json | 164 ++++++++++++++---- integration_versions.md | 100 +++++------ 4 files changed, 208 insertions(+), 101 deletions(-) rename .github/scripts/{find_min_gemfile.rb => find_gem_version_bounds.rb} (69%) rename minimum_gem_output.json => gem_output.json (52%) diff --git a/.github/scripts/find_min_gemfile.rb b/.github/scripts/find_gem_version_bounds.rb similarity index 69% rename from .github/scripts/find_min_gemfile.rb rename to .github/scripts/find_gem_version_bounds.rb index fbdd95dc49d..a46df2c68ea 100644 --- a/.github/scripts/find_min_gemfile.rb +++ b/.github/scripts/find_gem_version_bounds.rb @@ -3,8 +3,11 @@ require 'json' def parse_gemfiles(directory = 'gemfiles/') - parsed_gems_ruby = {} - parsed_gems_jruby = {} + minimum_gems_ruby = {} + minimum_gems_jruby = {} + maximum_gems_ruby = {} + maximum_gems_jruby = {} + gemfiles = Dir.glob(File.join(directory, '*')) gemfiles.each do |gemfile_name| @@ -21,13 +24,19 @@ def parse_gemfiles(directory = 'gemfiles/') # Validate and store the minimum version if version_valid?(version) if runtime == 'ruby' - if parsed_gems_ruby[gem_name].nil? || Gem::Version.new(version) < Gem::Version.new(parsed_gems_ruby[gem_name]) - parsed_gems_ruby[gem_name] = version + if minimum_gems_ruby[gem_name].nil? || Gem::Version.new(version) < Gem::Version.new(minimum_gems_ruby[gem_name]) + minimum_gems_ruby[gem_name] = version + end + if maximum_gems_ruby[gem_name].nil? || Gem::Version.new(version) > Gem::Version.new(maximum_gems_ruby[gem_name]) + maximum_gems_ruby[gem_name] = version end end if runtime == 'jruby' - if parsed_gems_jruby[gem_name].nil? || Gem::Version.new(version) < Gem::Version.new(parsed_gems_jruby[gem_name]) - parsed_gems_jruby[gem_name] = version + if minimum_gems_jruby[gem_name].nil? || Gem::Version.new(version) < Gem::Version.new(minimum_gems_jruby[gem_name]) + minimum_gems_jruby[gem_name] = version + end + if maximum_gems_jruby[gem_name].nil? || Gem::Version.new(version) > Gem::Version.new(maximum_gems_jruby[gem_name]) + maximum_gems_jruby[gem_name] = version end end else @@ -36,7 +45,7 @@ def parse_gemfiles(directory = 'gemfiles/') end end - [parsed_gems_ruby, parsed_gems_jruby] + [minimum_gems_ruby, minimum_gems_jruby, maximum_gems_ruby, maximum_gems_jruby] end # Helper: Parse a Gemfile-style gem declaration @@ -107,7 +116,7 @@ def get_integration_names(directory = 'lib/datadog/tracing/contrib/') } excluded = ["configuration", "propagation", "utils"] -parsed_gems_ruby, parsed_gems_jruby = parse_gemfiles("gemfiles/") +min_gems_ruby, min_gems_jruby, max_gems_ruby, max_gems_jruby = parse_gemfiles("gemfiles/") integrations = get_integration_names('lib/datadog/tracing/contrib/') integration_json_mapping = {} @@ -118,12 +127,14 @@ def get_integration_names(directory = 'lib/datadog/tracing/contrib/') end integration_name = mapping[integration] || integration - min_version_jruby = parsed_gems_jruby[integration_name] - min_version_ruby = parsed_gems_ruby[integration_name] + min_version_jruby = min_gems_jruby[integration_name] + min_version_ruby = min_gems_ruby[integration_name] + max_version_jruby = max_gems_jruby[integration_name] + max_version_ruby = max_gems_ruby[integration_name] # mapping jruby, ruby - integration_json_mapping[integration] = [min_version_ruby, min_version_jruby] + integration_json_mapping[integration] = [min_version_ruby, max_version_ruby, min_version_jruby, max_version_jruby] integration_json_mapping.replace(integration_json_mapping.sort.to_h) end -File.write("minimum_gem_output.json", JSON.pretty_generate(integration_json_mapping)) +File.write("gem_output.json", JSON.pretty_generate(integration_json_mapping)) diff --git a/.github/scripts/generate_table_versions.rb b/.github/scripts/generate_table_versions.rb index e69a0e57bb0..3b916e1117a 100644 --- a/.github/scripts/generate_table_versions.rb +++ b/.github/scripts/generate_table_versions.rb @@ -1,7 +1,7 @@ require 'json' # Input and output file names -input_file = 'minimum_gem_output.json' +input_file = 'gem_output.json' output_file = 'integration_versions.md' # Read JSON data from the input file @@ -9,11 +9,11 @@ # Prepare the Markdown content comment = "# This is a table of supported integration versions generated from gemfiles.\n\n" -header = "| Integration | Ruby Min | JRuby Min |\n" -separator = "|-------------|----------|-----------|\n" +header = "| Integration | Ruby Min | Ruby Max | JRuby Min | JRuby Max |\n" +separator = "|-------------|----------|-----------|----------|----------|\n" rows = data.map do |integration_name, versions| - ruby_min, jruby_min = versions - "| #{integration_name} | #{ruby_min} | #{jruby_min} |" + ruby_min, ruby_max, jruby_min, jruby_max = versions.map { |v| v || "None" } + "| #{integration_name} | #{ruby_min} | #{ruby_max} | #{jruby_min} | #{jruby_max} |" end # Write the Markdown file diff --git a/minimum_gem_output.json b/gem_output.json similarity index 52% rename from minimum_gem_output.json rename to gem_output.json index a7855020f14..0b093bef404 100644 --- a/minimum_gem_output.json +++ b/gem_output.json @@ -1,194 +1,290 @@ { "action_cable": [ "5.2.8.1", - "5.2.8.1" + "7.1.3.4", + "5.2.8.1", + "6.1.7.8" ], "action_mailer": [ "4.2.11.3", - "5.2.8.1" + "7.1.3.4", + "5.2.8.1", + "6.1.7.8" ], "action_pack": [ "4.2.11.3", - "5.2.8.1" + "7.1.3.4", + "5.2.8.1", + "7.0.8" ], "action_view": [ "4.2.11.3", - "5.2.8.1" + "7.1.3.4", + "5.2.8.1", + "7.0.8" ], "active_job": [ "4.2.11.3", - "5.2.8.1" + "7.1.3.4", + "5.2.8.1", + "6.1.7.8" ], "active_model_serializers": [ "0.10.0", - "0.10.0" + "0.10.14", + "0.10.0", + "0.10.13" ], "active_record": [ "4.2.11.3", - "5" + "7.1.3.4", + "5", + "6.1.7.8" ], "active_support": [ "4.2.11.3", - "5" + "7.1.3.4", + "5", + "7.0.8" ], "aws": [ + "3.181.0", + "3.199.0", "3.181.0", "3.181.0" ], "concurrent_ruby": [ "1.2.2", - "1.1.10" + "1.3.4", + "1.1.10", + "1.3.4" ], "dalli": [ "2.7.11", - "2.7.11" + "3.2.8", + "2.7.11", + "3.2.3" ], "delayed_job": [ + "4.1.11", + "4.1.13", "4.1.11", "4.1.11" ], "elasticsearch": [ "7", - "7" + "8.16.0", + "7", + "8.16.0" ], "ethon": [ "0.16.0", - "0.14.0" + "0.16.0", + "0.14.0", + "0.16.0" ], "excon": [ + "0.102.0", + "0.110.0", "0.102.0", "0.102.0" ], "faraday": [ "0.17", - "0.17" + "2.12.1", + "0.17", + "2.12.1" ], "grape": [ "1.7.0", - "1.7.0" + "2.1.2", + "1.7.0", + "1.8.0" ], "graphql": [ "1.13.0", - "1.13.0" + "2.3.7", + "1.13.0", + "2.3.6" ], "grpc": [ "1.38.0", + "1.64.0", + null, null ], "hanami": [ "1", + "1.3.5", + null, null ], "http": [ "5.0.1", - "4" + "5.2.0", + "4", + "4.4.1" ], "httpclient": [ + "2.8.3", + "2.8.3", "2.8.3", "2.8.3" ], "httprb": [ "5.0.1", - "4" + "5.2.0", + "4", + "4.4.1" ], "kafka": [ "0.7.10", - "0.7.10" + "1.5.0", + "0.7.10", + "1.5.0" ], "lograge": [ "0.11", - "0.11" + "0.14.0", + "0.11", + "0.14.0" ], "mongodb": [ "2.8.0", - "2.8.0" + "2.14.1", + "2.8.0", + "2.14.1" ], "mysql2": [ "0.5", + "1", + null, null ], "opensearch": [ "2", - "2" + "3.4.0", + "2", + "3.4.0" ], "pg": [ "0.18.4", + "1.5.9", + null, null ], "presto": [ "0.5.14", - "0.5.14" + "0.6.6", + "0.5.14", + "0.6.6" ], "que": [ "1.0.0", - "1.0.0" + "2.3.0", + "1.0.0", + "2.2.0" ], "racecar": [ "0.3.5", - "0.3.5" + "2.11.0", + "0.3.5", + "2.8.2" ], "rack": [ "1", - "1" + "3.1.8", + "1", + "3.1.8" ], "rails": [ "4.2.11.3", - "5.2.1" + "7.1.3.4", + "5.2.1", + "6.1.7.8" ], "rake": [ "10.5", - "10.5" + "13.2.1", + "10.5", + "13.2.1" ], "redis": [ "3", - "3" + "5.2.0", + "3", + "5.0.6" ], "resque": [ "2.0", - "2.0" + "2.6.0", + "2.0", + "2.5.0" ], "rest_client": [ + "2.1.0", + "2.1.0", "2.1.0", "2.1.0" ], "roda": [ "2.0.0", - "2.0.0" + "3.81.0", + "2.0.0", + "3.72.0" ], "semantic_logger": [ "4.0", - "4.0" + "4.15.0", + "4.0", + "4.14.0" ], "sequel": [ + "5.83.1", + "5.86.0", "5.83.1", "5.83.1" ], "shoryuken": [ + "6.0.0", + "6.2.1", "6.0.0", "6.0.0" ], "sidekiq": [ "5.2.8", - "6.1.2" + "7.2.4", + "6.1.2", + "7.1.0" ], "sinatra": [ "2", - "2" + "4", + "2", + "4" ], "sneakers": [ + "2.12.0", + "2.12.0", "2.12.0", "2.12.0" ], "stripe": [ "5.15.0", - "5.15.0" + "13.2.0", + "5.15.0", + "13.2.0" ], "sucker_punch": [ + "3.1.0", + "3.2.0", "3.1.0", "3.1.0" ], "trilogy": [ "2.6.0", + "2.9.0", + null, null ] } \ No newline at end of file diff --git a/integration_versions.md b/integration_versions.md index 56eb60eeba8..a562eaa7ac9 100644 --- a/integration_versions.md +++ b/integration_versions.md @@ -1,52 +1,52 @@ # This is a table of supported integration versions generated from gemfiles. -| Integration | Ruby Min | JRuby Min | -|-------------|----------|-----------| -| action_cable | 5.2.8.1 | 5.2.8.1 | -| action_mailer | 4.2.11.3 | 5.2.8.1 | -| action_pack | 4.2.11.3 | 5.2.8.1 | -| action_view | 4.2.11.3 | 5.2.8.1 | -| active_job | 4.2.11.3 | 5.2.8.1 | -| active_model_serializers | 0.10.0 | 0.10.0 | -| active_record | 4.2.11.3 | 5 | -| active_support | 4.2.11.3 | 5 | -| aws | 3.181.0 | 3.181.0 | -| concurrent_ruby | 1.2.2 | 1.1.10 | -| dalli | 2.7.11 | 2.7.11 | -| delayed_job | 4.1.11 | 4.1.11 | -| elasticsearch | 7 | 7 | -| ethon | 0.16.0 | 0.14.0 | -| excon | 0.102.0 | 0.102.0 | -| faraday | 0.17 | 0.17 | -| grape | 1.7.0 | 1.7.0 | -| graphql | 1.13.0 | 1.13.0 | -| grpc | 1.38.0 | | -| hanami | 1 | | -| http | 5.0.1 | 4 | -| httpclient | 2.8.3 | 2.8.3 | -| httprb | 5.0.1 | 4 | -| kafka | 0.7.10 | 0.7.10 | -| lograge | 0.11 | 0.11 | -| mongodb | 2.8.0 | 2.8.0 | -| mysql2 | 0.5 | | -| opensearch | 2 | 2 | -| pg | 0.18.4 | | -| presto | 0.5.14 | 0.5.14 | -| que | 1.0.0 | 1.0.0 | -| racecar | 0.3.5 | 0.3.5 | -| rack | 1 | 1 | -| rails | 4.2.11.3 | 5.2.1 | -| rake | 10.5 | 10.5 | -| redis | 3 | 3 | -| resque | 2.0 | 2.0 | -| rest_client | 2.1.0 | 2.1.0 | -| roda | 2.0.0 | 2.0.0 | -| semantic_logger | 4.0 | 4.0 | -| sequel | 5.83.1 | 5.83.1 | -| shoryuken | 6.0.0 | 6.0.0 | -| sidekiq | 5.2.8 | 6.1.2 | -| sinatra | 2 | 2 | -| sneakers | 2.12.0 | 2.12.0 | -| stripe | 5.15.0 | 5.15.0 | -| sucker_punch | 3.1.0 | 3.1.0 | -| trilogy | 2.6.0 | | +| Integration | Ruby Min | Ruby Max | JRuby Min | JRuby Max | +|-------------|----------|-----------|----------|----------| +| action_cable | 5.2.8.1 | 7.1.3.4 | 5.2.8.1 | 6.1.7.8 | +| action_mailer | 4.2.11.3 | 7.1.3.4 | 5.2.8.1 | 6.1.7.8 | +| action_pack | 4.2.11.3 | 7.1.3.4 | 5.2.8.1 | 7.0.8 | +| action_view | 4.2.11.3 | 7.1.3.4 | 5.2.8.1 | 7.0.8 | +| active_job | 4.2.11.3 | 7.1.3.4 | 5.2.8.1 | 6.1.7.8 | +| active_model_serializers | 0.10.0 | 0.10.14 | 0.10.0 | 0.10.13 | +| active_record | 4.2.11.3 | 7.1.3.4 | 5 | 6.1.7.8 | +| active_support | 4.2.11.3 | 7.1.3.4 | 5 | 7.0.8 | +| aws | 3.181.0 | 3.199.0 | 3.181.0 | 3.181.0 | +| concurrent_ruby | 1.2.2 | 1.3.4 | 1.1.10 | 1.3.4 | +| dalli | 2.7.11 | 3.2.8 | 2.7.11 | 3.2.3 | +| delayed_job | 4.1.11 | 4.1.13 | 4.1.11 | 4.1.11 | +| elasticsearch | 7 | 8.16.0 | 7 | 8.16.0 | +| ethon | 0.16.0 | 0.16.0 | 0.14.0 | 0.16.0 | +| excon | 0.102.0 | 0.110.0 | 0.102.0 | 0.102.0 | +| faraday | 0.17 | 2.12.1 | 0.17 | 2.12.1 | +| grape | 1.7.0 | 2.1.2 | 1.7.0 | 1.8.0 | +| graphql | 1.13.0 | 2.3.7 | 1.13.0 | 2.3.6 | +| grpc | 1.38.0 | 1.64.0 | None | None | +| hanami | 1 | 1.3.5 | None | None | +| http | 5.0.1 | 5.2.0 | 4 | 4.4.1 | +| httpclient | 2.8.3 | 2.8.3 | 2.8.3 | 2.8.3 | +| httprb | 5.0.1 | 5.2.0 | 4 | 4.4.1 | +| kafka | 0.7.10 | 1.5.0 | 0.7.10 | 1.5.0 | +| lograge | 0.11 | 0.14.0 | 0.11 | 0.14.0 | +| mongodb | 2.8.0 | 2.14.1 | 2.8.0 | 2.14.1 | +| mysql2 | 0.5 | 1 | None | None | +| opensearch | 2 | 3.4.0 | 2 | 3.4.0 | +| pg | 0.18.4 | 1.5.9 | None | None | +| presto | 0.5.14 | 0.6.6 | 0.5.14 | 0.6.6 | +| que | 1.0.0 | 2.3.0 | 1.0.0 | 2.2.0 | +| racecar | 0.3.5 | 2.11.0 | 0.3.5 | 2.8.2 | +| rack | 1 | 3.1.8 | 1 | 3.1.8 | +| rails | 4.2.11.3 | 7.1.3.4 | 5.2.1 | 6.1.7.8 | +| rake | 10.5 | 13.2.1 | 10.5 | 13.2.1 | +| redis | 3 | 5.2.0 | 3 | 5.0.6 | +| resque | 2.0 | 2.6.0 | 2.0 | 2.5.0 | +| rest_client | 2.1.0 | 2.1.0 | 2.1.0 | 2.1.0 | +| roda | 2.0.0 | 3.81.0 | 2.0.0 | 3.72.0 | +| semantic_logger | 4.0 | 4.15.0 | 4.0 | 4.14.0 | +| sequel | 5.83.1 | 5.86.0 | 5.83.1 | 5.83.1 | +| shoryuken | 6.0.0 | 6.2.1 | 6.0.0 | 6.0.0 | +| sidekiq | 5.2.8 | 7.2.4 | 6.1.2 | 7.1.0 | +| sinatra | 2 | 4 | 2 | 4 | +| sneakers | 2.12.0 | 2.12.0 | 2.12.0 | 2.12.0 | +| stripe | 5.15.0 | 13.2.0 | 5.15.0 | 13.2.0 | +| sucker_punch | 3.1.0 | 3.2.0 | 3.1.0 | 3.1.0 | +| trilogy | 2.6.0 | 2.9.0 | None | None | From df5640a9ff936045b88a98bc50d3e96511bdb341 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 18 Dec 2024 13:25:33 -0500 Subject: [PATCH 07/43] refactor code --- .github/scripts/find_gem_version_bounds.rb | 129 +++++++++++++-------- gem_output.json | 102 ++++++++-------- 2 files changed, 131 insertions(+), 100 deletions(-) diff --git a/.github/scripts/find_gem_version_bounds.rb b/.github/scripts/find_gem_version_bounds.rb index a46df2c68ea..8dc3d889b59 100644 --- a/.github/scripts/find_gem_version_bounds.rb +++ b/.github/scripts/find_gem_version_bounds.rb @@ -1,6 +1,11 @@ require 'pathname' require 'rubygems' require 'json' +require 'bundler' + +lib = File.expand_path('lib', __dir__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'datadog' def parse_gemfiles(directory = 'gemfiles/') minimum_gems_ruby = {} @@ -12,35 +17,44 @@ def parse_gemfiles(directory = 'gemfiles/') gemfiles = Dir.glob(File.join(directory, '*')) gemfiles.each do |gemfile_name| runtime = File.basename(gemfile_name).split('_').first # ruby or jruby - File.foreach(gemfile_name) do |line| - if (gem_details = parse_gemfile_entry(line)) - gem_name, version = gem_details - elsif (gem_details = parse_gemfile_lock_entry(line)) - gem_name, version = gem_details - else - next - end - - # Validate and store the minimum version - if version_valid?(version) - if runtime == 'ruby' - if minimum_gems_ruby[gem_name].nil? || Gem::Version.new(version) < Gem::Version.new(minimum_gems_ruby[gem_name]) - minimum_gems_ruby[gem_name] = version - end - if maximum_gems_ruby[gem_name].nil? || Gem::Version.new(version) > Gem::Version.new(maximum_gems_ruby[gem_name]) - maximum_gems_ruby[gem_name] = version - end - end - if runtime == 'jruby' - if minimum_gems_jruby[gem_name].nil? || Gem::Version.new(version) < Gem::Version.new(minimum_gems_jruby[gem_name]) - minimum_gems_jruby[gem_name] = version + # parse the gemfile + if gemfile_name.end_with?(".gemfile") + begin + definition = Bundler::Definition.build(gemfile_name, nil, nil) + + definition.dependencies.each do |dependency| + gem_name, version = dependency.name, dependency.requirement + # puts "Gem: #{dependency.name}, Version: #{dependency.requirement}" + if version_valid?(version) + case runtime + when 'ruby' + update_min_max(minimum_gems_ruby, maximum_gems_ruby, gem_name, version) + when 'jruby' + update_min_max(minimum_gems_jruby, maximum_gems_jruby, gem_name, version) + end + else + next end - if maximum_gems_jruby[gem_name].nil? || Gem::Version.new(version) > Gem::Version.new(maximum_gems_jruby[gem_name]) - maximum_gems_jruby[gem_name] = version + end + rescue Bundler::GemfileError => e + puts "Error reading Gemfile: #{e.message}" + end + elsif gemfile_name.end_with?(".gemfile.lock") + lockfile_contents = File.read(gemfile_name) + parser = Bundler::LockfileParser.new(lockfile_contents) + parser.specs.each do |spec| + # puts "Gem: #{spec.name}, Version: #{spec.version}" + gem_name, version = spec.name, spec.version.to_s + if version_valid?(version) + case runtime + when 'ruby' + update_min_max(minimum_gems_ruby, maximum_gems_ruby, gem_name, version) + when 'jruby' + update_min_max(minimum_gems_jruby, maximum_gems_jruby, gem_name, version) end + else + next end - else - next end end end @@ -48,29 +62,52 @@ def parse_gemfiles(directory = 'gemfiles/') [minimum_gems_ruby, minimum_gems_jruby, maximum_gems_ruby, maximum_gems_jruby] end -# Helper: Parse a Gemfile-style gem declaration -# ex. gem 'ruby-kafka', '~> 5.0' -def parse_gemfile_entry(line) - if (match = line.match(/^\s*gem\s+["']([^"']+)["']\s*,?\s*["']?([^"']*)["']?/)) - gem_name, version_constraint = match[1], match[2] - version = extract_version(version_constraint) - [gem_name, version] + +def update_min_max(minimum_gems, maximum_gems, gem_name, version) + gem_version = Gem::Version.new(version) + + if minimum_gems[gem_name].nil? || gem_version < Gem::Version.new(minimum_gems[gem_name]) + minimum_gems[gem_name] = version + end + + if maximum_gems[gem_name].nil? || gem_version > Gem::Version.new(maximum_gems[gem_name]) + maximum_gems[gem_name] = version end end -# Helper: Parse a Gemfile.lock-style entry -# matches on ex. actionmailer (= 6.0.6) -def parse_gemfile_lock_entry(line) - if (match = line.match(/^\s*([a-z0-9_-]+)\s+\(([^)]+)\)/)) - [match[1], match[2]] +def parse_gemfile(gemfile_path) + # Helper: Parse a Gemfile + begin + definition = Bundler::Definition.build(gemfile_path, nil, nil) + + definition.dependencies.each do |dependency| + puts "Gem: #{dependency.name}, Version: #{dependency.requirement}" + end end -end + rescue Bundler::GemfileError => e + puts "Error reading Gemfile: #{e.message}" + end + # Helper: Validate the version format def version_valid?(version) - version =~ /^\d+(\.\d+)*$/ + return false if version.nil? + + # Convert to string if version is not already a string + version = version.to_s.strip + + return false if version.empty? + + # Ensure it's a valid Gem::Version + begin + Gem::Version.new(version) + true + rescue ArgumentError + false + end end + # Helper: Extract the actual version number from a constraint # Matches on the following version patterns: # 1. "pessimistic" versions, ex. '~> 1.2.3' @@ -86,17 +123,11 @@ def extract_version(constraint) end def get_integration_names(directory = 'lib/datadog/tracing/contrib/') - unless Dir.exist?(directory) - puts "Directory '#{directory}' not found!" - return [] - end - - # Get all subdirectories inside the specified directory - Dir.children(directory).select do |entry| - File.directory?(File.join(directory, entry)) - end + Datadog::Tracing::Contrib::REGISTRY.map{ |i| i.name.to_s } end +# TODO: The gem information should reside in the integration declaration instead of here. + mapping = { "action_mailer" => "actionmailer", "opensearch" => "opensearch-ruby", diff --git a/gem_output.json b/gem_output.json index 0b093bef404..ee12eb8613b 100644 --- a/gem_output.json +++ b/gem_output.json @@ -30,21 +30,21 @@ "6.1.7.8" ], "active_model_serializers": [ - "0.10.0", + "0.10.13", "0.10.14", - "0.10.0", + "0.10.13", "0.10.13" ], "active_record": [ "4.2.11.3", "7.1.3.4", - "5", + "5.2.8.1", "6.1.7.8" ], "active_support": [ "4.2.11.3", "7.1.3.4", - "5", + "5.2.8.1", "7.0.8" ], "aws": [ @@ -72,9 +72,9 @@ "4.1.11" ], "elasticsearch": [ - "7", + "7.17.11", "8.16.0", - "7", + "7.17.11", "8.16.0" ], "ethon": [ @@ -90,9 +90,9 @@ "0.102.0" ], "faraday": [ - "0.17", + "0.17.0", "2.12.1", - "0.17", + "0.17.0", "2.12.1" ], "grape": [ @@ -102,19 +102,19 @@ "1.8.0" ], "graphql": [ - "1.13.0", + "1.13.21", "2.3.7", - "1.13.0", + "1.13.21", "2.3.6" ], "grpc": [ - "1.38.0", - "1.64.0", + "1.48.0", + "1.67.0", null, null ], "hanami": [ - "1", + "1.3.5", "1.3.5", null, null @@ -122,7 +122,7 @@ "http": [ "5.0.1", "5.2.0", - "4", + "4.4.1", "4.4.1" ], "httpclient": [ @@ -134,91 +134,91 @@ "httprb": [ "5.0.1", "5.2.0", - "4", + "4.4.1", "4.4.1" ], "kafka": [ - "0.7.10", "1.5.0", - "0.7.10", + "1.5.0", + "1.5.0", "1.5.0" ], "lograge": [ - "0.11", + "0.12.0", "0.14.0", - "0.11", + "0.12.0", "0.14.0" ], - "mongodb": [ - "2.8.0", + "mongo": [ + "2.14.1", + "2.14.1", "2.14.1", - "2.8.0", "2.14.1" ], "mysql2": [ - "0.5", - "1", + "0.5.5", + "0.5.6", null, null ], "opensearch": [ - "2", + "2.1.0", "3.4.0", - "2", + "2.1.0", "3.4.0" ], "pg": [ - "0.18.4", + "0.21.0", "1.5.9", null, null ], "presto": [ - "0.5.14", "0.6.6", - "0.5.14", + "0.6.6", + "0.6.6", "0.6.6" ], "que": [ - "1.0.0", + "1.4.1", "2.3.0", - "1.0.0", + "1.4.1", "2.2.0" ], "racecar": [ - "0.3.5", + "2.6.0", "2.11.0", - "0.3.5", + "2.6.0", "2.8.2" ], "rack": [ - "1", + "1.6.13", "3.1.8", - "1", + "1.6.13", "3.1.8" ], "rails": [ "4.2.11.3", "7.1.3.4", - "5.2.1", + "5.2.8.1", "6.1.7.8" ], "rake": [ - "10.5", + "12.3.3", "13.2.1", - "10.5", + "12.3.3", "13.2.1" ], "redis": [ - "3", + "3.3.5", "5.2.0", - "3", + "3.3.5", "5.0.6" ], "resque": [ - "2.0", + "2.4.0", "2.6.0", - "2.0", + "2.4.0", "2.5.0" ], "rest_client": [ @@ -228,15 +228,15 @@ "2.1.0" ], "roda": [ - "2.0.0", + "3.65.0", "3.81.0", - "2.0.0", + "3.64.0", "3.72.0" ], "semantic_logger": [ - "4.0", + "4.12.0", "4.15.0", - "4.0", + "4.12.0", "4.14.0" ], "sequel": [ @@ -254,14 +254,14 @@ "sidekiq": [ "5.2.8", "7.2.4", - "6.1.2", + "6.5.8", "7.1.0" ], "sinatra": [ - "2", - "4", - "2", - "4" + "2.0.8.1", + "4.0.0", + "2.2.4", + "4.0.0" ], "sneakers": [ "2.12.0", From 2b15400ea0903efa120ff77ab7f145b80ffeca1d Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 18 Dec 2024 14:27:38 -0500 Subject: [PATCH 08/43] wip --- .github/scripts/find_gem_version_bounds.rb | 116 +++++++-------------- 1 file changed, 39 insertions(+), 77 deletions(-) diff --git a/.github/scripts/find_gem_version_bounds.rb b/.github/scripts/find_gem_version_bounds.rb index 8dc3d889b59..f7669163232 100644 --- a/.github/scripts/find_gem_version_bounds.rb +++ b/.github/scripts/find_gem_version_bounds.rb @@ -8,92 +8,69 @@ require 'datadog' def parse_gemfiles(directory = 'gemfiles/') - minimum_gems_ruby = {} - minimum_gems_jruby = {} - maximum_gems_ruby = {} - maximum_gems_jruby = {} - + min_gems = { 'ruby' => {}, 'jruby' => {} } + max_gems = { 'ruby' => {}, 'jruby' => {} } gemfiles = Dir.glob(File.join(directory, '*')) gemfiles.each do |gemfile_name| runtime = File.basename(gemfile_name).split('_').first # ruby or jruby + next unless %w[ruby jruby].include?(runtime) # parse the gemfile if gemfile_name.end_with?(".gemfile") - begin - definition = Bundler::Definition.build(gemfile_name, nil, nil) - - definition.dependencies.each do |dependency| - gem_name, version = dependency.name, dependency.requirement - # puts "Gem: #{dependency.name}, Version: #{dependency.requirement}" - if version_valid?(version) - case runtime - when 'ruby' - update_min_max(minimum_gems_ruby, maximum_gems_ruby, gem_name, version) - when 'jruby' - update_min_max(minimum_gems_jruby, maximum_gems_jruby, gem_name, version) - end - else - next - end - end - rescue Bundler::GemfileError => e - puts "Error reading Gemfile: #{e.message}" - end - elsif gemfile_name.end_with?(".gemfile.lock") - lockfile_contents = File.read(gemfile_name) - parser = Bundler::LockfileParser.new(lockfile_contents) - parser.specs.each do |spec| - # puts "Gem: #{spec.name}, Version: #{spec.version}" - gem_name, version = spec.name, spec.version.to_s - if version_valid?(version) - case runtime - when 'ruby' - update_min_max(minimum_gems_ruby, maximum_gems_ruby, gem_name, version) - when 'jruby' - update_min_max(minimum_gems_jruby, maximum_gems_jruby, gem_name, version) - end - else - next - end - end + process_gemfile(gemfile_name, runtime, min_gems, max_gems) + elsif gemfile_name.end_with?('.gemfile.lock') + process_lockfile(gemfile_name, runtime, min_gems, max_gems) end end - [minimum_gems_ruby, minimum_gems_jruby, maximum_gems_ruby, maximum_gems_jruby] + [min_gems['ruby'], min_gems['jruby'], max_gems['ruby'], max_gems['jruby']] end - -def update_min_max(minimum_gems, maximum_gems, gem_name, version) - gem_version = Gem::Version.new(version) - - if minimum_gems[gem_name].nil? || gem_version < Gem::Version.new(minimum_gems[gem_name]) - minimum_gems[gem_name] = version +def process_gemfile(gemfile_name, runtime, min_gems, max_gems) + begin + definition = Bundler::Definition.build(gemfile_name, nil, nil) + definition.dependencies.each do |dependency| + gem_name = dependency.name + version = dependency.requirement.to_s + update_gem_versions(runtime, gem_name, version, min_gems, max_gems) + end + rescue Bundler::GemfileError => e + puts "Error reading Gemfile: #{e.message}" end - - if maximum_gems[gem_name].nil? || gem_version > Gem::Version.new(maximum_gems[gem_name]) - maximum_gems[gem_name] = version +end + +def process_lockfile(gemfile_name, runtime, min_gems, max_gems) + lockfile_contents = File.read(gemfile_name) + parser = Bundler::LockfileParser.new(lockfile_contents) + parser.specs.each do |spec| + gem_name = spec.name + version = spec.version.to_s + update_gem_versions(runtime, gem_name, version, min_gems, max_gems) end end -def parse_gemfile(gemfile_path) - # Helper: Parse a Gemfile - begin - definition = Bundler::Definition.build(gemfile_path, nil, nil) +def update_gem_versions(runtime, gem_name, version, min_gems, max_gems) + return unless version_valid?(version) - definition.dependencies.each do |dependency| - puts "Gem: #{dependency.name}, Version: #{dependency.requirement}" - end + gem_version = Gem::Version.new(version) + + # Update minimum gems + if min_gems[runtime][gem_name].nil? || gem_version < Gem::Version.new(min_gems[runtime][gem_name]) + min_gems[runtime][gem_name] = version end - rescue Bundler::GemfileError => e - puts "Error reading Gemfile: #{e.message}" + + # Update maximum gems + if max_gems[runtime][gem_name].nil? || gem_version > Gem::Version.new(max_gems[runtime][gem_name]) + max_gems[runtime][gem_name] = version end +end + # Helper: Validate the version format def version_valid?(version) return false if version.nil? - # Convert to string if version is not already a string version = version.to_s.strip return false if version.empty? @@ -107,21 +84,6 @@ def version_valid?(version) end end - -# Helper: Extract the actual version number from a constraint -# Matches on the following version patterns: -# 1. "pessimistic" versions, ex. '~> 1.2.3' -# 2. '>= 1.2.3' -# 3. 1.2.3 -def extract_version(constraint) - if constraint =~ /~>\s*([\d.]+(?:[-.\w]*))| # Handles ~> constraints - >=\s*([\d.]+(?:[-.\w]*))| # Handles >= constraints - ([\d.]+(?:[-.\w]*)) # Handles plain versions - /x - Regexp.last_match(1) || Regexp.last_match(2) || Regexp.last_match(3) - end -end - def get_integration_names(directory = 'lib/datadog/tracing/contrib/') Datadog::Tracing::Contrib::REGISTRY.map{ |i| i.name.to_s } end From 3b5aae293e82e2c7c200c224f166738ffc3d4201 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 18 Dec 2024 17:04:26 -0500 Subject: [PATCH 09/43] add supported versions --- .../workflows/generate-supported-versions.yml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/generate-supported-versions.yml diff --git a/.github/workflows/generate-supported-versions.yml b/.github/workflows/generate-supported-versions.yml new file mode 100644 index 00000000000..d821e62d40c --- /dev/null +++ b/.github/workflows/generate-supported-versions.yml @@ -0,0 +1,42 @@ +name: "Generate Supported Versions" + +on: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-22.04 + permissions: + contents: read + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true # runs bundle install + ruby-version: "3.3" + + - name: Update latest + run: bundle exec ruby .github/scripts/find_gem_version_bounds.rb + + - run: git diff + + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.GHA_PAT }} + branch: auto-generate/update-supported-versions + title: '[🤖] Update Supported Versions' + base: master + labels: dev/internal, integrations + commit-message: "Test creating supported versions" + delete-branch: true + body: | + - Test From 4ada6cf449fcb5c083ab2136fb2f77d8b99715af Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 18 Dec 2024 17:07:07 -0500 Subject: [PATCH 10/43] add branch for testing --- .github/workflows/generate-supported-versions.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/generate-supported-versions.yml b/.github/workflows/generate-supported-versions.yml index d821e62d40c..f188bb3bc6e 100644 --- a/.github/workflows/generate-supported-versions.yml +++ b/.github/workflows/generate-supported-versions.yml @@ -1,7 +1,11 @@ name: "Generate Supported Versions" on: + push: + branches: + - quinna.halim/add-supported-versions-table workflow_dispatch: + concurrency: group: ${{ github.workflow }} From b4526e2a1333a5cc152737528361d74ba780cb50 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 18 Dec 2024 17:22:42 -0500 Subject: [PATCH 11/43] remove json to avoid merge conflict issues --- gem_output.json | 290 ------------------------------------------------ 1 file changed, 290 deletions(-) delete mode 100644 gem_output.json diff --git a/gem_output.json b/gem_output.json deleted file mode 100644 index ee12eb8613b..00000000000 --- a/gem_output.json +++ /dev/null @@ -1,290 +0,0 @@ -{ - "action_cable": [ - "5.2.8.1", - "7.1.3.4", - "5.2.8.1", - "6.1.7.8" - ], - "action_mailer": [ - "4.2.11.3", - "7.1.3.4", - "5.2.8.1", - "6.1.7.8" - ], - "action_pack": [ - "4.2.11.3", - "7.1.3.4", - "5.2.8.1", - "7.0.8" - ], - "action_view": [ - "4.2.11.3", - "7.1.3.4", - "5.2.8.1", - "7.0.8" - ], - "active_job": [ - "4.2.11.3", - "7.1.3.4", - "5.2.8.1", - "6.1.7.8" - ], - "active_model_serializers": [ - "0.10.13", - "0.10.14", - "0.10.13", - "0.10.13" - ], - "active_record": [ - "4.2.11.3", - "7.1.3.4", - "5.2.8.1", - "6.1.7.8" - ], - "active_support": [ - "4.2.11.3", - "7.1.3.4", - "5.2.8.1", - "7.0.8" - ], - "aws": [ - "3.181.0", - "3.199.0", - "3.181.0", - "3.181.0" - ], - "concurrent_ruby": [ - "1.2.2", - "1.3.4", - "1.1.10", - "1.3.4" - ], - "dalli": [ - "2.7.11", - "3.2.8", - "2.7.11", - "3.2.3" - ], - "delayed_job": [ - "4.1.11", - "4.1.13", - "4.1.11", - "4.1.11" - ], - "elasticsearch": [ - "7.17.11", - "8.16.0", - "7.17.11", - "8.16.0" - ], - "ethon": [ - "0.16.0", - "0.16.0", - "0.14.0", - "0.16.0" - ], - "excon": [ - "0.102.0", - "0.110.0", - "0.102.0", - "0.102.0" - ], - "faraday": [ - "0.17.0", - "2.12.1", - "0.17.0", - "2.12.1" - ], - "grape": [ - "1.7.0", - "2.1.2", - "1.7.0", - "1.8.0" - ], - "graphql": [ - "1.13.21", - "2.3.7", - "1.13.21", - "2.3.6" - ], - "grpc": [ - "1.48.0", - "1.67.0", - null, - null - ], - "hanami": [ - "1.3.5", - "1.3.5", - null, - null - ], - "http": [ - "5.0.1", - "5.2.0", - "4.4.1", - "4.4.1" - ], - "httpclient": [ - "2.8.3", - "2.8.3", - "2.8.3", - "2.8.3" - ], - "httprb": [ - "5.0.1", - "5.2.0", - "4.4.1", - "4.4.1" - ], - "kafka": [ - "1.5.0", - "1.5.0", - "1.5.0", - "1.5.0" - ], - "lograge": [ - "0.12.0", - "0.14.0", - "0.12.0", - "0.14.0" - ], - "mongo": [ - "2.14.1", - "2.14.1", - "2.14.1", - "2.14.1" - ], - "mysql2": [ - "0.5.5", - "0.5.6", - null, - null - ], - "opensearch": [ - "2.1.0", - "3.4.0", - "2.1.0", - "3.4.0" - ], - "pg": [ - "0.21.0", - "1.5.9", - null, - null - ], - "presto": [ - "0.6.6", - "0.6.6", - "0.6.6", - "0.6.6" - ], - "que": [ - "1.4.1", - "2.3.0", - "1.4.1", - "2.2.0" - ], - "racecar": [ - "2.6.0", - "2.11.0", - "2.6.0", - "2.8.2" - ], - "rack": [ - "1.6.13", - "3.1.8", - "1.6.13", - "3.1.8" - ], - "rails": [ - "4.2.11.3", - "7.1.3.4", - "5.2.8.1", - "6.1.7.8" - ], - "rake": [ - "12.3.3", - "13.2.1", - "12.3.3", - "13.2.1" - ], - "redis": [ - "3.3.5", - "5.2.0", - "3.3.5", - "5.0.6" - ], - "resque": [ - "2.4.0", - "2.6.0", - "2.4.0", - "2.5.0" - ], - "rest_client": [ - "2.1.0", - "2.1.0", - "2.1.0", - "2.1.0" - ], - "roda": [ - "3.65.0", - "3.81.0", - "3.64.0", - "3.72.0" - ], - "semantic_logger": [ - "4.12.0", - "4.15.0", - "4.12.0", - "4.14.0" - ], - "sequel": [ - "5.83.1", - "5.86.0", - "5.83.1", - "5.83.1" - ], - "shoryuken": [ - "6.0.0", - "6.2.1", - "6.0.0", - "6.0.0" - ], - "sidekiq": [ - "5.2.8", - "7.2.4", - "6.5.8", - "7.1.0" - ], - "sinatra": [ - "2.0.8.1", - "4.0.0", - "2.2.4", - "4.0.0" - ], - "sneakers": [ - "2.12.0", - "2.12.0", - "2.12.0", - "2.12.0" - ], - "stripe": [ - "5.15.0", - "13.2.0", - "5.15.0", - "13.2.0" - ], - "sucker_punch": [ - "3.1.0", - "3.2.0", - "3.1.0", - "3.1.0" - ], - "trilogy": [ - "2.6.0", - "2.9.0", - null, - null - ] -} \ No newline at end of file From d44249b3f99952d5036ec24cb09f7e8599a155e8 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Thu, 19 Dec 2024 14:57:38 -0500 Subject: [PATCH 12/43] update PR body --- .../workflows/generate-supported-versions.yml | 8 ++- integration_versions.md | 52 ------------------- 2 files changed, 7 insertions(+), 53 deletions(-) delete mode 100644 integration_versions.md diff --git a/.github/workflows/generate-supported-versions.yml b/.github/workflows/generate-supported-versions.yml index f188bb3bc6e..54de441b557 100644 --- a/.github/workflows/generate-supported-versions.yml +++ b/.github/workflows/generate-supported-versions.yml @@ -29,6 +29,9 @@ jobs: - name: Update latest run: bundle exec ruby .github/scripts/find_gem_version_bounds.rb + - name: Generate versions table + run: ruby .github/scripts/generate_table_versions.rb + - run: git diff - name: Create Pull Request @@ -43,4 +46,7 @@ jobs: commit-message: "Test creating supported versions" delete-branch: true body: | - - Test + This is a PR to update the table for supported integration versions. + Workflow run: [Generate Supported Versions](https://github.com/DataDog/dd-trace-rb/actions/workflows/generate-supported-versions.yml) + This should be tied to tracer releases, or triggered manually. + diff --git a/integration_versions.md b/integration_versions.md deleted file mode 100644 index a562eaa7ac9..00000000000 --- a/integration_versions.md +++ /dev/null @@ -1,52 +0,0 @@ -# This is a table of supported integration versions generated from gemfiles. - -| Integration | Ruby Min | Ruby Max | JRuby Min | JRuby Max | -|-------------|----------|-----------|----------|----------| -| action_cable | 5.2.8.1 | 7.1.3.4 | 5.2.8.1 | 6.1.7.8 | -| action_mailer | 4.2.11.3 | 7.1.3.4 | 5.2.8.1 | 6.1.7.8 | -| action_pack | 4.2.11.3 | 7.1.3.4 | 5.2.8.1 | 7.0.8 | -| action_view | 4.2.11.3 | 7.1.3.4 | 5.2.8.1 | 7.0.8 | -| active_job | 4.2.11.3 | 7.1.3.4 | 5.2.8.1 | 6.1.7.8 | -| active_model_serializers | 0.10.0 | 0.10.14 | 0.10.0 | 0.10.13 | -| active_record | 4.2.11.3 | 7.1.3.4 | 5 | 6.1.7.8 | -| active_support | 4.2.11.3 | 7.1.3.4 | 5 | 7.0.8 | -| aws | 3.181.0 | 3.199.0 | 3.181.0 | 3.181.0 | -| concurrent_ruby | 1.2.2 | 1.3.4 | 1.1.10 | 1.3.4 | -| dalli | 2.7.11 | 3.2.8 | 2.7.11 | 3.2.3 | -| delayed_job | 4.1.11 | 4.1.13 | 4.1.11 | 4.1.11 | -| elasticsearch | 7 | 8.16.0 | 7 | 8.16.0 | -| ethon | 0.16.0 | 0.16.0 | 0.14.0 | 0.16.0 | -| excon | 0.102.0 | 0.110.0 | 0.102.0 | 0.102.0 | -| faraday | 0.17 | 2.12.1 | 0.17 | 2.12.1 | -| grape | 1.7.0 | 2.1.2 | 1.7.0 | 1.8.0 | -| graphql | 1.13.0 | 2.3.7 | 1.13.0 | 2.3.6 | -| grpc | 1.38.0 | 1.64.0 | None | None | -| hanami | 1 | 1.3.5 | None | None | -| http | 5.0.1 | 5.2.0 | 4 | 4.4.1 | -| httpclient | 2.8.3 | 2.8.3 | 2.8.3 | 2.8.3 | -| httprb | 5.0.1 | 5.2.0 | 4 | 4.4.1 | -| kafka | 0.7.10 | 1.5.0 | 0.7.10 | 1.5.0 | -| lograge | 0.11 | 0.14.0 | 0.11 | 0.14.0 | -| mongodb | 2.8.0 | 2.14.1 | 2.8.0 | 2.14.1 | -| mysql2 | 0.5 | 1 | None | None | -| opensearch | 2 | 3.4.0 | 2 | 3.4.0 | -| pg | 0.18.4 | 1.5.9 | None | None | -| presto | 0.5.14 | 0.6.6 | 0.5.14 | 0.6.6 | -| que | 1.0.0 | 2.3.0 | 1.0.0 | 2.2.0 | -| racecar | 0.3.5 | 2.11.0 | 0.3.5 | 2.8.2 | -| rack | 1 | 3.1.8 | 1 | 3.1.8 | -| rails | 4.2.11.3 | 7.1.3.4 | 5.2.1 | 6.1.7.8 | -| rake | 10.5 | 13.2.1 | 10.5 | 13.2.1 | -| redis | 3 | 5.2.0 | 3 | 5.0.6 | -| resque | 2.0 | 2.6.0 | 2.0 | 2.5.0 | -| rest_client | 2.1.0 | 2.1.0 | 2.1.0 | 2.1.0 | -| roda | 2.0.0 | 3.81.0 | 2.0.0 | 3.72.0 | -| semantic_logger | 4.0 | 4.15.0 | 4.0 | 4.14.0 | -| sequel | 5.83.1 | 5.86.0 | 5.83.1 | 5.83.1 | -| shoryuken | 6.0.0 | 6.2.1 | 6.0.0 | 6.0.0 | -| sidekiq | 5.2.8 | 7.2.4 | 6.1.2 | 7.1.0 | -| sinatra | 2 | 4 | 2 | 4 | -| sneakers | 2.12.0 | 2.12.0 | 2.12.0 | 2.12.0 | -| stripe | 5.15.0 | 13.2.0 | 5.15.0 | 13.2.0 | -| sucker_punch | 3.1.0 | 3.2.0 | 3.1.0 | 3.1.0 | -| trilogy | 2.6.0 | 2.9.0 | None | None | From 514be2cd8e54b5f307fbb5315dc1c1dc641c8c1d Mon Sep 17 00:00:00 2001 From: Quinna Halim Date: Fri, 20 Dec 2024 10:53:26 -0500 Subject: [PATCH 13/43] Update .github/scripts/generate_table_versions.rb Co-authored-by: Steven Bouwkamp --- .github/scripts/generate_table_versions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/generate_table_versions.rb b/.github/scripts/generate_table_versions.rb index 3b916e1117a..1c56232c3ab 100644 --- a/.github/scripts/generate_table_versions.rb +++ b/.github/scripts/generate_table_versions.rb @@ -8,7 +8,7 @@ data = JSON.parse(File.read(input_file)) # Prepare the Markdown content -comment = "# This is a table of supported integration versions generated from gemfiles.\n\n" +comment = "# Integrations\n\n" header = "| Integration | Ruby Min | Ruby Max | JRuby Min | JRuby Max |\n" separator = "|-------------|----------|-----------|----------|----------|\n" rows = data.map do |integration_name, versions| From 65aee380fee2713ef2a14e16c1bc5d5f698dd5fb Mon Sep 17 00:00:00 2001 From: quinna-h Date: Mon, 23 Dec 2024 15:08:59 -0500 Subject: [PATCH 14/43] switch to use gem declarations instead of hardcoded mappings --- .github/scripts/find_gem_version_bounds.rb | 49 +++++++++---------- .../contrib/action_cable/integration.rb | 4 +- .../contrib/action_mailer/integration.rb | 4 ++ .../contrib/action_pack/integration.rb | 4 +- .../contrib/action_view/integration.rb | 5 +- .../tracing/contrib/active_job/integration.rb | 5 +- .../contrib/active_record/integration.rb | 5 +- .../contrib/active_support/integration.rb | 5 +- .../tracing/contrib/aws/integration.rb | 5 +- .../contrib/concurrent_ruby/integration.rb | 5 +- .../tracing/contrib/httprb/integration.rb | 5 +- .../tracing/contrib/kafka/integration.rb | 5 +- .../tracing/contrib/mongodb/integration.rb | 5 +- .../tracing/contrib/opensearch/integration.rb | 3 ++ .../tracing/contrib/presto/integration.rb | 5 +- .../contrib/rest_client/integration.rb | 5 +- 16 files changed, 80 insertions(+), 39 deletions(-) diff --git a/.github/scripts/find_gem_version_bounds.rb b/.github/scripts/find_gem_version_bounds.rb index f7669163232..cdddfeec8a2 100644 --- a/.github/scripts/find_gem_version_bounds.rb +++ b/.github/scripts/find_gem_version_bounds.rb @@ -88,25 +88,9 @@ def get_integration_names(directory = 'lib/datadog/tracing/contrib/') Datadog::Tracing::Contrib::REGISTRY.map{ |i| i.name.to_s } end -# TODO: The gem information should reside in the integration declaration instead of here. - -mapping = { - "action_mailer" => "actionmailer", - "opensearch" => "opensearch-ruby", - "concurrent_ruby" => "concurrent-ruby", - "action_view" => "actionview", - "action_cable" => "actioncable", - "active_record" => "activerecord", - "mongodb" => "mongo", - "rest_client" => "rest-client", - "active_support" => "activesupport", - "action_pack" => "actionpack", - "active_job" => "activejob", - "httprb" => "http", - "kafka" => "ruby-kafka", - "presto" => "presto-client", - "aws" => "aws-sdk-core" -} +SPECIAL_CASES = { + "opensearch" => "OpenSearch" # special case because opensearch = OpenSearch not Opensearch +}.freeze excluded = ["configuration", "propagation", "utils"] min_gems_ruby, min_gems_jruby, max_gems_ruby, max_gems_jruby = parse_gemfiles("gemfiles/") @@ -115,19 +99,32 @@ def get_integration_names(directory = 'lib/datadog/tracing/contrib/') integration_json_mapping = {} integrations.each do |integration| - if excluded.include?(integration) - next + next if excluded.include?(integration) + + begin + mod_name = SPECIAL_CASES[integration] || integration.split('_').map(&:capitalize).join + module_name = "Datadog::Tracing::Contrib::#{mod_name}" + integration_module = Object.const_get(module_name)::Integration + integration_name = integration_module.respond_to?(:gem_name) ? integration_module.gem_name : integration + rescue NameError + puts "Integration module not found for #{integration}, falling back to integration name." + integration_name = integration + rescue NoMethodError + puts "gem_name method missing for #{integration}, falling back to integration name." + integration_name = integration end - integration_name = mapping[integration] || integration min_version_jruby = min_gems_jruby[integration_name] min_version_ruby = min_gems_ruby[integration_name] max_version_jruby = max_gems_jruby[integration_name] max_version_ruby = max_gems_ruby[integration_name] - # mapping jruby, ruby - integration_json_mapping[integration] = [min_version_ruby, max_version_ruby, min_version_jruby, max_version_jruby] - integration_json_mapping.replace(integration_json_mapping.sort.to_h) + integration_json_mapping[integration] = [ + min_version_ruby, max_version_ruby, + min_version_jruby, max_version_jruby + ] end -File.write("gem_output.json", JSON.pretty_generate(integration_json_mapping)) +# Sort and output the mapping +integration_json_mapping = integration_json_mapping.sort.to_h +File.write("gem_output.json", JSON.pretty_generate(integration_json_mapping)) \ No newline at end of file diff --git a/lib/datadog/tracing/contrib/action_cable/integration.rb b/lib/datadog/tracing/contrib/action_cable/integration.rb index fa1086e74ac..311d328470b 100644 --- a/lib/datadog/tracing/contrib/action_cable/integration.rb +++ b/lib/datadog/tracing/contrib/action_cable/integration.rb @@ -17,7 +17,9 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :action_cable, auto_patch: false - + def self.gem_name + 'actioncable' + end def self.version Gem.loaded_specs['actioncable'] && Gem.loaded_specs['actioncable'].version end diff --git a/lib/datadog/tracing/contrib/action_mailer/integration.rb b/lib/datadog/tracing/contrib/action_mailer/integration.rb index fc9b4e5a980..f80e9df2e92 100644 --- a/lib/datadog/tracing/contrib/action_mailer/integration.rb +++ b/lib/datadog/tracing/contrib/action_mailer/integration.rb @@ -17,6 +17,10 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :action_mailer, auto_patch: false + + def self.gem_name + 'actionmailer' + end def self.version Gem.loaded_specs['actionmailer'] && Gem.loaded_specs['actionmailer'].version diff --git a/lib/datadog/tracing/contrib/action_pack/integration.rb b/lib/datadog/tracing/contrib/action_pack/integration.rb index 881d9ce273c..beeda608ba0 100644 --- a/lib/datadog/tracing/contrib/action_pack/integration.rb +++ b/lib/datadog/tracing/contrib/action_pack/integration.rb @@ -18,7 +18,9 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :action_pack, auto_patch: false - + def self.gem_name + 'actionpack' + end def self.version Gem.loaded_specs['actionpack'] && Gem.loaded_specs['actionpack'].version end diff --git a/lib/datadog/tracing/contrib/action_view/integration.rb b/lib/datadog/tracing/contrib/action_view/integration.rb index c56240be1f4..0c1a31c70d5 100644 --- a/lib/datadog/tracing/contrib/action_view/integration.rb +++ b/lib/datadog/tracing/contrib/action_view/integration.rb @@ -18,7 +18,10 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :action_view, auto_patch: false - + def self.gem_name + 'actionview' + end + def self.version # ActionView is its own gem in Rails 4.1+ if Gem.loaded_specs['actionview'] diff --git a/lib/datadog/tracing/contrib/active_job/integration.rb b/lib/datadog/tracing/contrib/active_job/integration.rb index 89718a647f2..755d5ce3ce4 100644 --- a/lib/datadog/tracing/contrib/active_job/integration.rb +++ b/lib/datadog/tracing/contrib/active_job/integration.rb @@ -17,7 +17,10 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :active_job, auto_patch: false - + def self.gem_name + 'activejob' + end + def self.version Gem.loaded_specs['activejob'] && Gem.loaded_specs['activejob'].version end diff --git a/lib/datadog/tracing/contrib/active_record/integration.rb b/lib/datadog/tracing/contrib/active_record/integration.rb index d5fd2294aae..39e78662e9b 100644 --- a/lib/datadog/tracing/contrib/active_record/integration.rb +++ b/lib/datadog/tracing/contrib/active_record/integration.rb @@ -21,7 +21,10 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :active_record, auto_patch: false - + def self.gem_name + 'activerecord' + end + def self.version Gem.loaded_specs['activerecord'] && Gem.loaded_specs['activerecord'].version end diff --git a/lib/datadog/tracing/contrib/active_support/integration.rb b/lib/datadog/tracing/contrib/active_support/integration.rb index 9cf29c4b1c5..366e6e84d65 100644 --- a/lib/datadog/tracing/contrib/active_support/integration.rb +++ b/lib/datadog/tracing/contrib/active_support/integration.rb @@ -19,7 +19,10 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :active_support, auto_patch: false - + def self.gem_name + 'activesupport' + end + def self.version Gem.loaded_specs['activesupport'] && Gem.loaded_specs['activesupport'].version end diff --git a/lib/datadog/tracing/contrib/aws/integration.rb b/lib/datadog/tracing/contrib/aws/integration.rb index b3a631bcb4a..2d05a0ab671 100644 --- a/lib/datadog/tracing/contrib/aws/integration.rb +++ b/lib/datadog/tracing/contrib/aws/integration.rb @@ -16,7 +16,10 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :aws, auto_patch: true - + def self.gem_name + 'aws-sdk-core' + end + def self.version if Gem.loaded_specs['aws-sdk'] Gem.loaded_specs['aws-sdk'].version diff --git a/lib/datadog/tracing/contrib/concurrent_ruby/integration.rb b/lib/datadog/tracing/contrib/concurrent_ruby/integration.rb index 17ac1daf8ca..05c0b44a065 100644 --- a/lib/datadog/tracing/contrib/concurrent_ruby/integration.rb +++ b/lib/datadog/tracing/contrib/concurrent_ruby/integration.rb @@ -16,7 +16,10 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :concurrent_ruby - + def self.gem_name + 'concurrent-ruby' + end + def self.version Gem.loaded_specs['concurrent-ruby'] && Gem.loaded_specs['concurrent-ruby'].version end diff --git a/lib/datadog/tracing/contrib/httprb/integration.rb b/lib/datadog/tracing/contrib/httprb/integration.rb index ba4dfd727dd..7d0986517da 100644 --- a/lib/datadog/tracing/contrib/httprb/integration.rb +++ b/lib/datadog/tracing/contrib/httprb/integration.rb @@ -17,7 +17,10 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :httprb - + def self.gem_name + 'http' + end + def self.version Gem.loaded_specs['http'] && Gem.loaded_specs['http'].version end diff --git a/lib/datadog/tracing/contrib/kafka/integration.rb b/lib/datadog/tracing/contrib/kafka/integration.rb index ce708f50123..45d6e01d24f 100644 --- a/lib/datadog/tracing/contrib/kafka/integration.rb +++ b/lib/datadog/tracing/contrib/kafka/integration.rb @@ -16,7 +16,10 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :kafka, auto_patch: false - + def self.gem_name + 'ruby-kafka' + end + def self.version Gem.loaded_specs['ruby-kafka'] && Gem.loaded_specs['ruby-kafka'].version end diff --git a/lib/datadog/tracing/contrib/mongodb/integration.rb b/lib/datadog/tracing/contrib/mongodb/integration.rb index 4a31fedbb3d..999865ab752 100644 --- a/lib/datadog/tracing/contrib/mongodb/integration.rb +++ b/lib/datadog/tracing/contrib/mongodb/integration.rb @@ -17,7 +17,10 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :mongo, auto_patch: true - + def self.gem_name + 'mongo' + end + def self.version Gem.loaded_specs['mongo'] && Gem.loaded_specs['mongo'].version end diff --git a/lib/datadog/tracing/contrib/opensearch/integration.rb b/lib/datadog/tracing/contrib/opensearch/integration.rb index 0bf906cb07e..d0863e1efe8 100644 --- a/lib/datadog/tracing/contrib/opensearch/integration.rb +++ b/lib/datadog/tracing/contrib/opensearch/integration.rb @@ -16,6 +16,9 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :opensearch, auto_patch: true + def self.gem_name + 'opensearch-ruby' + end def self.version Gem.loaded_specs['opensearch-ruby'] \ diff --git a/lib/datadog/tracing/contrib/presto/integration.rb b/lib/datadog/tracing/contrib/presto/integration.rb index 63c55c9bdc4..88fb321aacb 100644 --- a/lib/datadog/tracing/contrib/presto/integration.rb +++ b/lib/datadog/tracing/contrib/presto/integration.rb @@ -16,7 +16,10 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :presto - + def self.gem_name + 'presto-client' + end + def self.version Gem.loaded_specs['presto-client'] && Gem.loaded_specs['presto-client'].version end diff --git a/lib/datadog/tracing/contrib/rest_client/integration.rb b/lib/datadog/tracing/contrib/rest_client/integration.rb index 04ee5339733..df845935a3c 100644 --- a/lib/datadog/tracing/contrib/rest_client/integration.rb +++ b/lib/datadog/tracing/contrib/rest_client/integration.rb @@ -16,7 +16,10 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :rest_client - + def self.gem_name + 'rest-client' + end + def self.version Gem.loaded_specs['rest-client'] && Gem.loaded_specs['rest-client'].version end From 6fb1de798c5383f089880a80f025a568b9a41a66 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Mon, 23 Dec 2024 15:48:54 -0500 Subject: [PATCH 15/43] linting checks --- lib/datadog/tracing/contrib/action_cable/integration.rb | 1 + lib/datadog/tracing/contrib/action_mailer/integration.rb | 2 +- lib/datadog/tracing/contrib/action_pack/integration.rb | 1 + lib/datadog/tracing/contrib/action_view/integration.rb | 2 +- lib/datadog/tracing/contrib/active_job/integration.rb | 2 +- lib/datadog/tracing/contrib/active_record/integration.rb | 3 ++- lib/datadog/tracing/contrib/active_support/integration.rb | 2 +- lib/datadog/tracing/contrib/aws/integration.rb | 2 +- lib/datadog/tracing/contrib/concurrent_ruby/integration.rb | 2 +- lib/datadog/tracing/contrib/httprb/integration.rb | 2 +- lib/datadog/tracing/contrib/kafka/integration.rb | 2 +- lib/datadog/tracing/contrib/mongodb/integration.rb | 2 +- lib/datadog/tracing/contrib/presto/integration.rb | 2 +- lib/datadog/tracing/contrib/rest_client/integration.rb | 2 +- 14 files changed, 15 insertions(+), 12 deletions(-) diff --git a/lib/datadog/tracing/contrib/action_cable/integration.rb b/lib/datadog/tracing/contrib/action_cable/integration.rb index 311d328470b..1699238dd4c 100644 --- a/lib/datadog/tracing/contrib/action_cable/integration.rb +++ b/lib/datadog/tracing/contrib/action_cable/integration.rb @@ -20,6 +20,7 @@ class Integration def self.gem_name 'actioncable' end + def self.version Gem.loaded_specs['actioncable'] && Gem.loaded_specs['actioncable'].version end diff --git a/lib/datadog/tracing/contrib/action_mailer/integration.rb b/lib/datadog/tracing/contrib/action_mailer/integration.rb index f80e9df2e92..07fef8095af 100644 --- a/lib/datadog/tracing/contrib/action_mailer/integration.rb +++ b/lib/datadog/tracing/contrib/action_mailer/integration.rb @@ -17,7 +17,7 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :action_mailer, auto_patch: false - + def self.gem_name 'actionmailer' end diff --git a/lib/datadog/tracing/contrib/action_pack/integration.rb b/lib/datadog/tracing/contrib/action_pack/integration.rb index beeda608ba0..c0efa9196dc 100644 --- a/lib/datadog/tracing/contrib/action_pack/integration.rb +++ b/lib/datadog/tracing/contrib/action_pack/integration.rb @@ -21,6 +21,7 @@ class Integration def self.gem_name 'actionpack' end + def self.version Gem.loaded_specs['actionpack'] && Gem.loaded_specs['actionpack'].version end diff --git a/lib/datadog/tracing/contrib/action_view/integration.rb b/lib/datadog/tracing/contrib/action_view/integration.rb index 0c1a31c70d5..48dd75fe94c 100644 --- a/lib/datadog/tracing/contrib/action_view/integration.rb +++ b/lib/datadog/tracing/contrib/action_view/integration.rb @@ -21,7 +21,7 @@ class Integration def self.gem_name 'actionview' end - + def self.version # ActionView is its own gem in Rails 4.1+ if Gem.loaded_specs['actionview'] diff --git a/lib/datadog/tracing/contrib/active_job/integration.rb b/lib/datadog/tracing/contrib/active_job/integration.rb index 755d5ce3ce4..73b912a894f 100644 --- a/lib/datadog/tracing/contrib/active_job/integration.rb +++ b/lib/datadog/tracing/contrib/active_job/integration.rb @@ -20,7 +20,7 @@ class Integration def self.gem_name 'activejob' end - + def self.version Gem.loaded_specs['activejob'] && Gem.loaded_specs['activejob'].version end diff --git a/lib/datadog/tracing/contrib/active_record/integration.rb b/lib/datadog/tracing/contrib/active_record/integration.rb index 39e78662e9b..f9ac1048453 100644 --- a/lib/datadog/tracing/contrib/active_record/integration.rb +++ b/lib/datadog/tracing/contrib/active_record/integration.rb @@ -21,10 +21,11 @@ class Integration # @public_api Changing the integration name or integration options can cause breaking changes register_as :active_record, auto_patch: false + def self.gem_name 'activerecord' end - + def self.version Gem.loaded_specs['activerecord'] && Gem.loaded_specs['activerecord'].version end diff --git a/lib/datadog/tracing/contrib/active_support/integration.rb b/lib/datadog/tracing/contrib/active_support/integration.rb index 366e6e84d65..e335a6349a1 100644 --- a/lib/datadog/tracing/contrib/active_support/integration.rb +++ b/lib/datadog/tracing/contrib/active_support/integration.rb @@ -22,7 +22,7 @@ class Integration def self.gem_name 'activesupport' end - + def self.version Gem.loaded_specs['activesupport'] && Gem.loaded_specs['activesupport'].version end diff --git a/lib/datadog/tracing/contrib/aws/integration.rb b/lib/datadog/tracing/contrib/aws/integration.rb index 2d05a0ab671..167ea1be49a 100644 --- a/lib/datadog/tracing/contrib/aws/integration.rb +++ b/lib/datadog/tracing/contrib/aws/integration.rb @@ -19,7 +19,7 @@ class Integration def self.gem_name 'aws-sdk-core' end - + def self.version if Gem.loaded_specs['aws-sdk'] Gem.loaded_specs['aws-sdk'].version diff --git a/lib/datadog/tracing/contrib/concurrent_ruby/integration.rb b/lib/datadog/tracing/contrib/concurrent_ruby/integration.rb index 05c0b44a065..e82414273a3 100644 --- a/lib/datadog/tracing/contrib/concurrent_ruby/integration.rb +++ b/lib/datadog/tracing/contrib/concurrent_ruby/integration.rb @@ -19,7 +19,7 @@ class Integration def self.gem_name 'concurrent-ruby' end - + def self.version Gem.loaded_specs['concurrent-ruby'] && Gem.loaded_specs['concurrent-ruby'].version end diff --git a/lib/datadog/tracing/contrib/httprb/integration.rb b/lib/datadog/tracing/contrib/httprb/integration.rb index 7d0986517da..a5dd5fcc708 100644 --- a/lib/datadog/tracing/contrib/httprb/integration.rb +++ b/lib/datadog/tracing/contrib/httprb/integration.rb @@ -20,7 +20,7 @@ class Integration def self.gem_name 'http' end - + def self.version Gem.loaded_specs['http'] && Gem.loaded_specs['http'].version end diff --git a/lib/datadog/tracing/contrib/kafka/integration.rb b/lib/datadog/tracing/contrib/kafka/integration.rb index 45d6e01d24f..d0e934cb06d 100644 --- a/lib/datadog/tracing/contrib/kafka/integration.rb +++ b/lib/datadog/tracing/contrib/kafka/integration.rb @@ -19,7 +19,7 @@ class Integration def self.gem_name 'ruby-kafka' end - + def self.version Gem.loaded_specs['ruby-kafka'] && Gem.loaded_specs['ruby-kafka'].version end diff --git a/lib/datadog/tracing/contrib/mongodb/integration.rb b/lib/datadog/tracing/contrib/mongodb/integration.rb index 999865ab752..e4ad350ea62 100644 --- a/lib/datadog/tracing/contrib/mongodb/integration.rb +++ b/lib/datadog/tracing/contrib/mongodb/integration.rb @@ -20,7 +20,7 @@ class Integration def self.gem_name 'mongo' end - + def self.version Gem.loaded_specs['mongo'] && Gem.loaded_specs['mongo'].version end diff --git a/lib/datadog/tracing/contrib/presto/integration.rb b/lib/datadog/tracing/contrib/presto/integration.rb index 88fb321aacb..7bfae3d42a2 100644 --- a/lib/datadog/tracing/contrib/presto/integration.rb +++ b/lib/datadog/tracing/contrib/presto/integration.rb @@ -19,7 +19,7 @@ class Integration def self.gem_name 'presto-client' end - + def self.version Gem.loaded_specs['presto-client'] && Gem.loaded_specs['presto-client'].version end diff --git a/lib/datadog/tracing/contrib/rest_client/integration.rb b/lib/datadog/tracing/contrib/rest_client/integration.rb index df845935a3c..d3dc0bf3c30 100644 --- a/lib/datadog/tracing/contrib/rest_client/integration.rb +++ b/lib/datadog/tracing/contrib/rest_client/integration.rb @@ -19,7 +19,7 @@ class Integration def self.gem_name 'rest-client' end - + def self.version Gem.loaded_specs['rest-client'] && Gem.loaded_specs['rest-client'].version end From 3b8cff4a96614023e84f2d9d0449beb134c278b6 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 24 Dec 2024 09:42:01 -0500 Subject: [PATCH 16/43] cleanup comments --- .github/scripts/generate_table_versions.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/scripts/generate_table_versions.rb b/.github/scripts/generate_table_versions.rb index 1c56232c3ab..bbc8ef62dcd 100644 --- a/.github/scripts/generate_table_versions.rb +++ b/.github/scripts/generate_table_versions.rb @@ -1,13 +1,10 @@ require 'json' -# Input and output file names input_file = 'gem_output.json' output_file = 'integration_versions.md' -# Read JSON data from the input file data = JSON.parse(File.read(input_file)) -# Prepare the Markdown content comment = "# Integrations\n\n" header = "| Integration | Ruby Min | Ruby Max | JRuby Min | JRuby Max |\n" separator = "|-------------|----------|-----------|----------|----------|\n" @@ -16,7 +13,6 @@ "| #{integration_name} | #{ruby_min} | #{ruby_max} | #{jruby_min} | #{jruby_max} |" end -# Write the Markdown file File.open(output_file, 'w') do |file| file.puts comment file.puts header From c45330a0f6878e3533f8dce56ceaa6614615c8cb Mon Sep 17 00:00:00 2001 From: quinna-h Date: Thu, 26 Dec 2024 18:45:42 -0500 Subject: [PATCH 17/43] refactor code --- .github/scripts/find_gem_version_bounds.rb | 181 +++++++++++---------- 1 file changed, 93 insertions(+), 88 deletions(-) diff --git a/.github/scripts/find_gem_version_bounds.rb b/.github/scripts/find_gem_version_bounds.rb index cdddfeec8a2..48fe34278ef 100644 --- a/.github/scripts/find_gem_version_bounds.rb +++ b/.github/scripts/find_gem_version_bounds.rb @@ -7,124 +7,129 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'datadog' -def parse_gemfiles(directory = 'gemfiles/') - min_gems = { 'ruby' => {}, 'jruby' => {} } - max_gems = { 'ruby' => {}, 'jruby' => {} } - - gemfiles = Dir.glob(File.join(directory, '*')) - gemfiles.each do |gemfile_name| - runtime = File.basename(gemfile_name).split('_').first # ruby or jruby - next unless %w[ruby jruby].include?(runtime) - # parse the gemfile - if gemfile_name.end_with?(".gemfile") - process_gemfile(gemfile_name, runtime, min_gems, max_gems) - elsif gemfile_name.end_with?('.gemfile.lock') - process_lockfile(gemfile_name, runtime, min_gems, max_gems) - end +class GemfileProcessor + SPECIAL_CASES = { + "opensearch" => "OpenSearch" # special case because opensearch = OpenSearch not Opensearch + }.freeze + EXCLUDED_INTEGRATIONS = ["configuration", "propagation", "utils"].freeze + + def initialize(directory: 'gemfiles/', contrib_dir: 'lib/datadog/tracing/contrib/') + # TODO: HERE + @directory = directory + @contrib_dir = contrib_dir + @min_gems = { 'ruby' => {}, 'jruby' => {} } + @max_gems = { 'ruby' => {}, 'jruby' => {} } + @integration_json_mapping = {} end - [min_gems['ruby'], min_gems['jruby'], max_gems['ruby'], max_gems['jruby']] -end - -def process_gemfile(gemfile_name, runtime, min_gems, max_gems) - begin - definition = Bundler::Definition.build(gemfile_name, nil, nil) - definition.dependencies.each do |dependency| - gem_name = dependency.name - version = dependency.requirement.to_s - update_gem_versions(runtime, gem_name, version, min_gems, max_gems) - end - rescue Bundler::GemfileError => e - puts "Error reading Gemfile: #{e.message}" + def process + # TODO: HERE + parse_gemfiles + process_integrations + write_output end -end -def process_lockfile(gemfile_name, runtime, min_gems, max_gems) - lockfile_contents = File.read(gemfile_name) - parser = Bundler::LockfileParser.new(lockfile_contents) - parser.specs.each do |spec| - gem_name = spec.name - version = spec.version.to_s - update_gem_versions(runtime, gem_name, version, min_gems, max_gems) - end -end + private + -def update_gem_versions(runtime, gem_name, version, min_gems, max_gems) - return unless version_valid?(version) + def parse_gemfiles(directory = 'gemfiles/') + # min_gems = { 'ruby' => {}, 'jruby' => {} } + # max_gems = { 'ruby' => {}, 'jruby' => {} } - gem_version = Gem::Version.new(version) + gemfiles = Dir.glob(File.join(@directory, '*')) + gemfiles.each do |gemfile_name| + runtime = File.basename(gemfile_name).split('_').first # ruby or jruby + next unless %w[ruby jruby].include?(runtime) + # parse the gemfile + if gemfile_name.end_with?(".gemfile") + process_gemfile(gemfile_name, runtime) + elsif gemfile_name.end_with?('.gemfile.lock') + process_lockfile(gemfile_name, runtime) + end + end - # Update minimum gems - if min_gems[runtime][gem_name].nil? || gem_version < Gem::Version.new(min_gems[runtime][gem_name]) - min_gems[runtime][gem_name] = version end - # Update maximum gems - if max_gems[runtime][gem_name].nil? || gem_version > Gem::Version.new(max_gems[runtime][gem_name]) - max_gems[runtime][gem_name] = version + def process_gemfile(gemfile_name, runtime) + begin + definition = Bundler::Definition.build(gemfile_name, nil, nil) + definition.dependencies.each do |dependency| + gem_name = dependency.name + version = dependency.requirement.to_s + update_gem_versions(runtime, gem_name, version) + end + rescue Bundler::GemfileError => e + puts "Error reading Gemfile: #{e.message}" + end + end + + def process_lockfile(gemfile_name, runtime) + lockfile_contents = File.read(gemfile_name) + parser = Bundler::LockfileParser.new(lockfile_contents) + parser.specs.each do |spec| + gem_name = spec.name + version = spec.version.to_s + update_gem_versions(runtime, gem_name, version) + end end -end + def update_gem_versions(runtime, gem_name, version) + return unless version_valid?(version) + gem_version = Gem::Version.new(version) -# Helper: Validate the version format -def version_valid?(version) - return false if version.nil? + # Update minimum gems + if @min_gems[runtime][gem_name].nil? || gem_version < Gem::Version.new(@min_gems[runtime][gem_name]) + @min_gems[runtime][gem_name] = version + end - version = version.to_s.strip + # Update maximum gems + if @max_gems[runtime][gem_name].nil? || gem_version > Gem::Version.new(@max_gems[runtime][gem_name]) + @max_gems[runtime][gem_name] = version + end + end - return false if version.empty? + # Helper: Validate the version format + def version_valid?(version) + return false if version.nil? || version.strip.empty? - # Ensure it's a valid Gem::Version - begin Gem::Version.new(version) true rescue ArgumentError false end -end -def get_integration_names(directory = 'lib/datadog/tracing/contrib/') - Datadog::Tracing::Contrib::REGISTRY.map{ |i| i.name.to_s } -end - -SPECIAL_CASES = { - "opensearch" => "OpenSearch" # special case because opensearch = OpenSearch not Opensearch -}.freeze -excluded = ["configuration", "propagation", "utils"] -min_gems_ruby, min_gems_jruby, max_gems_ruby, max_gems_jruby = parse_gemfiles("gemfiles/") -integrations = get_integration_names('lib/datadog/tracing/contrib/') + def process_integrations + integrations = Datadog::Tracing::Contrib::REGISTRY.map(&:name).map(&:to_s) + integrations.each do |integration| + next if EXCLUDED_INTEGRATIONS.include?(integration) -integration_json_mapping = {} + integration_name = resolve_integration_name(integration) -integrations.each do |integration| - next if excluded.include?(integration) + @integration_json_mapping[integration] = [ + @min_gems['ruby'][integration_name], + @max_gems['ruby'][integration_name], + @min_gems['jruby'][integration_name], + @max_gems['jruby'][integration_name] + ] + end + end - begin + def resolve_integration_name(integration) mod_name = SPECIAL_CASES[integration] || integration.split('_').map(&:capitalize).join module_name = "Datadog::Tracing::Contrib::#{mod_name}" integration_module = Object.const_get(module_name)::Integration - integration_name = integration_module.respond_to?(:gem_name) ? integration_module.gem_name : integration - rescue NameError - puts "Integration module not found for #{integration}, falling back to integration name." - integration_name = integration - rescue NoMethodError - puts "gem_name method missing for #{integration}, falling back to integration name." - integration_name = integration + integration_module.respond_to?(:gem_name) ? integration_module.gem_name : integration + rescue NameError, NoMethodError + puts "Fallback for #{integration}: module or gem_name not found." + integration end - min_version_jruby = min_gems_jruby[integration_name] - min_version_ruby = min_gems_ruby[integration_name] - max_version_jruby = max_gems_jruby[integration_name] - max_version_ruby = max_gems_ruby[integration_name] - - integration_json_mapping[integration] = [ - min_version_ruby, max_version_ruby, - min_version_jruby, max_version_jruby - ] + def write_output + @integration_json_mapping = @integration_json_mapping.sort.to_h + File.write("gem_output.json", JSON.pretty_generate(@integration_json_mapping)) + end end -# Sort and output the mapping -integration_json_mapping = integration_json_mapping.sort.to_h -File.write("gem_output.json", JSON.pretty_generate(integration_json_mapping)) \ No newline at end of file +GemfileProcessor.new.process \ No newline at end of file From 589bccc9fbd2458170cf30b9c2f60a8391d1ed11 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Thu, 26 Dec 2024 18:46:37 -0500 Subject: [PATCH 18/43] cleanup code --- .github/scripts/find_gem_version_bounds.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/scripts/find_gem_version_bounds.rb b/.github/scripts/find_gem_version_bounds.rb index 48fe34278ef..3a863747d0e 100644 --- a/.github/scripts/find_gem_version_bounds.rb +++ b/.github/scripts/find_gem_version_bounds.rb @@ -14,7 +14,6 @@ class GemfileProcessor EXCLUDED_INTEGRATIONS = ["configuration", "propagation", "utils"].freeze def initialize(directory: 'gemfiles/', contrib_dir: 'lib/datadog/tracing/contrib/') - # TODO: HERE @directory = directory @contrib_dir = contrib_dir @min_gems = { 'ruby' => {}, 'jruby' => {} } @@ -23,7 +22,6 @@ def initialize(directory: 'gemfiles/', contrib_dir: 'lib/datadog/tracing/contrib end def process - # TODO: HERE parse_gemfiles process_integrations write_output @@ -33,9 +31,6 @@ def process def parse_gemfiles(directory = 'gemfiles/') - # min_gems = { 'ruby' => {}, 'jruby' => {} } - # max_gems = { 'ruby' => {}, 'jruby' => {} } - gemfiles = Dir.glob(File.join(@directory, '*')) gemfiles.each do |gemfile_name| runtime = File.basename(gemfile_name).split('_').first # ruby or jruby From d015ca2e269629388ba079e173e76720b08b06e1 Mon Sep 17 00:00:00 2001 From: Bradley Schaefer Date: Mon, 30 Dec 2024 12:38:27 -0500 Subject: [PATCH 19/43] Combine duplicate option table rows The documentation for instrumenting rake had two rows for the same option key. This consolidates those entries into a single row. --- docs/GettingStarted.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index 894903047bd..9262b29bcb4 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -1547,11 +1547,10 @@ Rake::Task['my_task'].invoke | Key | Env Var| Type | Description | Default | | -------------- | - | ------- | -------------------------------------------------------------------------------------------------------- | -------- | -| `enabled` | | `Bool` | Defines whether Rake tasks should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` | +| `enabled` | `DD_TRACE_RAKE_ENABLED` | `Bool` | Defines whether Rake tasks should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` | | `quantize` | | `Hash` | Hash containing options for quantization of task arguments. See below for more details and examples. | `{}` | | `service_name` | | `String` | Service name used for `rake` instrumentation | `'rake'` | | `tasks` | | `Array` | Names of the Rake tasks to instrument | `[]` | -| `enabled` | `DD_TRACE_RAKE_ENABLED` | `Bool` | Whether the integration should create spans. | `true` | **Configuring task quantization behavior** From c24490f978cbc0bb47bb15b1168b56d2d41e2e14 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 2 Jan 2025 16:15:19 +0000 Subject: [PATCH 20/43] Enable type checking for AgentSettingsResolver/AgentSettings Steep doesn't seem to be a big fan of Structs so I just went ahead and turned the `AgentSettings` into a regular class that's equivalent to the struct we had before. (In particular, I decided to still keep every field as optional). Ideally this would be a `Data` class, but we're far from dropping support for Rubies that don't have it. --- Steepfile | 1 - .../configuration/agent_settings_resolver.rb | 22 ++++----- .../configuration/agent_settings_resolver.rbs | 46 +++++++++++++------ sig/datadog/core/configuration/ext.rbs | 1 + 4 files changed, 44 insertions(+), 26 deletions(-) diff --git a/Steepfile b/Steepfile index 24d49808692..d2cce9c3ef6 100644 --- a/Steepfile +++ b/Steepfile @@ -80,7 +80,6 @@ target :datadog do ignore 'lib/datadog/core/buffer/thread_safe.rb' ignore 'lib/datadog/core/chunker.rb' ignore 'lib/datadog/core/configuration.rb' - ignore 'lib/datadog/core/configuration/agent_settings_resolver.rb' ignore 'lib/datadog/core/configuration/base.rb' ignore 'lib/datadog/core/configuration/components.rb' ignore 'lib/datadog/core/configuration/dependency_resolver.rb' diff --git a/lib/datadog/core/configuration/agent_settings_resolver.rb b/lib/datadog/core/configuration/agent_settings_resolver.rb index 7d7c048f553..3d407ce1afb 100644 --- a/lib/datadog/core/configuration/agent_settings_resolver.rb +++ b/lib/datadog/core/configuration/agent_settings_resolver.rb @@ -19,17 +19,17 @@ module Configuration # Whenever there is a conflict (different configurations are provided in different orders), it MUST warn the users # about it and pick a value based on the following priority: code > environment variable > defaults. class AgentSettingsResolver - AgentSettings = Struct.new( - :adapter, - :ssl, - :hostname, - :port, - :uds_path, - :timeout_seconds, - keyword_init: true - ) do - def initialize(*) - super + # Immutable container for the resulting settings + class AgentSettings + attr_reader :adapter, :ssl, :hostname, :port, :uds_path, :timeout_seconds + + def initialize(adapter: nil, ssl: nil, hostname: nil, port: nil, uds_path: nil, timeout_seconds: nil) + @adapter = adapter + @ssl = ssl + @hostname = hostname + @port = port + @uds_path = uds_path + @timeout_seconds = timeout_seconds freeze end end diff --git a/sig/datadog/core/configuration/agent_settings_resolver.rbs b/sig/datadog/core/configuration/agent_settings_resolver.rbs index 040a9aa960a..a4ea2830ddb 100644 --- a/sig/datadog/core/configuration/agent_settings_resolver.rbs +++ b/sig/datadog/core/configuration/agent_settings_resolver.rbs @@ -2,9 +2,8 @@ module Datadog module Core module Configuration class AgentSettingsResolver - class AgentSettings < ::Struct[untyped] + class AgentSettings def initialize: (adapter: untyped, ssl: untyped, hostname: untyped, port: untyped, uds_path: untyped, timeout_seconds: untyped) -> void - def merge: (**::Hash[untyped, untyped] member_values) -> AgentSettingsResolver attr_reader adapter: untyped attr_reader ssl: untyped @@ -14,6 +13,17 @@ module Datadog attr_reader timeout_seconds: untyped end + @settings: untyped + @logger: untyped + @configured_hostname: untyped + @configured_port: untyped + @configured_ssl: untyped + @configured_timeout_seconds: untyped + @configured_uds_path: untyped + @uds_fallback: untyped + @mixed_http_and_uds: untyped + @parsed_url: untyped + def self.call: (untyped settings, ?logger: untyped) -> untyped private @@ -38,33 +48,31 @@ module Datadog def configured_uds_path: () -> untyped - def try_parsing_as_integer: (value: untyped, friendly_name: untyped) -> untyped + def parsed_url_ssl?: () -> (nil | untyped) - def try_parsing_as_boolean: (value: untyped, friendly_name: untyped) -> untyped + def try_parsing_as_integer: (value: untyped, friendly_name: untyped) -> untyped - def ssl?: () -> bool + def ssl?: () -> (false | untyped) def hostname: () -> untyped def port: () -> untyped - def uds_path: () -> untyped - def timeout_seconds: () -> untyped - def uds_fallback: () -> untyped + def parsed_url_uds_path: () -> (nil | untyped) - def should_use_uds_fallback?: () -> untyped + def uds_path: () -> (nil | untyped) - def should_use_uds?: () -> bool + def uds_fallback: () -> untyped - def can_use_uds?: () -> bool + def should_use_uds?: () -> untyped - def parsed_url: () -> untyped + def mixed_http_and_uds: () -> untyped - def parsed_url_ssl?: () -> untyped + def can_use_uds?: () -> untyped - def parsed_url_uds_path: () -> untyped + def parsed_url: () -> untyped def pick_from: (*untyped configurations_in_priority_order) -> untyped @@ -72,7 +80,17 @@ module Datadog def log_warning: (untyped message) -> (untyped | nil) + def http_scheme?: (untyped uri) -> untyped + + def parsed_http_url: () -> (untyped | nil) + + def unix_scheme?: (untyped uri) -> untyped + class DetectedConfiguration + @friendly_name: untyped + + @value: untyped + attr_reader friendly_name: untyped attr_reader value: untyped diff --git a/sig/datadog/core/configuration/ext.rbs b/sig/datadog/core/configuration/ext.rbs index 71b7acc0951..77f9eae8265 100644 --- a/sig/datadog/core/configuration/ext.rbs +++ b/sig/datadog/core/configuration/ext.rbs @@ -15,6 +15,7 @@ module Datadog end module Agent + ENV_DEFAULT_HOST: 'DD_AGENT_HOST' ENV_DEFAULT_PORT: 'DD_TRACE_AGENT_PORT' ENV_DEFAULT_URL: 'DD_TRACE_AGENT_URL' ENV_DEFAULT_TIMEOUT_SECONDS: 'DD_TRACE_AGENT_TIMEOUT_SECONDS' From 7796a9eef76b3188d8646b0639e65f631d4891ad Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 2 Jan 2025 16:23:53 +0000 Subject: [PATCH 21/43] Move url building behavior from `AgentBaseUrl` to `AgentSettings` This is preparation to also share this behavior with profiling. --- .../configuration/agent_settings_resolver.rb | 18 ++++++ .../core/crashtracking/agent_base_url.rb | 14 +---- .../configuration/agent_settings_resolver.rbs | 7 +++ .../agent_settings_resolver_spec.rb | 57 +++++++++++++++++++ .../core/crashtracking/agent_base_url_spec.rb | 25 ++------ 5 files changed, 88 insertions(+), 33 deletions(-) diff --git a/lib/datadog/core/configuration/agent_settings_resolver.rb b/lib/datadog/core/configuration/agent_settings_resolver.rb index 3d407ce1afb..424f47c331e 100644 --- a/lib/datadog/core/configuration/agent_settings_resolver.rb +++ b/lib/datadog/core/configuration/agent_settings_resolver.rb @@ -32,8 +32,26 @@ def initialize(adapter: nil, ssl: nil, hostname: nil, port: nil, uds_path: nil, @timeout_seconds = timeout_seconds freeze end + + def url + case adapter + when Datadog::Core::Configuration::Ext::Agent::HTTP::ADAPTER + hostname = self.hostname + hostname = "[#{hostname}]" if hostname =~ IPV6_REGEXP + "#{ssl ? 'https' : 'http'}://#{hostname}:#{port}/" + when Datadog::Core::Configuration::Ext::Agent::UnixSocket::ADAPTER + "unix://#{uds_path}" + else + raise ArgumentError, "Unexpected adapter: #{adapter}" + end + end end + # IPv6 regular expression from + # https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + # Does not match IPv4 addresses. + IPV6_REGEXP = /\A(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\z)/.freeze # rubocop:disable Layout/LineLength + def self.call(settings, logger: Datadog.logger) new(settings, logger: logger).send(:call) end diff --git a/lib/datadog/core/crashtracking/agent_base_url.rb b/lib/datadog/core/crashtracking/agent_base_url.rb index 74b59a1cda5..20a9a55129b 100644 --- a/lib/datadog/core/crashtracking/agent_base_url.rb +++ b/lib/datadog/core/crashtracking/agent_base_url.rb @@ -7,20 +7,8 @@ module Core module Crashtracking # This module provides a method to resolve the base URL of the agent module AgentBaseUrl - # IPv6 regular expression from - # https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - # Does not match IPv4 addresses. - IPV6_REGEXP = /\A(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\z)/.freeze # rubocop:disable Layout/LineLength - def self.resolve(agent_settings) - case agent_settings.adapter - when Datadog::Core::Configuration::Ext::Agent::HTTP::ADAPTER - hostname = agent_settings.hostname - hostname = "[#{hostname}]" if hostname =~ IPV6_REGEXP - "#{agent_settings.ssl ? 'https' : 'http'}://#{hostname}:#{agent_settings.port}/" - when Datadog::Core::Configuration::Ext::Agent::UnixSocket::ADAPTER - "unix://#{agent_settings.uds_path}" - end + agent_settings.url end end end diff --git a/sig/datadog/core/configuration/agent_settings_resolver.rbs b/sig/datadog/core/configuration/agent_settings_resolver.rbs index a4ea2830ddb..e3a2472abf4 100644 --- a/sig/datadog/core/configuration/agent_settings_resolver.rbs +++ b/sig/datadog/core/configuration/agent_settings_resolver.rbs @@ -11,6 +11,8 @@ module Datadog attr_reader port: untyped attr_reader uds_path: untyped attr_reader timeout_seconds: untyped + + def url: () -> ::String end @settings: untyped @@ -24,6 +26,11 @@ module Datadog @mixed_http_and_uds: untyped @parsed_url: untyped + # IPv6 regular expression from + # https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + # Does not match IPv4 addresses. + IPV6_REGEXP: ::Regexp + def self.call: (untyped settings, ?logger: untyped) -> untyped private diff --git a/spec/datadog/core/configuration/agent_settings_resolver_spec.rb b/spec/datadog/core/configuration/agent_settings_resolver_spec.rb index ef2a6766ea1..c057e520739 100644 --- a/spec/datadog/core/configuration/agent_settings_resolver_spec.rb +++ b/spec/datadog/core/configuration/agent_settings_resolver_spec.rb @@ -803,4 +803,61 @@ end end end + + describe 'url' do + context 'when using HTTP adapter' do + before do + datadog_settings.agent.host = 'example.com' + datadog_settings.agent.port = 8080 + end + + context 'when SSL is enabled' do + before { datadog_settings.agent.use_ssl = true } + + it 'returns the correct base URL' do + expect(resolver.url).to eq('https://example.com:8080/') + end + end + + context 'when SSL is disabled' do + before { datadog_settings.agent.use_ssl = false } + + it 'returns the correct base URL' do + expect(resolver.url).to eq('http://example.com:8080/') + end + end + + context 'when hostname is an IPv4 address' do + before { datadog_settings.agent.host = '1.2.3.4' } + + it 'returns the correct base URL' do + expect(resolver.url).to eq('http://1.2.3.4:8080/') + end + end + + context 'when hostname is an IPv6 address' do + before { datadog_settings.agent.host = '1234:1234::1' } + + it 'returns the correct base URL' do + expect(resolver.url).to eq('http://[1234:1234::1]:8080/') + end + end + end + + context 'when using UnixSocket adapter' do + before { datadog_settings.agent.uds_path = '/var/run/datadog.sock' } + + it 'returns the correct base URL' do + expect(resolver.url).to eq('unix:///var/run/datadog.sock') + end + end + + context 'when using an unknown adapter' do + it 'raises an exception' do + agent_settings = Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings.new(adapter: :unknown) + + expect { agent_settings.url }.to raise_error(ArgumentError, /Unexpected adapter/) + end + end + end end diff --git a/spec/datadog/core/crashtracking/agent_base_url_spec.rb b/spec/datadog/core/crashtracking/agent_base_url_spec.rb index 407b74daf26..4a8145208cf 100644 --- a/spec/datadog/core/crashtracking/agent_base_url_spec.rb +++ b/spec/datadog/core/crashtracking/agent_base_url_spec.rb @@ -8,8 +8,7 @@ context 'when using HTTP adapter' do context 'when SSL is enabled' do let(:agent_settings) do - instance_double( - Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings, + Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings.new( adapter: Datadog::Core::Configuration::Ext::Agent::HTTP::ADAPTER, ssl: true, hostname: 'example.com', @@ -24,8 +23,7 @@ context 'when SSL is disabled' do let(:agent_settings) do - instance_double( - Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings, + Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings.new( adapter: Datadog::Core::Configuration::Ext::Agent::HTTP::ADAPTER, ssl: false, hostname: 'example.com', @@ -40,8 +38,7 @@ context 'when hostname is an IPv4 address' do let(:agent_settings) do - instance_double( - Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings, + Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings.new( adapter: Datadog::Core::Configuration::Ext::Agent::HTTP::ADAPTER, ssl: false, hostname: '1.2.3.4', @@ -56,8 +53,7 @@ context 'when hostname is an IPv6 address' do let(:agent_settings) do - instance_double( - Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings, + Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings.new( adapter: Datadog::Core::Configuration::Ext::Agent::HTTP::ADAPTER, ssl: false, hostname: '1234:1234::1', @@ -73,8 +69,7 @@ context 'when using UnixSocket adapter' do let(:agent_settings) do - instance_double( - Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings, + Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings.new( adapter: Datadog::Core::Configuration::Ext::Agent::UnixSocket::ADAPTER, uds_path: '/var/run/datadog.sock' ) @@ -84,15 +79,5 @@ expect(described_class.resolve(agent_settings)).to eq('unix:///var/run/datadog.sock') end end - - context 'when using unknownm adapter' do - let(:agent_settings) do - instance_double(Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings, adapter: 'unknown') - end - - it 'returns nil' do - expect(described_class.resolve(agent_settings)).to be_nil - end - end end end From 2f824ff90b2ec64013a071a3e2a6bcf4f034415e Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 2 Jan 2025 17:28:45 +0000 Subject: [PATCH 22/43] Refactor crashtracking to use `AgentSettings#url` The behavior from the old `AgentBaseUrl` is now contained in `AgentSettings` so we can clean up the extra logic. --- .../core/crashtracking/agent_base_url.rb | 16 ---- lib/datadog/core/crashtracking/component.rb | 4 +- .../core/crashtracking/agent_base_url.rbs | 10 --- .../core/crashtracking/agent_base_url_spec.rb | 83 ------------------- .../core/crashtracking/component_spec.rb | 34 ++------ 5 files changed, 8 insertions(+), 139 deletions(-) delete mode 100644 lib/datadog/core/crashtracking/agent_base_url.rb delete mode 100644 sig/datadog/core/crashtracking/agent_base_url.rbs delete mode 100644 spec/datadog/core/crashtracking/agent_base_url_spec.rb diff --git a/lib/datadog/core/crashtracking/agent_base_url.rb b/lib/datadog/core/crashtracking/agent_base_url.rb deleted file mode 100644 index 20a9a55129b..00000000000 --- a/lib/datadog/core/crashtracking/agent_base_url.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -require_relative '../configuration/ext' - -module Datadog - module Core - module Crashtracking - # This module provides a method to resolve the base URL of the agent - module AgentBaseUrl - def self.resolve(agent_settings) - agent_settings.url - end - end - end - end -end diff --git a/lib/datadog/core/crashtracking/component.rb b/lib/datadog/core/crashtracking/component.rb index ee04e1c5cc8..460a7974bc5 100644 --- a/lib/datadog/core/crashtracking/component.rb +++ b/lib/datadog/core/crashtracking/component.rb @@ -3,7 +3,6 @@ require 'libdatadog' require_relative 'tag_builder' -require_relative 'agent_base_url' require_relative '../utils/only_once' require_relative '../utils/at_fork_monkey_patch' @@ -31,8 +30,7 @@ class Component def self.build(settings, agent_settings, logger:) tags = TagBuilder.call(settings) - agent_base_url = AgentBaseUrl.resolve(agent_settings) - logger.warn('Missing agent base URL; cannot enable crash tracking') unless agent_base_url + agent_base_url = agent_settings.url ld_library_path = ::Libdatadog.ld_library_path logger.warn('Missing ld_library_path; cannot enable crash tracking') unless ld_library_path diff --git a/sig/datadog/core/crashtracking/agent_base_url.rbs b/sig/datadog/core/crashtracking/agent_base_url.rbs deleted file mode 100644 index 3a2c77f8e85..00000000000 --- a/sig/datadog/core/crashtracking/agent_base_url.rbs +++ /dev/null @@ -1,10 +0,0 @@ -module Datadog - module Core - module Crashtracking - module AgentBaseUrl - IPV6_REGEXP: Regexp - def self.resolve: (Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings) -> ::String? - end - end - end -end diff --git a/spec/datadog/core/crashtracking/agent_base_url_spec.rb b/spec/datadog/core/crashtracking/agent_base_url_spec.rb deleted file mode 100644 index 4a8145208cf..00000000000 --- a/spec/datadog/core/crashtracking/agent_base_url_spec.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require 'datadog/core/crashtracking/agent_base_url' - -RSpec.describe Datadog::Core::Crashtracking::AgentBaseUrl do - describe '.resolve' do - context 'when using HTTP adapter' do - context 'when SSL is enabled' do - let(:agent_settings) do - Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings.new( - adapter: Datadog::Core::Configuration::Ext::Agent::HTTP::ADAPTER, - ssl: true, - hostname: 'example.com', - port: 8080 - ) - end - - it 'returns the correct base URL' do - expect(described_class.resolve(agent_settings)).to eq('https://example.com:8080/') - end - end - - context 'when SSL is disabled' do - let(:agent_settings) do - Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings.new( - adapter: Datadog::Core::Configuration::Ext::Agent::HTTP::ADAPTER, - ssl: false, - hostname: 'example.com', - port: 8080 - ) - end - - it 'returns the correct base URL' do - expect(described_class.resolve(agent_settings)).to eq('http://example.com:8080/') - end - end - - context 'when hostname is an IPv4 address' do - let(:agent_settings) do - Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings.new( - adapter: Datadog::Core::Configuration::Ext::Agent::HTTP::ADAPTER, - ssl: false, - hostname: '1.2.3.4', - port: 8080 - ) - end - - it 'returns the correct base URL' do - expect(described_class.resolve(agent_settings)).to eq('http://1.2.3.4:8080/') - end - end - - context 'when hostname is an IPv6 address' do - let(:agent_settings) do - Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings.new( - adapter: Datadog::Core::Configuration::Ext::Agent::HTTP::ADAPTER, - ssl: false, - hostname: '1234:1234::1', - port: 8080 - ) - end - - it 'returns the correct base URL' do - expect(described_class.resolve(agent_settings)).to eq('http://[1234:1234::1]:8080/') - end - end - end - - context 'when using UnixSocket adapter' do - let(:agent_settings) do - Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings.new( - adapter: Datadog::Core::Configuration::Ext::Agent::UnixSocket::ADAPTER, - uds_path: '/var/run/datadog.sock' - ) - end - - it 'returns the correct base URL' do - expect(described_class.resolve(agent_settings)).to eq('unix:///var/run/datadog.sock') - end - end - end -end diff --git a/spec/datadog/core/crashtracking/component_spec.rb b/spec/datadog/core/crashtracking/component_spec.rb index 034bd5f441e..fcbef942d43 100644 --- a/spec/datadog/core/crashtracking/component_spec.rb +++ b/spec/datadog/core/crashtracking/component_spec.rb @@ -9,7 +9,9 @@ describe '.build' do let(:settings) { Datadog::Core::Configuration::Settings.new } - let(:agent_settings) { double('agent_settings') } + let(:agent_settings) do + instance_double(Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings) + end let(:tags) { { 'tag1' => 'value1' } } let(:agent_base_url) { 'agent_base_url' } let(:ld_library_path) { 'ld_library_path' } @@ -19,8 +21,7 @@ it 'creates a new instance of Component and starts it' do expect(Datadog::Core::Crashtracking::TagBuilder).to receive(:call).with(settings) .and_return(tags) - expect(Datadog::Core::Crashtracking::AgentBaseUrl).to receive(:resolve).with(agent_settings) - .and_return(agent_base_url) + expect(agent_settings).to receive(:url).and_return(agent_base_url) expect(::Libdatadog).to receive(:ld_library_path) .and_return(ld_library_path) expect(::Libdatadog).to receive(:path_to_crashtracking_receiver_binary) @@ -42,32 +43,13 @@ end end - context 'when missing `agent_base_url`' do - let(:agent_base_url) { nil } - - it 'returns nil' do - expect(Datadog::Core::Crashtracking::TagBuilder).to receive(:call).with(settings) - .and_return(tags) - expect(Datadog::Core::Crashtracking::AgentBaseUrl).to receive(:resolve).with(agent_settings) - .and_return(agent_base_url) - expect(::Libdatadog).to receive(:ld_library_path) - .and_return(ld_library_path) - expect(::Libdatadog).to receive(:path_to_crashtracking_receiver_binary) - .and_return(path_to_crashtracking_receiver_binary) - expect(logger).to receive(:warn).with(/cannot enable crash tracking/) - - expect(described_class.build(settings, agent_settings, logger: logger)).to be_nil - end - end - context 'when missing `ld_library_path`' do let(:ld_library_path) { nil } it 'returns nil' do expect(Datadog::Core::Crashtracking::TagBuilder).to receive(:call).with(settings) .and_return(tags) - expect(Datadog::Core::Crashtracking::AgentBaseUrl).to receive(:resolve).with(agent_settings) - .and_return(agent_base_url) + expect(agent_settings).to receive(:url).and_return(agent_base_url) expect(::Libdatadog).to receive(:ld_library_path) .and_return(ld_library_path) expect(::Libdatadog).to receive(:path_to_crashtracking_receiver_binary) @@ -84,8 +66,7 @@ it 'returns nil' do expect(Datadog::Core::Crashtracking::TagBuilder).to receive(:call).with(settings) .and_return(tags) - expect(Datadog::Core::Crashtracking::AgentBaseUrl).to receive(:resolve).with(agent_settings) - .and_return(agent_base_url) + expect(agent_settings).to receive(:url).and_return(agent_base_url) expect(::Libdatadog).to receive(:ld_library_path) .and_return(ld_library_path) expect(::Libdatadog).to receive(:path_to_crashtracking_receiver_binary) @@ -102,8 +83,7 @@ it 'returns an instance of Component that failed to start' do expect(Datadog::Core::Crashtracking::TagBuilder).to receive(:call).with(settings) .and_return(tags) - expect(Datadog::Core::Crashtracking::AgentBaseUrl).to receive(:resolve).with(agent_settings) - .and_return(agent_base_url) + expect(agent_settings).to receive(:url).and_return(agent_base_url) expect(::Libdatadog).to receive(:ld_library_path) .and_return(ld_library_path) expect(::Libdatadog).to receive(:path_to_crashtracking_receiver_binary) From 2716176bc938326e131091deec89ff26ba702df8 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 2 Jan 2025 17:32:49 +0000 Subject: [PATCH 23/43] [PROF-11078] Fix profiling exception when agent url is an ipv6 address **What does this PR do?** This PR builds atop #4237 and fixes a similar-ish issue in the profiler caused by the same mishandling of ipv6 addresses. In particular, when provided with an ipv6 address in the agent url, the profiler would fail with an exception: ``` $ env DD_AGENT_HOST=2001:db8:1::2 DD_PROFILING_ENABLED=true \ bundle exec ddprofrb exec ruby -e "sleep 2" dd-trace-rb/lib/datadog/profiling/http_transport.rb:27:in `initialize': Failed to initialize transport: invalid authority (ArgumentError) ``` **Motivation:** Luckily we didn't have any customers using this, as it fails immediately and loudly, but it's still a bug on a configuration that should be supported. **Additional Notes:** Since we had similar buggy logic copy-pasted in crashtracking and profiling (crashtracking had been fixed in #4237) I chose to extract out the relevant logic into the `AgentSettings` class, so that both can reuse it. **How to test the change?** I've added unit test coverage for this issue to profiling, and the snippet above can be used to end-to-end test it's working fine. Here's how it looks on my machine now: ``` E, [2025-01-02T17:32:32.398756 #359317] ERROR -- datadog: [datadog] (dd-trace-rb/lib/datadog/profiling/http_transport.rb:68:in `export') Failed to report profiling data (agent: http://[2001:db8:1::2]:8126/): failed ddog_prof_Exporter_send: error trying to connect: tcp connect error: Network is unreachable (os error 101): tcp connect error: Network is unreachable (os error 101): Network is unreachable (os error 101) ``` E.g. we correctly try to connect to the dummy address, and fail :) (Note: The error message is a bit ugly AND repeats itself a bit. That's being tracked separately in https://github.com/DataDog/libdatadog/issues/283 ) --- lib/datadog/profiling/http_transport.rb | 27 +------------------ sig/datadog/profiling/http_transport.rbs | 4 --- spec/datadog/profiling/http_transport_spec.rb | 13 +++++++++ 3 files changed, 14 insertions(+), 30 deletions(-) diff --git a/lib/datadog/profiling/http_transport.rb b/lib/datadog/profiling/http_transport.rb index 2c89c6548b7..9de76899494 100644 --- a/lib/datadog/profiling/http_transport.rb +++ b/lib/datadog/profiling/http_transport.rb @@ -13,13 +13,11 @@ class HttpTransport def initialize(agent_settings:, site:, api_key:, upload_timeout_seconds:) @upload_timeout_milliseconds = (upload_timeout_seconds * 1_000).to_i - validate_agent_settings(agent_settings) - @exporter_configuration = if agentless?(site, api_key) [:agentless, site, api_key].freeze else - [:agent, base_url_from(agent_settings)].freeze + [:agent, agent_settings.url].freeze end status, result = validate_exporter(exporter_configuration) @@ -75,29 +73,6 @@ def export(flush) private - def base_url_from(agent_settings) - case agent_settings.adapter - when Datadog::Core::Configuration::Ext::Agent::HTTP::ADAPTER - "#{agent_settings.ssl ? "https" : "http"}://#{agent_settings.hostname}:#{agent_settings.port}/" - when Datadog::Core::Configuration::Ext::Agent::UnixSocket::ADAPTER - "unix://#{agent_settings.uds_path}" - else - raise ArgumentError, "Unexpected adapter: #{agent_settings.adapter}" - end - end - - def validate_agent_settings(agent_settings) - supported_adapters = [ - Datadog::Core::Configuration::Ext::Agent::UnixSocket::ADAPTER, - Datadog::Core::Configuration::Ext::Agent::HTTP::ADAPTER - ] - unless supported_adapters.include?(agent_settings.adapter) - raise ArgumentError, - "Unsupported transport configuration for profiling: Adapter #{agent_settings.adapter} " \ - " is not supported" - end - end - def agentless?(site, api_key) site && api_key && Core::Environment::VariableHelpers.env_to_bool(Profiling::Ext::ENV_AGENTLESS, false) end diff --git a/sig/datadog/profiling/http_transport.rbs b/sig/datadog/profiling/http_transport.rbs index 8c58ea8180e..af663a225b7 100644 --- a/sig/datadog/profiling/http_transport.rbs +++ b/sig/datadog/profiling/http_transport.rbs @@ -19,10 +19,6 @@ module Datadog private - def base_url_from: (Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings agent_settings) -> ::String - - def validate_agent_settings: (Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings agent_settings) -> void - def agentless?: (::String? site, ::String? api_key) -> bool def validate_exporter: (exporter_configuration_array exporter_configuration) -> [:ok | :error, ::String?] diff --git a/spec/datadog/profiling/http_transport_spec.rb b/spec/datadog/profiling/http_transport_spec.rb index 44423984fab..0cd98ba09e3 100644 --- a/spec/datadog/profiling/http_transport_spec.rb +++ b/spec/datadog/profiling/http_transport_spec.rb @@ -127,6 +127,19 @@ http_transport end end + + context "when hostname is an ipv6 address" do + let(:hostname) { "1234:1234::1" } + + it "provides the correct ipv6 address-safe url to the exporter" do + expect(described_class) + .to receive(:_native_validate_exporter) + .with([:agent, "http://[1234:1234::1]:12345/"]) + .and_return([:ok, nil]) + + http_transport + end + end end context "when additionally site and api_key are provided" do From e8d73819de34e56b1ff342e724af3c6704084691 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 2 Jan 2025 17:56:59 +0000 Subject: [PATCH 24/43] Implement `==` for new `AgentSettings` class Forgot this one, some of our tests relied on it! --- .../core/configuration/agent_settings_resolver.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/datadog/core/configuration/agent_settings_resolver.rb b/lib/datadog/core/configuration/agent_settings_resolver.rb index 424f47c331e..5ced057274a 100644 --- a/lib/datadog/core/configuration/agent_settings_resolver.rb +++ b/lib/datadog/core/configuration/agent_settings_resolver.rb @@ -45,6 +45,16 @@ def url raise ArgumentError, "Unexpected adapter: #{adapter}" end end + + def ==(other) + self.class == other.class && + adapter == other.adapter && + ssl == other.ssl && + hostname == other.hostname && + port == other.port && + uds_path == other.uds_path && + timeout_seconds == other.timeout_seconds + end end # IPv6 regular expression from From 3750e4ee93709179d26376387697b075c3ae2c0e Mon Sep 17 00:00:00 2001 From: Andrey Marchenko Date: Thu, 2 Jan 2025 12:07:29 +0100 Subject: [PATCH 25/43] use Ruby 3.4.1 for test-memcheck GHA --- .github/workflows/test-memory-leaks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-memory-leaks.yaml b/.github/workflows/test-memory-leaks.yaml index e1842cb38b6..44d7cb094bf 100644 --- a/.github/workflows/test-memory-leaks.yaml +++ b/.github/workflows/test-memory-leaks.yaml @@ -7,10 +7,10 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.4.0-preview2 # TODO: Use stable version once 3.4 is out + ruby-version: 3.4.1 bundler-cache: true # runs 'bundle install' and caches installed gems automatically bundler: latest - cache-version: v1 # bump this to invalidate cache + cache-version: v2 # bump this to invalidate cache - run: sudo apt-get update && (sudo apt-get install -y valgrind || sleep 5 && sudo apt-get install -y valgrind) && valgrind --version - run: gem update --system 3.5.23 # TODO: This is a workaround for a buggy rubygems in 3.4.0-preview2; remove once stable version 3.4 is out - run: bundle exec rake compile spec:profiling:memcheck From 9112473e732a9cc6205031b6bbe4591dc3e88195 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 2 Jan 2025 11:24:52 +0000 Subject: [PATCH 26/43] Update exceptions file with another variant of thread creation memory leak Since our exceptions match on the stack, they are affected by internal naming changes, and it looks like a new `ruby_xcalloc_body` function is now showing up in the stack. --- suppressions/ruby-3.4.supp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/suppressions/ruby-3.4.supp b/suppressions/ruby-3.4.supp index 646151fa9fb..71af0c40baa 100644 --- a/suppressions/ruby-3.4.supp +++ b/suppressions/ruby-3.4.supp @@ -77,3 +77,19 @@ obj:/usr/bin/tr ... } + +# When a Ruby process forks, it looks like Ruby doesn't clean up the memory of old threads? +{ + ruby-native-thread-memory-4 + Memcheck:Leak + fun:calloc + fun:calloc1 + fun:rb_gc_impl_calloc + fun:ruby_xcalloc_body + fun:ruby_xcalloc + fun:native_thread_alloc + fun:native_thread_create_dedicated + fun:native_thread_create + fun:thread_create_core + ... +} From 9daf9a0a37a82657d2569a6f2697dfc5b64b528f Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 2 Jan 2025 11:33:06 +0000 Subject: [PATCH 27/43] Introduce Ruby 3.5 gemfile variant for testing with dev builds This is waaay incomplete in terms of adding support for Ruby 3.5 but should get us going for ASAN testing for now. --- ruby-3.5.gemfile | 75 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 ruby-3.5.gemfile diff --git a/ruby-3.5.gemfile b/ruby-3.5.gemfile new file mode 100644 index 00000000000..73960422f46 --- /dev/null +++ b/ruby-3.5.gemfile @@ -0,0 +1,75 @@ +source 'https://rubygems.org' + +gemspec + +gem 'base64' +gem 'benchmark-ips', '~> 2.8' +gem 'benchmark-memory', '< 0.2' # V0.2 only works with 2.5+ +gem 'bigdecimal' +gem 'climate_control', '~> 0.2.0' +gem 'concurrent-ruby' + +# Optional extensions +# TODO: Move this to Appraisals? +# dogstatsd v5, but lower than 5.2, has possible memory leak with datadog. +# @see https://github.com/DataDog/dogstatsd-ruby/issues/182 +gem 'dogstatsd-ruby', '>= 3.3.0', '!= 5.0.0', '!= 5.0.1', '!= 5.1.0' + +gem 'extlz4', '~> 0.3', '>= 0.3.3' + +# Profiler testing dependencies +# NOTE: We're excluding versions 3.7.0 and 3.7.1 for the reasons documented in #1424. +# Since most of our customers won't have BUNDLE_FORCE_RUBY_PLATFORM=true, it's not something we want to add +# to our CI, so we just shortcut and exclude specific versions that were affecting our CI. +gem 'google-protobuf', ['~> 3.0', '!= 3.7.0', '!= 3.7.1'] + +gem 'json-schema', '< 3' # V3 only works with 2.5+ +gem 'memory_profiler', '~> 0.9' +gem 'mutex_m' +gem 'os', '~> 1.1' +gem 'pimpmychangelog', '>= 0.1.2' +gem 'pry' +gem 'pry-stack_explorer' +gem 'rake', '>= 10.5' +gem 'rake-compiler', '~> 1.1', '>= 1.1.1' # To compile native extensions +gem 'rspec', '~> 3.13' +gem 'rspec-collection_matchers', '~> 1.1' +gem 'rspec-wait', '~> 0' +gem 'rspec_junit_formatter', '>= 0.5.1' + +# 1.50 is the last version to support Ruby 2.6 +gem 'rubocop', '~> 1.50.0', require: false +gem 'rubocop-packaging', '~> 0.5.2', require: false +gem 'rubocop-performance', '~> 1.9', require: false +# 2.20 is the last version to support Ruby 2.6 +gem 'rubocop-rspec', ['~> 2.20', '< 2.21'], require: false + +# Merging branch coverage results does not work for old, unsupported rubies and JRuby +# We have a fix up for review, https://github.com/simplecov-ruby/simplecov/pull/972, +# but given it only affects unsupported version of Ruby, it might not get merged. +gem 'simplecov', git: 'https://github.com/DataDog/simplecov', ref: '3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db' +gem 'simplecov-cobertura', '~> 2.1.0' # Used by codecov + +# Ruby 3.4 should be supported by strscan v3.1.1. However, the latest release of strscan is v3.1.0. +# Pin strscan to the latest commit sha. +# +# TODO: Remove once v3.1.1 is released. +gem 'strscan', + git: 'https://github.com/ruby/strscan', + ref: '041b15df4ccc067deabd85fd489b2c15961d0e2f' + +gem 'warning', '~> 1' # NOTE: Used in spec_helper.rb +gem 'webmock', '>= 3.10.0' +gem 'webrick', '>= 1.8.2' + +group :check do + gem 'rbs', '~> 3.7', require: false + gem 'steep', '~> 1', '>= 1.9.1', require: false + gem 'ruby_memcheck', '>= 3' + gem 'standard', require: false +end + +group :dev do + gem 'ruby-lsp', require: false + gem 'appraisal', '~> 2.4.0', require: false +end From 828f75e3c4a14add82852724575327930ca5ada4 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 2 Jan 2025 12:13:07 +0000 Subject: [PATCH 28/43] Update list of files used to compute cache checksum In practice this shouldn't make a difference, since the final lockfiles are supposed to be a superset of the root-level gemfile BUT the `Appraisals` file no longer exists anyway and "just in case" let's have it anyway as it seems more correct. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ed9caf20e38..6aabbeeb7f8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -65,7 +65,7 @@ save_bundle_checksum: &save_bundle_checksum command: | if [ "$CI_BUNDLE_CACHE_HIT" != 1 ]; then # Recompute gemfiles/*.lock checksum, as those files might have changed - cat Gemfile Gemfile.lock Appraisals gemfiles/*.gemfile gemfiles/*.gemfile.lock | md5sum > .circleci/bundle_checksum + cat Gemfile Gemfile.lock ruby-*.gemfile gemfiles/*.gemfile gemfiles/*.gemfile.lock | md5sum > .circleci/bundle_checksum fi cp .circleci/bundle_checksum /usr/local/bundle/bundle_checksum step_bundle_install: &step_bundle_install @@ -96,7 +96,7 @@ step_compute_bundle_checksum: &step_compute_bundle_checksum # updating the gemset lock files produces extremely large commits. command: | bundle lock # Create Gemfile.lock - cat Gemfile Gemfile.lock Appraisals gemfiles/*.gemfile gemfiles/*.gemfile.lock | md5sum > .circleci/bundle_checksum + cat Gemfile Gemfile.lock ruby-*.gemfile gemfiles/*.gemfile gemfiles/*.gemfile.lock | md5sum > .circleci/bundle_checksum step_get_test_agent_trace_check_results: &step_get_test_agent_trace_check_results run: name: Get APM Test Agent Trace Check Results From ae5d2a3a35af7e8322c53c433b8484a9b0569698 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 2 Jan 2025 12:58:17 +0000 Subject: [PATCH 29/43] Bump Ruby 3.4 integration image to stable version --- integration/images/ruby/3.4/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/images/ruby/3.4/Dockerfile b/integration/images/ruby/3.4/Dockerfile index 3cc6648d99f..96500f1c668 100644 --- a/integration/images/ruby/3.4/Dockerfile +++ b/integration/images/ruby/3.4/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4.0-preview2 +FROM ruby:3.4 ENV DEBIAN_FRONTEND=noninteractive From 2e10ee40ef2bad1489156e67d9520d2455344c8c Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 2 Jan 2025 16:19:26 +0000 Subject: [PATCH 30/43] Remove workaround for strscan issue This is not expected to be an issue in 3.5 (and is probably fixed for 3.4 as well, but I'll leave that for a separate PR to not affect the appraisals). --- ruby-3.5.gemfile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ruby-3.5.gemfile b/ruby-3.5.gemfile index 73960422f46..ce83d653fc6 100644 --- a/ruby-3.5.gemfile +++ b/ruby-3.5.gemfile @@ -50,14 +50,6 @@ gem 'rubocop-rspec', ['~> 2.20', '< 2.21'], require: false gem 'simplecov', git: 'https://github.com/DataDog/simplecov', ref: '3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db' gem 'simplecov-cobertura', '~> 2.1.0' # Used by codecov -# Ruby 3.4 should be supported by strscan v3.1.1. However, the latest release of strscan is v3.1.0. -# Pin strscan to the latest commit sha. -# -# TODO: Remove once v3.1.1 is released. -gem 'strscan', - git: 'https://github.com/ruby/strscan', - ref: '041b15df4ccc067deabd85fd489b2c15961d0e2f' - gem 'warning', '~> 1' # NOTE: Used in spec_helper.rb gem 'webmock', '>= 3.10.0' gem 'webrick', '>= 1.8.2' From 1f4afdc26deceb85e722a50ef233739ce3ca6fc9 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 19 Dec 2024 10:54:12 +0000 Subject: [PATCH 31/43] Add unsafe api calls checker to track down issues such as #4195 This checker is used to detect accidental thread scheduling switching points happening during profiling sampling. See the bigger comment in unsafe_api_calls_check.h . I was able to check that this checker correctly triggers for the bug in #4195, and also the bug I'm going to fix next, which is the use of `rb_hash_lookup` in the otel context reading code. --- .../collectors_thread_context.c | 78 +++++++++++++++++-- .../profiling.c | 2 + .../unsafe_api_calls_check.c | 47 +++++++++++ .../unsafe_api_calls_check.h | 25 ++++++ lib/datadog/core/configuration.rb | 2 +- .../collectors/thread_context_spec.rb | 23 +++--- 6 files changed, 159 insertions(+), 18 deletions(-) create mode 100644 ext/datadog_profiling_native_extension/unsafe_api_calls_check.c create mode 100644 ext/datadog_profiling_native_extension/unsafe_api_calls_check.h diff --git a/ext/datadog_profiling_native_extension/collectors_thread_context.c b/ext/datadog_profiling_native_extension/collectors_thread_context.c index 0b56268bed5..b9606797106 100644 --- a/ext/datadog_profiling_native_extension/collectors_thread_context.c +++ b/ext/datadog_profiling_native_extension/collectors_thread_context.c @@ -9,6 +9,7 @@ #include "private_vm_api_access.h" #include "stack_recorder.h" #include "time_helpers.h" +#include "unsafe_api_calls_check.h" // Used to trigger sampling of threads, based on external "events", such as: // * periodic timer for cpu-time and wall-time @@ -203,10 +204,10 @@ static int hash_map_per_thread_context_mark(st_data_t key_thread, st_data_t _val static int hash_map_per_thread_context_free_values(st_data_t _thread, st_data_t value_per_thread_context, st_data_t _argument); static VALUE _native_new(VALUE klass); static VALUE _native_initialize(int argc, VALUE *argv, DDTRACE_UNUSED VALUE _self); -static VALUE _native_sample(VALUE self, VALUE collector_instance, VALUE profiler_overhead_stack_thread); +static VALUE _native_sample(VALUE self, VALUE collector_instance, VALUE profiler_overhead_stack_thread, VALUE allow_exception); static VALUE _native_on_gc_start(VALUE self, VALUE collector_instance); static VALUE _native_on_gc_finish(VALUE self, VALUE collector_instance); -static VALUE _native_sample_after_gc(DDTRACE_UNUSED VALUE self, VALUE collector_instance, VALUE reset_monotonic_to_system_state); +static VALUE _native_sample_after_gc(DDTRACE_UNUSED VALUE self, VALUE collector_instance, VALUE reset_monotonic_to_system_state, VALUE allow_exception); static void update_metrics_and_sample( struct thread_context_collector_state *state, VALUE thread_being_sampled, @@ -310,11 +311,11 @@ void collectors_thread_context_init(VALUE profiling_module) { rb_define_singleton_method(collectors_thread_context_class, "_native_initialize", _native_initialize, -1); rb_define_singleton_method(collectors_thread_context_class, "_native_inspect", _native_inspect, 1); rb_define_singleton_method(collectors_thread_context_class, "_native_reset_after_fork", _native_reset_after_fork, 1); - rb_define_singleton_method(testing_module, "_native_sample", _native_sample, 2); + rb_define_singleton_method(testing_module, "_native_sample", _native_sample, 3); rb_define_singleton_method(testing_module, "_native_sample_allocation", _native_sample_allocation, 3); rb_define_singleton_method(testing_module, "_native_on_gc_start", _native_on_gc_start, 1); rb_define_singleton_method(testing_module, "_native_on_gc_finish", _native_on_gc_finish, 1); - rb_define_singleton_method(testing_module, "_native_sample_after_gc", _native_sample_after_gc, 2); + rb_define_singleton_method(testing_module, "_native_sample_after_gc", _native_sample_after_gc, 3); rb_define_singleton_method(testing_module, "_native_thread_list", _native_thread_list, 0); rb_define_singleton_method(testing_module, "_native_per_thread_context", _native_per_thread_context, 1); rb_define_singleton_method(testing_module, "_native_stats", _native_stats, 1); @@ -504,31 +505,49 @@ static VALUE _native_initialize(int argc, VALUE *argv, DDTRACE_UNUSED VALUE _sel // This method exists only to enable testing Datadog::Profiling::Collectors::ThreadContext behavior using RSpec. // It SHOULD NOT be used for other purposes. -static VALUE _native_sample(DDTRACE_UNUSED VALUE _self, VALUE collector_instance, VALUE profiler_overhead_stack_thread) { +static VALUE _native_sample(DDTRACE_UNUSED VALUE _self, VALUE collector_instance, VALUE profiler_overhead_stack_thread, VALUE allow_exception) { + ENFORCE_BOOLEAN(allow_exception); + if (!is_thread_alive(profiler_overhead_stack_thread)) rb_raise(rb_eArgError, "Unexpected: profiler_overhead_stack_thread is not alive"); + if (allow_exception == Qfalse) debug_enter_unsafe_context(); + thread_context_collector_sample(collector_instance, monotonic_wall_time_now_ns(RAISE_ON_FAILURE), profiler_overhead_stack_thread); + + if (allow_exception == Qfalse) debug_leave_unsafe_context(); + return Qtrue; } // This method exists only to enable testing Datadog::Profiling::Collectors::ThreadContext behavior using RSpec. // It SHOULD NOT be used for other purposes. static VALUE _native_on_gc_start(DDTRACE_UNUSED VALUE self, VALUE collector_instance) { + debug_enter_unsafe_context(); + thread_context_collector_on_gc_start(collector_instance); + + debug_leave_unsafe_context(); + return Qtrue; } // This method exists only to enable testing Datadog::Profiling::Collectors::ThreadContext behavior using RSpec. // It SHOULD NOT be used for other purposes. static VALUE _native_on_gc_finish(DDTRACE_UNUSED VALUE self, VALUE collector_instance) { + debug_enter_unsafe_context(); + (void) !thread_context_collector_on_gc_finish(collector_instance); + + debug_leave_unsafe_context(); + return Qtrue; } // This method exists only to enable testing Datadog::Profiling::Collectors::ThreadContext behavior using RSpec. // It SHOULD NOT be used for other purposes. -static VALUE _native_sample_after_gc(DDTRACE_UNUSED VALUE self, VALUE collector_instance, VALUE reset_monotonic_to_system_state) { +static VALUE _native_sample_after_gc(DDTRACE_UNUSED VALUE self, VALUE collector_instance, VALUE reset_monotonic_to_system_state, VALUE allow_exception) { ENFORCE_BOOLEAN(reset_monotonic_to_system_state); + ENFORCE_BOOLEAN(allow_exception); struct thread_context_collector_state *state; TypedData_Get_Struct(collector_instance, struct thread_context_collector_state, &thread_context_collector_typed_data, state); @@ -537,7 +556,12 @@ static VALUE _native_sample_after_gc(DDTRACE_UNUSED VALUE self, VALUE collector_ state->time_converter_state = (monotonic_to_system_epoch_state) MONOTONIC_TO_SYSTEM_EPOCH_INITIALIZER; } + if (allow_exception == Qfalse) debug_enter_unsafe_context(); + thread_context_collector_sample_after_gc(collector_instance); + + if (allow_exception == Qfalse) debug_leave_unsafe_context(); + return Qtrue; } @@ -982,7 +1006,13 @@ static void trigger_sample_for_thread( // It SHOULD NOT be used for other purposes. static VALUE _native_thread_list(DDTRACE_UNUSED VALUE _self) { VALUE result = rb_ary_new(); + + debug_enter_unsafe_context(); + ddtrace_thread_list(result); + + debug_leave_unsafe_context(); + return result; } @@ -1501,7 +1531,12 @@ void thread_context_collector_sample_allocation(VALUE self_instance, unsigned in // This method exists only to enable testing Datadog::Profiling::Collectors::ThreadContext behavior using RSpec. // It SHOULD NOT be used for other purposes. static VALUE _native_sample_allocation(DDTRACE_UNUSED VALUE self, VALUE collector_instance, VALUE sample_weight, VALUE new_object) { + debug_enter_unsafe_context(); + thread_context_collector_sample_allocation(collector_instance, NUM2UINT(sample_weight), new_object); + + debug_leave_unsafe_context(); + return Qtrue; } @@ -1640,7 +1675,12 @@ void thread_context_collector_sample_skipped_allocation_samples(VALUE self_insta } static VALUE _native_sample_skipped_allocation_samples(DDTRACE_UNUSED VALUE self, VALUE collector_instance, VALUE skipped_samples) { + debug_enter_unsafe_context(); + thread_context_collector_sample_skipped_allocation_samples(collector_instance, NUM2UINT(skipped_samples)); + + debug_leave_unsafe_context(); + return Qtrue; } @@ -1979,31 +2019,53 @@ static uint64_t otel_span_id_to_uint(VALUE otel_span_id) { static VALUE _native_on_gvl_waiting(DDTRACE_UNUSED VALUE self, VALUE thread) { ENFORCE_THREAD(thread); + debug_enter_unsafe_context(); + thread_context_collector_on_gvl_waiting(thread_from_thread_object(thread)); + + debug_leave_unsafe_context(); + return Qnil; } static VALUE _native_gvl_waiting_at_for(DDTRACE_UNUSED VALUE self, VALUE thread) { ENFORCE_THREAD(thread); + debug_enter_unsafe_context(); + intptr_t gvl_waiting_at = gvl_profiling_state_thread_object_get(thread); + + debug_leave_unsafe_context(); + return LONG2NUM(gvl_waiting_at); } static VALUE _native_on_gvl_running(DDTRACE_UNUSED VALUE self, VALUE thread) { ENFORCE_THREAD(thread); - return thread_context_collector_on_gvl_running(thread_from_thread_object(thread)) == ON_GVL_RUNNING_SAMPLE ? Qtrue : Qfalse; + debug_enter_unsafe_context(); + + VALUE result = thread_context_collector_on_gvl_running(thread_from_thread_object(thread)) == ON_GVL_RUNNING_SAMPLE ? Qtrue : Qfalse; + + debug_leave_unsafe_context(); + + return result; } static VALUE _native_sample_after_gvl_running(DDTRACE_UNUSED VALUE self, VALUE collector_instance, VALUE thread) { ENFORCE_THREAD(thread); - return thread_context_collector_sample_after_gvl_running( + debug_enter_unsafe_context(); + + VALUE result = thread_context_collector_sample_after_gvl_running( collector_instance, thread, monotonic_wall_time_now_ns(RAISE_ON_FAILURE) ); + + debug_leave_unsafe_context(); + + return result; } static VALUE _native_apply_delta_to_cpu_time_at_previous_sample_ns(DDTRACE_UNUSED VALUE self, VALUE collector_instance, VALUE thread, VALUE delta_ns) { diff --git a/ext/datadog_profiling_native_extension/profiling.c b/ext/datadog_profiling_native_extension/profiling.c index 315ca0d2954..a7bfe0d466b 100644 --- a/ext/datadog_profiling_native_extension/profiling.c +++ b/ext/datadog_profiling_native_extension/profiling.c @@ -11,6 +11,7 @@ #include "ruby_helpers.h" #include "setup_signal_handler.h" #include "time_helpers.h" +#include "unsafe_api_calls_check.h" // Each class/module here is implemented in their separate file void collectors_cpu_and_wall_time_worker_init(VALUE profiling_module); @@ -56,6 +57,7 @@ void DDTRACE_EXPORT Init_datadog_profiling_native_extension(void) { collectors_thread_context_init(profiling_module); http_transport_init(profiling_module); stack_recorder_init(profiling_module); + unsafe_api_calls_check_init(); // Hosts methods used for testing the native code using RSpec VALUE testing_module = rb_define_module_under(native_extension_module, "Testing"); diff --git a/ext/datadog_profiling_native_extension/unsafe_api_calls_check.c b/ext/datadog_profiling_native_extension/unsafe_api_calls_check.c new file mode 100644 index 00000000000..c3c23b7f1c7 --- /dev/null +++ b/ext/datadog_profiling_native_extension/unsafe_api_calls_check.c @@ -0,0 +1,47 @@ +#include +#include +#include + +#include "datadog_ruby_common.h" +#include "unsafe_api_calls_check.h" +#include "extconf.h" + +static bool inside_unsafe_context = false; + +#ifndef NO_POSTPONED_TRIGGER + static rb_postponed_job_handle_t check_for_unsafe_api_calls_handle; +#endif + +static void check_for_unsafe_api_calls(DDTRACE_UNUSED void *_unused); + +void unsafe_api_calls_check_init(void) { + #ifndef NO_POSTPONED_TRIGGER + int unused_flags = 0; + + check_for_unsafe_api_calls_handle = rb_postponed_job_preregister(unused_flags, check_for_unsafe_api_calls, NULL); + + if (check_for_unsafe_api_calls_handle == POSTPONED_JOB_HANDLE_INVALID) { + rb_raise(rb_eRuntimeError, "Failed to register check_for_unsafe_api_calls_handle postponed job (got POSTPONED_JOB_HANDLE_INVALID)"); + } + #endif +} + +void debug_enter_unsafe_context(void) { + inside_unsafe_context = true; + + #ifndef NO_POSTPONED_TRIGGER + rb_postponed_job_trigger(check_for_unsafe_api_calls_handle); + #else + rb_postponed_job_register(0, check_for_unsafe_api_calls, NULL); + #endif +} + +void debug_leave_unsafe_context(void) { + inside_unsafe_context = false; +} + +static void check_for_unsafe_api_calls(DDTRACE_UNUSED void *_unused) { + if (inside_unsafe_context) rb_bug( + "Datadog Ruby profiler detected callback nested inside sample. Please report this at https://github.com/datadog/dd-trace-rb/blob/master/CONTRIBUTING.md#found-a-bug" + ); +} diff --git a/ext/datadog_profiling_native_extension/unsafe_api_calls_check.h b/ext/datadog_profiling_native_extension/unsafe_api_calls_check.h new file mode 100644 index 00000000000..092a59f30b3 --- /dev/null +++ b/ext/datadog_profiling_native_extension/unsafe_api_calls_check.h @@ -0,0 +1,25 @@ +#pragma once + +// This checker is used to detect accidental thread scheduling switching points happening during profiling sampling. +// +// Specifically, when the profiler is sampling, we're never supposed to call into Ruby code (e.g. methods +// implemented using Ruby code) or allocate Ruby objects. +// That's because those events introduce thread switch points, and really we don't the VM switching between threads +// in the middle of the profiler sampling. +// This includes raising exceptions, unless we're trying to stop the profiler, and even then we must be careful. +// +// The above is especially true in situations such as GC profiling or allocation/heap profiling, as in those situations +// we can even crash the Ruby VM if we switch away at the wrong time. +// +// The below APIs can be used to detect these situations. They work by relying on the following observation: +// in most (all?) thread switch points, Ruby will check for interrupts and run the postponed jobs. +// +// Thus, if we set a flag while we're sampling (inside_unsafe_context), trigger the postponed job, and then only unset +// the flag after sampling, he correct thing to happen is that the postponed job should never see the flag. +// +// If, however, we have a bug and there's a thread switch point, our postponed job will see the flag and immediately +// stop the Ruby VM before further damage happens (and hopefully giving us a stack trace clearly pointing to the culprit). + +void unsafe_api_calls_check_init(void); +void debug_enter_unsafe_context(void); +void debug_leave_unsafe_context(void); diff --git a/lib/datadog/core/configuration.rb b/lib/datadog/core/configuration.rb index 826a3bb414a..4b2b21d6ee7 100644 --- a/lib/datadog/core/configuration.rb +++ b/lib/datadog/core/configuration.rb @@ -236,7 +236,7 @@ def safely_synchronize rescue ThreadError => e logger_without_components.error( 'Detected deadlock during datadog initialization. ' \ - 'Please report this at https://github.com/DataDog/dd-trace-rb/blob/master/CONTRIBUTING.md#found-a-bug' \ + 'Please report this at https://github.com/datadog/dd-trace-rb/blob/master/CONTRIBUTING.md#found-a-bug' \ "\n\tSource:\n\t#{Array(e.backtrace).join("\n\t")}" ) nil diff --git a/spec/datadog/profiling/collectors/thread_context_spec.rb b/spec/datadog/profiling/collectors/thread_context_spec.rb index e7b1bd28ba0..7145729bcec 100644 --- a/spec/datadog/profiling/collectors/thread_context_spec.rb +++ b/spec/datadog/profiling/collectors/thread_context_spec.rb @@ -66,8 +66,8 @@ end end - def sample(profiler_overhead_stack_thread: Thread.current) - described_class::Testing._native_sample(cpu_and_wall_time_collector, profiler_overhead_stack_thread) + def sample(profiler_overhead_stack_thread: Thread.current, allow_exception: false) + described_class::Testing._native_sample(cpu_and_wall_time_collector, profiler_overhead_stack_thread, allow_exception) end def on_gc_start @@ -78,8 +78,12 @@ def on_gc_finish described_class::Testing._native_on_gc_finish(cpu_and_wall_time_collector) end - def sample_after_gc(reset_monotonic_to_system_state: false) - described_class::Testing._native_sample_after_gc(cpu_and_wall_time_collector, reset_monotonic_to_system_state) + def sample_after_gc(reset_monotonic_to_system_state: false, allow_exception: false) + described_class::Testing._native_sample_after_gc( + cpu_and_wall_time_collector, + reset_monotonic_to_system_state, + allow_exception, + ) end def sample_allocation(weight:, new_object: Object.new) @@ -782,18 +786,18 @@ def otel_span_id_to_i(span_id) ) end - context 'raises an exception' do + context 'when an exception is raised' do before { setup_failure } after { expect(ran_log).to eq [:ran_code] } it 'does not leave the exception pending' do - sample + sample(allow_exception: true) expect($!).to be nil end it 'omits the "local root span id" and "span id" labels in the sample' do - sample + sample(allow_exception: true) expect(t1_sample.labels.keys).to_not include(:"local root span id", :"span id") end @@ -1433,7 +1437,7 @@ def sample_and_check(expected_state:) context "when called before on_gc_start/on_gc_finish" do it do - expect { sample_after_gc }.to raise_error(RuntimeError, /Unexpected call to sample_after_gc/) + expect { sample_after_gc(allow_exception: true) }.to raise_error(RuntimeError, /Unexpected call to sample_after_gc/) end end @@ -1451,7 +1455,8 @@ def sample_and_check(expected_state:) it do sample_after_gc - expect { sample_after_gc }.to raise_error(RuntimeError, /Unexpected call to sample_after_gc/) + expect { sample_after_gc(allow_exception: true) } + .to raise_error(RuntimeError, /Unexpected call to sample_after_gc/) end end From 33fc72fe9060a8e41da00676dc6facd453a12f46 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 19 Dec 2024 14:17:03 +0000 Subject: [PATCH 32/43] Fix going into Ruby code when looking up otel context `rb_hash_lookup` calls `#hash` on the key being looked up so it's safe to use unless during sampling. This can cause the same issue as we saw in #4195 leading to ``` [BUG] unexpected situation - recordd:1 current:0 -- C level backtrace information ------------------------------------------- ruby(rb_print_backtrace+0x11) [0x55ba03ccf90f] vm_dump.c:820 ruby(rb_vm_bugreport) vm_dump.c:1151 ruby(bug_report_end+0x0) [0x55ba03e91607] error.c:1042 ruby(rb_bug_without_die) error.c:1042 ruby(die+0x0) [0x55ba03ac0998] error.c:1050 ruby(rb_bug) error.c:1052 ruby(disallow_reentry+0x0) [0x55ba03ab6dcc] vm_sync.c:226 ruby(rb_ec_vm_lock_rec_check+0x1a) [0x55ba03cb17aa] eval_intern.h:144 ruby(rb_ec_tag_state) eval_intern.h:155 ruby(rb_vm_exec) vm.c:2484 ruby(vm_invoke_proc+0x201) [0x55ba03cb62b1] vm.c:1509 ruby(rb_vm_invoke_proc+0x33) [0x55ba03cb65d3] vm.c:1728 ruby(thread_do_start_proc+0x176) [0x55ba03c63516] thread.c:598 ruby(thread_do_start+0x12) [0x55ba03c648a2] thread.c:615 ruby(thread_start_func_2) thread.c:672 ruby(nt_start+0x107) [0x55ba03c65137] thread_pthread.c:2187 /lib/x86_64-linux-gnu/libpthread.so.0(start_thread+0xd9) [0x7ff360b66609] /lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7ff360a70353] ``` --- .../collectors_thread_context.c | 39 ++++++++- .../collectors/thread_context_spec.rb | 84 ++++++++++++++++++- 2 files changed, 120 insertions(+), 3 deletions(-) diff --git a/ext/datadog_profiling_native_extension/collectors_thread_context.c b/ext/datadog_profiling_native_extension/collectors_thread_context.c index b9606797106..b8e7aedfefb 100644 --- a/ext/datadog_profiling_native_extension/collectors_thread_context.c +++ b/ext/datadog_profiling_native_extension/collectors_thread_context.c @@ -291,6 +291,7 @@ static void otel_without_ddtrace_trace_identifiers_for( ); static struct otel_span otel_span_from(VALUE otel_context, VALUE otel_current_span_key); static uint64_t otel_span_id_to_uint(VALUE otel_span_id); +static VALUE safely_lookup_hash_without_going_into_ruby_code(VALUE hash, VALUE key); void collectors_thread_context_init(VALUE profiling_module) { VALUE collectors_module = rb_define_module_under(profiling_module, "Collectors"); @@ -1632,7 +1633,7 @@ static void ddtrace_otel_trace_identifiers_for( // trace and span representing it. Each ddtrace trace is then connected to the previous otel span, forming a linked // list. The local root span is going to be the trace/span we find at the end of this linked list. while (otel_values != Qnil) { - VALUE otel_span = rb_hash_lookup(otel_values, otel_current_span_key); + VALUE otel_span = safely_lookup_hash_without_going_into_ruby_code(otel_values, otel_current_span_key); if (otel_span == Qnil) break; VALUE next_trace = rb_ivar_get(otel_span, at_datadog_trace_id); if (next_trace == Qnil) break; @@ -1766,7 +1767,7 @@ static struct otel_span otel_span_from(VALUE otel_context, VALUE otel_current_sp if (context_entries == Qnil || !RB_TYPE_P(context_entries, T_HASH)) return failed; // If it exists, context_entries is expected to be a Hash[OpenTelemetry::Context::Key, OpenTelemetry::Trace::Span] - VALUE span = rb_hash_lookup(context_entries, otel_current_span_key); + VALUE span = safely_lookup_hash_without_going_into_ruby_code(context_entries, otel_current_span_key); if (span == Qnil) return failed; // If it exists, span_context is expected to be a OpenTelemetry::Trace::SpanContext (don't confuse it with OpenTelemetry::Context) @@ -2092,3 +2093,37 @@ static uint64_t otel_span_id_to_uint(VALUE otel_span_id) { DDTRACE_UNUSED long current_cpu_time_ns ) { return false; } #endif // NO_GVL_INSTRUMENTATION + +#define MAX_SAFE_LOOKUP_SIZE 16 + +typedef struct { VALUE lookup_key; VALUE result; } safe_lookup_hash_state; + +static int safe_lookup_hash_iterate(VALUE key, VALUE value, VALUE state_ptr) { + safe_lookup_hash_state *state = (safe_lookup_hash_state *) state_ptr; + + if (key == state->lookup_key) { + state->result = value; + return ST_STOP; + } + + return ST_CONTINUE; +} + +// This method exists because we need to look up a hash during sampling, but we don't want to invoke any +// Ruby code as a side effect. To be able to look up by hash, `rb_hash_lookup` calls `#hash` on the key, +// which we want to avoid. +// Thus, instead, we opt to just iterate through the hash and check if we can find what we're looking for. +// +// To avoid having too much overhead here we only iterate in hashes up to MAX_SAFE_LOOKUP_SIZE. +// Note that we don't even try to iterate if the hash is bigger -- this is to avoid flaky behavior where +// depending on the internal storage order of the hash we may or not find the key, and instead we always +// enforce the size. +static VALUE safely_lookup_hash_without_going_into_ruby_code(VALUE hash, VALUE key) { + if (!RB_TYPE_P(hash, T_HASH) || RHASH_SIZE(hash) > MAX_SAFE_LOOKUP_SIZE) return Qnil; + + safe_lookup_hash_state state = {.lookup_key = key, .result = Qnil}; + + rb_hash_foreach(hash, safe_lookup_hash_iterate, (VALUE) &state); + + return state.result; +} diff --git a/spec/datadog/profiling/collectors/thread_context_spec.rb b/spec/datadog/profiling/collectors/thread_context_spec.rb index 7145729bcec..0296be0ff72 100644 --- a/spec/datadog/profiling/collectors/thread_context_spec.rb +++ b/spec/datadog/profiling/collectors/thread_context_spec.rb @@ -588,6 +588,7 @@ def self.otel_otlp_exporter_available? false end + # When opentelemetry-sdk is on the Gemfile, but not opentelemetry-exporter-otlp context "when trace comes from otel sdk", if: otel_sdk_available? && !otel_otlp_exporter_available? do let(:otel_tracer) do require "datadog/opentelemetry" @@ -622,6 +623,31 @@ def self.otel_otlp_exporter_available? expect(t1_sample.labels).to_not include("trace endpoint": anything) end + describe 'accessing the current span' do + before do + allow(Datadog.logger).to receive(:error) + + # initialize otel context reading + sample + # clear samples + recorder.serialize! + end + + it 'does not try to hash the CURRENT_SPAN_KEY' do + inner_check_ran = false + + otel_tracer.in_span("profiler.test") do |_span| + expect(OpenTelemetry::Trace.const_get(:CURRENT_SPAN_KEY)).to_not receive(:hash) + + sample_allocation(weight: 1) + + inner_check_ran = true + end + + expect(inner_check_ran).to be true + end + end + context "when there are multiple otel spans nested" do let(:t1) do Thread.new(ready_queue, otel_tracer) do |ready_queue, otel_tracer| @@ -721,6 +747,7 @@ def self.otel_otlp_exporter_available? end end + # When opentelemetry-sdk AND opentelemetry-exporter-otlp are on the Gemfile context( "when trace comes from otel sdk and the ddtrace otel support is not loaded", if: otel_sdk_available? && otel_otlp_exporter_available? @@ -769,7 +796,7 @@ def otel_span_id_to_i(span_id) expect(t1_sample.labels).to_not include("trace endpoint": anything) end - context 'reading CURRENT_SPAN_KEY' do + describe 'reading CURRENT_SPAN_KEY into otel_current_span_key' do let!(:ran_log) { [] } let(:setup_failure) do @@ -818,6 +845,61 @@ def otel_span_id_to_i(span_id) end end + describe 'accessing the current span' do + before do + allow(OpenTelemetry.logger).to receive(:error) + + # initialize otel context reading + sample + # clear samples + recorder.serialize! + end + + it 'does not try to hash the CURRENT_SPAN_KEY' do + inner_check_ran = false + + otel_tracer.in_span("profiler.test") do |_span| + expect(OpenTelemetry::Trace.const_get(:CURRENT_SPAN_KEY)).to_not receive(:hash) + + sample_allocation(weight: 1) + + inner_check_ran = true + end + + expect(inner_check_ran).to be true + end + + context 'when there are more than MAX_SAFE_LOOKUP_SIZE entries in the otel context' do + let(:max_safe_lookup_size) { 16 } # Value of MAX_SAFE_LOOKUP_SIZE in C code + + it 'does not try to look up the context' do + otel_tracer.in_span("profiler.test") do |_span| + current_size = OpenTelemetry::Context.current.instance_variable_get(:@entries).size + + OpenTelemetry::Context.with_values( + Array.new((max_safe_lookup_size + 1 - current_size)) { |it| ["key_#{it}", it] }.to_h + ) do + sample_allocation(weight: 12) + end + + OpenTelemetry::Context.with_values( + Array.new((max_safe_lookup_size - current_size)) { |it| ["key_#{it}", it] }.to_h + ) do + sample_allocation(weight: 34) + end + end + + result = samples_for_thread(samples, Thread.current) + + expect(result.size).to be 2 + expect(result.find { |it| it.values.fetch(:"alloc-samples") == 12 }.labels.keys) + .to_not include(:"local root span id", :"span id") + expect(result.find { |it| it.values.fetch(:"alloc-samples") == 34 }.labels.keys) + .to include(:"local root span id", :"span id") + end + end + end + context 'when otel_context_enabled is false' do let(:otel_context_enabled) { false } From f200a8372d9da18e95e530484920cbb3690c0b1b Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 19 Dec 2024 14:42:39 +0000 Subject: [PATCH 33/43] Avoid trying to sample allocations when VM is raising exception During my experiments to reproduce issues around allocation profiling, I've noted that the VM is in an especially delicate state during exception raising, so let's just decline to sample in this situation. --- .../collectors_cpu_and_wall_time_worker.c | 10 ++++++++++ .../private_vm_api_access.c | 3 +++ .../private_vm_api_access.h | 2 ++ 3 files changed, 15 insertions(+) diff --git a/ext/datadog_profiling_native_extension/collectors_cpu_and_wall_time_worker.c b/ext/datadog_profiling_native_extension/collectors_cpu_and_wall_time_worker.c index e4e9b69473e..723e2d93b33 100644 --- a/ext/datadog_profiling_native_extension/collectors_cpu_and_wall_time_worker.c +++ b/ext/datadog_profiling_native_extension/collectors_cpu_and_wall_time_worker.c @@ -1171,6 +1171,16 @@ static void on_newobj_event(DDTRACE_UNUSED VALUE unused1, DDTRACE_UNUSED void *u return; } + // If Ruby is in the middle of raising an exception, we don't want to try to sample. This is because if we accidentally + // trigger an exception inside the profiler code, bad things will happen (specifically, Ruby will try to kill off the + // thread even though we may try to catch the exception). + // + // Note that "in the middle of raising an exception" means the exception itself has already been allocated. + // What's getting allocated now is probably the backtrace objects (@ivoanjo or at least that's what I've observed) + if (is_raised_flag_set(rb_thread_current())) { + return; + } + // Hot path: Dynamic sampling rate is usually enabled and the sampling decision is usually false if (RB_LIKELY(state->dynamic_sampling_rate_enabled && !discrete_dynamic_sampler_should_sample(&state->allocation_sampler))) { state->stats.allocation_skipped++; diff --git a/ext/datadog_profiling_native_extension/private_vm_api_access.c b/ext/datadog_profiling_native_extension/private_vm_api_access.c index 59e5c644882..f7c188861d7 100644 --- a/ext/datadog_profiling_native_extension/private_vm_api_access.c +++ b/ext/datadog_profiling_native_extension/private_vm_api_access.c @@ -800,3 +800,6 @@ static inline int ddtrace_imemo_type(VALUE imemo) { return current_thread; } #endif + +// Is the VM smack in the middle of raising an exception? +bool is_raised_flag_set(VALUE thread) { return thread_struct_from_object(thread)->ec->raised_flag > 0; } diff --git a/ext/datadog_profiling_native_extension/private_vm_api_access.h b/ext/datadog_profiling_native_extension/private_vm_api_access.h index c40992274cb..3e412f51ea5 100644 --- a/ext/datadog_profiling_native_extension/private_vm_api_access.h +++ b/ext/datadog_profiling_native_extension/private_vm_api_access.h @@ -68,3 +68,5 @@ const char *imemo_kind(VALUE imemo); #define ENFORCE_THREAD(value) \ { if (RB_UNLIKELY(!rb_typeddata_is_kind_of(value, RTYPEDDATA_TYPE(rb_thread_current())))) raise_unexpected_type(value, ADD_QUOTES(value), "Thread", __FILE__, __LINE__, __func__); } + +bool is_raised_flag_set(VALUE thread); From 3dfd1132c0105f687e244fe4da468af16da459aa Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 19 Dec 2024 14:51:46 +0000 Subject: [PATCH 34/43] Update tests with new signatures for test methods --- benchmarks/profiler_gc.rb | 6 +++--- benchmarks/profiler_sample_gvl.rb | 2 +- benchmarks/profiler_sample_loop_v2.rb | 2 +- benchmarks/profiler_sample_serialize.rb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/benchmarks/profiler_gc.rb b/benchmarks/profiler_gc.rb index e96198cdfba..401af152d84 100644 --- a/benchmarks/profiler_gc.rb +++ b/benchmarks/profiler_gc.rb @@ -14,7 +14,7 @@ def create_profiler # We take a dummy sample so that the context for the main thread is created, as otherwise the GC profiling methods do # not create it (because we don't want to do memory allocations in the middle of GC) - Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, Thread.current) + Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, Thread.current, false) end def run_benchmark @@ -29,7 +29,7 @@ def run_benchmark x.report('profiler gc') do Datadog::Profiling::Collectors::ThreadContext::Testing._native_on_gc_start(@collector) Datadog::Profiling::Collectors::ThreadContext::Testing._native_on_gc_finish(@collector) - Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample_after_gc(@collector, false) + Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample_after_gc(@collector, false, false) end x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE @@ -52,7 +52,7 @@ def run_benchmark estimated_gc_per_minute.times do Datadog::Profiling::Collectors::ThreadContext::Testing._native_on_gc_start(@collector) Datadog::Profiling::Collectors::ThreadContext::Testing._native_on_gc_finish(@collector) - Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample_after_gc(@collector, false) + Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample_after_gc(@collector, false, false) end @recorder.serialize diff --git a/benchmarks/profiler_sample_gvl.rb b/benchmarks/profiler_sample_gvl.rb index 76e8528f417..7688730b714 100644 --- a/benchmarks/profiler_sample_gvl.rb +++ b/benchmarks/profiler_sample_gvl.rb @@ -27,7 +27,7 @@ def initialize @target_thread = thread_with_very_deep_stack # Sample once to trigger thread context creation for all threads (including @target_thread) - Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD) + Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD, false) end def create_profiler diff --git a/benchmarks/profiler_sample_loop_v2.rb b/benchmarks/profiler_sample_loop_v2.rb index e007375cf6c..624f29bad25 100644 --- a/benchmarks/profiler_sample_loop_v2.rb +++ b/benchmarks/profiler_sample_loop_v2.rb @@ -37,7 +37,7 @@ def run_benchmark ) x.report("stack collector #{ENV['CONFIG']}") do - Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD) + Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD, false) end x.save! "#{File.basename(__FILE__)}-results.json" unless VALIDATE_BENCHMARK_MODE diff --git a/benchmarks/profiler_sample_serialize.rb b/benchmarks/profiler_sample_serialize.rb index 47ae1b6854a..b90997c42d5 100644 --- a/benchmarks/profiler_sample_serialize.rb +++ b/benchmarks/profiler_sample_serialize.rb @@ -35,7 +35,7 @@ def run_benchmark simulate_seconds = 60 (samples_per_second * simulate_seconds).times do - Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD) + Datadog::Profiling::Collectors::ThreadContext::Testing._native_sample(@collector, PROFILER_OVERHEAD_STACK_THREAD, false) end @recorder.serialize From 092fa935bf0c249af29b356a037c179dd9ffec1f Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 19 Dec 2024 14:56:37 +0000 Subject: [PATCH 35/43] Check if symbol is static before calling SYM2ID on it It occurs to me that if a symbol is dynamic, we were causing it to become a static symbol (e.g. making it never be able to be garbage collected). This can be very bad! And also, we know the symbol we're looking for must be a static symbol because if nothing else, our initialization caused it to become a static symbol. Thus, if we see a dynamic symbol, we can stop there, since by definition it won't be the symbol we're looking after. This is... really awkward to add a specific unit test for, so I've just relied on our existing test coverage to show that this has not affected the correctness of our otel code. --- .../collectors_thread_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/datadog_profiling_native_extension/collectors_thread_context.c b/ext/datadog_profiling_native_extension/collectors_thread_context.c index b8e7aedfefb..4afb23c5a9e 100644 --- a/ext/datadog_profiling_native_extension/collectors_thread_context.c +++ b/ext/datadog_profiling_native_extension/collectors_thread_context.c @@ -1750,7 +1750,7 @@ static void otel_without_ddtrace_trace_identifiers_for( VALUE root_span_type = rb_ivar_get(local_root_span.span, at_kind_id /* @kind */); // We filter out spans that don't have `kind: :server` - if (root_span_type == Qnil || !RB_TYPE_P(root_span_type, T_SYMBOL) || SYM2ID(root_span_type) != server_id) return; + if (root_span_type == Qnil || !RB_TYPE_P(root_span_type, T_SYMBOL) || !RB_STATIC_SYM_P(root_span_type) || SYM2ID(root_span_type) != server_id) return; VALUE trace_resource = rb_ivar_get(local_root_span.span, at_name_id /* @name */); if (!RB_TYPE_P(trace_resource, T_STRING)) return; From 45c7dbe46e3fd9050c8fc30237b174f608777e4d Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 19 Dec 2024 17:20:49 +0000 Subject: [PATCH 36/43] Document that unsafe api calls checker is only for test code --- .../unsafe_api_calls_check.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/datadog_profiling_native_extension/unsafe_api_calls_check.h b/ext/datadog_profiling_native_extension/unsafe_api_calls_check.h index 092a59f30b3..c6c8dc56cf5 100644 --- a/ext/datadog_profiling_native_extension/unsafe_api_calls_check.h +++ b/ext/datadog_profiling_native_extension/unsafe_api_calls_check.h @@ -21,5 +21,11 @@ // stop the Ruby VM before further damage happens (and hopefully giving us a stack trace clearly pointing to the culprit). void unsafe_api_calls_check_init(void); + +// IMPORTANT: This method **MUST** only be called from test code, as it causes an immediate hard-crash on the Ruby VM +// when it detects a potential issue, and that's not something we want for production apps. +// +// In the future we may introduce some kind of setting (off by default) to also allow this to be safely be used +// in production code if needed. void debug_enter_unsafe_context(void); void debug_leave_unsafe_context(void); From 4f6eb84bf503953084de7d718a1e3793038bdd4d Mon Sep 17 00:00:00 2001 From: Sarah Chen Date: Thu, 2 Jan 2025 09:30:37 -0600 Subject: [PATCH 37/43] Add 3.4 support --- docs/Compatibility.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Compatibility.md b/docs/Compatibility.md index 7334f2254a9..6dbcf8e5e12 100644 --- a/docs/Compatibility.md +++ b/docs/Compatibility.md @@ -9,7 +9,8 @@ The Ruby Datadog Trace library is open source. See the [dd-trace-rb][1] GitHub r | Type | Documentation | Version | Support type | Gem version support | |-------|----------------------------|-----------|---------------------------|---------------------| -| MRI | https://www.ruby-lang.org/ | 3.3 | [latest](#support-latest) | Latest | +| MRI | https://www.ruby-lang.org/ | 3.4 | [latest](#support-latest) | Latest | +| | | 3.3 | [latest](#support-latest) | Latest | | | | 3.2 | [latest](#support-latest) | Latest | | | | 3.1 | [latest](#support-latest) | Latest | | | | 3.0 | [latest](#support-latest) | Latest | From 831f89f2c213c6876f7f2cd1e5fa26449215e637 Mon Sep 17 00:00:00 2001 From: Sarah Chen Date: Thu, 2 Jan 2025 09:40:45 -0600 Subject: [PATCH 38/43] Update DevelopmentGuide --- docs/DevelopmentGuide.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/DevelopmentGuide.md b/docs/DevelopmentGuide.md index adf99bc3e7d..087695e1e30 100644 --- a/docs/DevelopmentGuide.md +++ b/docs/DevelopmentGuide.md @@ -65,9 +65,9 @@ All tests should run in CI. When adding new `_spec.rb` files, you may need to ad { 'foo' => { # With default dependencies for each Ruby runtime - '' => '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby', + '' => '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ jruby', # or with dependency group definition `foo-on-rails`, that includes additional gems - 'foo-on-rails' => '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby' + 'foo-on-rails' => '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ jruby' }, } ``` @@ -98,9 +98,9 @@ Take `bundle exec rake test:redis` as example, multiple versions of `redis` from ```ruby { 'redis' => { - 'redis-3' => '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby', - 'redis-4' => '❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby', - 'redis-5' => '❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby' + 'redis-3' => '✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ jruby', + 'redis-4' => '✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ jruby', + 'redis-5' => '✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ jruby' } } ``` From a62ee88dee5136b427c14372abfafe4a7de88c54 Mon Sep 17 00:00:00 2001 From: Sarah Chen Date: Thu, 2 Jan 2025 09:57:41 -0600 Subject: [PATCH 39/43] Remove `racc` gem from 3.3 and 3.4 appraisal files --- appraisal/ruby-3.3.rb | 2 -- appraisal/ruby-3.4.rb | 2 -- 2 files changed, 4 deletions(-) diff --git a/appraisal/ruby-3.3.rb b/appraisal/ruby-3.3.rb index d361fcd68a7..c7fffc3b558 100644 --- a/appraisal/ruby-3.3.rb +++ b/appraisal/ruby-3.3.rb @@ -180,8 +180,6 @@ gem 'dalli', '< 3.0.0' gem 'presto-client', '>= 0.5.14' # Renamed to trino-client in >= 1.0 gem 'qless', '0.12.0' - - gem 'racc' # Remove this once graphql resolves issue for ruby 3.3 preview. https://github.com/rmosolgo/graphql-ruby/issues/4650 end appraise 'core-old' do diff --git a/appraisal/ruby-3.4.rb b/appraisal/ruby-3.4.rb index e83945820bc..17a81807b66 100644 --- a/appraisal/ruby-3.4.rb +++ b/appraisal/ruby-3.4.rb @@ -191,8 +191,6 @@ gem 'dalli', '< 3.0.0' gem 'presto-client', '>= 0.5.14' # Renamed to trino-client in >= 1.0 gem 'qless', '0.12.0' - - gem 'racc' # Remove this once graphql resolves issue for ruby 3.3 preview. https://github.com/rmosolgo/graphql-ruby/issues/4650 end appraise 'core-old' do From f544d4a1be40c1cf1f8f00bb93d301427b096d55 Mon Sep 17 00:00:00 2001 From: ivoanjo Date: Fri, 3 Jan 2025 10:07:24 +0000 Subject: [PATCH 40/43] =?UTF-8?q?[=F0=9F=A4=96]=20Lock=20Dependency:=20htt?= =?UTF-8?q?ps://github.com/DataDog/dd-trace-rb/actions/runs/12595964519?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gemfiles/ruby_3.3_contrib_old.gemfile | 1 - gemfiles/ruby_3.3_contrib_old.gemfile.lock | 2 -- gemfiles/ruby_3.4_contrib_old.gemfile | 1 - gemfiles/ruby_3.4_contrib_old.gemfile.lock | 1 - 4 files changed, 5 deletions(-) diff --git a/gemfiles/ruby_3.3_contrib_old.gemfile b/gemfiles/ruby_3.3_contrib_old.gemfile index 69c05bfa60b..2caa7bfff9a 100644 --- a/gemfiles/ruby_3.3_contrib_old.gemfile +++ b/gemfiles/ruby_3.3_contrib_old.gemfile @@ -33,7 +33,6 @@ gem "webrick", ">= 1.7.0" gem "dalli", "< 3.0.0" gem "presto-client", ">= 0.5.14" gem "qless", "0.12.0" -gem "racc" group :check do diff --git a/gemfiles/ruby_3.3_contrib_old.gemfile.lock b/gemfiles/ruby_3.3_contrib_old.gemfile.lock index 7ca64ec33a0..2b8fcbe894f 100644 --- a/gemfiles/ruby_3.3_contrib_old.gemfile.lock +++ b/gemfiles/ruby_3.3_contrib_old.gemfile.lock @@ -97,7 +97,6 @@ GEM thin (~> 1.6) thor (~> 0.19.1) vegas (~> 0.1.11) - racc (1.7.1) rack (2.2.7) rack-protection (2.0.8.1) rack @@ -205,7 +204,6 @@ DEPENDENCIES pry pry-stack_explorer qless (= 0.12.0) - racc rake (>= 10.5) rake-compiler (~> 1.1, >= 1.1.1) rspec (~> 3.13) diff --git a/gemfiles/ruby_3.4_contrib_old.gemfile b/gemfiles/ruby_3.4_contrib_old.gemfile index 21050379892..e9ec700e6c5 100644 --- a/gemfiles/ruby_3.4_contrib_old.gemfile +++ b/gemfiles/ruby_3.4_contrib_old.gemfile @@ -37,7 +37,6 @@ gem "webrick", ">= 1.8.2" gem "dalli", "< 3.0.0" gem "presto-client", ">= 0.5.14" gem "qless", "0.12.0" -gem "racc" group :check do diff --git a/gemfiles/ruby_3.4_contrib_old.gemfile.lock b/gemfiles/ruby_3.4_contrib_old.gemfile.lock index 79aaafe972f..0f84dba9508 100644 --- a/gemfiles/ruby_3.4_contrib_old.gemfile.lock +++ b/gemfiles/ruby_3.4_contrib_old.gemfile.lock @@ -220,7 +220,6 @@ DEPENDENCIES pry pry-stack_explorer qless (= 0.12.0) - racc rake (>= 10.5) rake-compiler (~> 1.1, >= 1.1.1) rspec (~> 3.13) From da2860aa34089fffb810636d0f56d790f9cd28c5 Mon Sep 17 00:00:00 2001 From: Sarah Chen Date: Thu, 2 Jan 2025 09:52:40 -0600 Subject: [PATCH 41/43] Remove strscan specification in 3.4 gemfile --- ruby-3.4.gemfile | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ruby-3.4.gemfile b/ruby-3.4.gemfile index 73960422f46..29e8b57e240 100644 --- a/ruby-3.4.gemfile +++ b/ruby-3.4.gemfile @@ -49,15 +49,6 @@ gem 'rubocop-rspec', ['~> 2.20', '< 2.21'], require: false # but given it only affects unsupported version of Ruby, it might not get merged. gem 'simplecov', git: 'https://github.com/DataDog/simplecov', ref: '3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db' gem 'simplecov-cobertura', '~> 2.1.0' # Used by codecov - -# Ruby 3.4 should be supported by strscan v3.1.1. However, the latest release of strscan is v3.1.0. -# Pin strscan to the latest commit sha. -# -# TODO: Remove once v3.1.1 is released. -gem 'strscan', - git: 'https://github.com/ruby/strscan', - ref: '041b15df4ccc067deabd85fd489b2c15961d0e2f' - gem 'warning', '~> 1' # NOTE: Used in spec_helper.rb gem 'webmock', '>= 3.10.0' gem 'webrick', '>= 1.8.2' From d1f47ad27853f707fc02ed8b38f377ec0ea6bccc Mon Sep 17 00:00:00 2001 From: ivoanjo Date: Fri, 3 Jan 2025 10:07:28 +0000 Subject: [PATCH 42/43] =?UTF-8?q?[=F0=9F=A4=96]=20Lock=20Dependency:=20htt?= =?UTF-8?q?ps://github.com/DataDog/dd-trace-rb/actions/runs/12595969993?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gemfiles/ruby_3.4_activesupport.gemfile | 1 - gemfiles/ruby_3.4_activesupport.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_aws.gemfile | 1 - gemfiles/ruby_3.4_aws.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_contrib.gemfile | 1 - gemfiles/ruby_3.4_contrib.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_contrib_old.gemfile | 1 - gemfiles/ruby_3.4_contrib_old.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_core_old.gemfile | 1 - gemfiles/ruby_3.4_core_old.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_elasticsearch_7.gemfile | 1 - gemfiles/ruby_3.4_elasticsearch_7.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_elasticsearch_8.gemfile | 1 - gemfiles/ruby_3.4_elasticsearch_8.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_elasticsearch_latest.gemfile | 1 - gemfiles/ruby_3.4_elasticsearch_latest.gemfile.lock | 8 -------- gemfiles/ruby_3.4_graphql_1.13.gemfile | 1 - gemfiles/ruby_3.4_graphql_1.13.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_graphql_2.0.gemfile | 1 - gemfiles/ruby_3.4_graphql_2.0.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_graphql_2.1.gemfile | 1 - gemfiles/ruby_3.4_graphql_2.1.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_graphql_2.2.gemfile | 1 - gemfiles/ruby_3.4_graphql_2.2.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_graphql_2.3.gemfile | 1 - gemfiles/ruby_3.4_graphql_2.3.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_http.gemfile | 1 - gemfiles/ruby_3.4_http.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_opensearch_2.gemfile | 1 - gemfiles/ruby_3.4_opensearch_2.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_opensearch_3.gemfile | 1 - gemfiles/ruby_3.4_opensearch_3.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_opensearch_latest.gemfile | 1 - gemfiles/ruby_3.4_opensearch_latest.gemfile.lock | 8 -------- gemfiles/ruby_3.4_opentelemetry.gemfile | 1 - gemfiles/ruby_3.4_opentelemetry.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_opentelemetry_otlp.gemfile | 1 - gemfiles/ruby_3.4_opentelemetry_otlp.gemfile.lock | 8 -------- gemfiles/ruby_3.4_rack_2.gemfile | 1 - gemfiles/ruby_3.4_rack_2.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_rack_3.gemfile | 1 - gemfiles/ruby_3.4_rack_3.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_rack_latest.gemfile | 1 - gemfiles/ruby_3.4_rack_latest.gemfile.lock | 8 -------- gemfiles/ruby_3.4_rails61_mysql2.gemfile | 1 - gemfiles/ruby_3.4_rails61_mysql2.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_rails61_postgres.gemfile | 1 - gemfiles/ruby_3.4_rails61_postgres.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_rails61_postgres_redis.gemfile | 1 - gemfiles/ruby_3.4_rails61_postgres_redis.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_rails61_postgres_sidekiq.gemfile | 1 - gemfiles/ruby_3.4_rails61_postgres_sidekiq.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_rails61_semantic_logger.gemfile | 1 - gemfiles/ruby_3.4_rails61_semantic_logger.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_rails61_trilogy.gemfile | 1 - gemfiles/ruby_3.4_rails61_trilogy.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_rails7.gemfile | 1 - gemfiles/ruby_3.4_rails7.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_rails71.gemfile | 1 - gemfiles/ruby_3.4_rails71.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_rails_old_redis.gemfile | 1 - gemfiles/ruby_3.4_redis_3.gemfile | 1 - gemfiles/ruby_3.4_redis_3.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_redis_4.gemfile | 1 - gemfiles/ruby_3.4_redis_4.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_redis_5.gemfile | 1 - gemfiles/ruby_3.4_redis_5.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_relational_db.gemfile | 1 - gemfiles/ruby_3.4_relational_db.gemfile.lock | 8 -------- gemfiles/ruby_3.4_resque2_redis3.gemfile | 1 - gemfiles/ruby_3.4_resque2_redis3.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_resque2_redis4.gemfile | 1 - gemfiles/ruby_3.4_resque2_redis4.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_sinatra_2.gemfile | 1 - gemfiles/ruby_3.4_sinatra_2.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_sinatra_3.gemfile | 1 - gemfiles/ruby_3.4_sinatra_3.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_sinatra_4.gemfile | 1 - gemfiles/ruby_3.4_sinatra_4.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_stripe_10.gemfile | 1 - gemfiles/ruby_3.4_stripe_10.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_stripe_11.gemfile | 1 - gemfiles/ruby_3.4_stripe_11.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_stripe_12.gemfile | 1 - gemfiles/ruby_3.4_stripe_12.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_stripe_7.gemfile | 1 - gemfiles/ruby_3.4_stripe_7.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_stripe_8.gemfile | 1 - gemfiles/ruby_3.4_stripe_8.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_stripe_9.gemfile | 1 - gemfiles/ruby_3.4_stripe_9.gemfile.lock | 9 +-------- gemfiles/ruby_3.4_stripe_latest.gemfile | 1 - gemfiles/ruby_3.4_stripe_latest.gemfile.lock | 8 -------- gemfiles/ruby_3.4_stripe_min.gemfile | 1 - gemfiles/ruby_3.4_stripe_min.gemfile.lock | 8 -------- 95 files changed, 40 insertions(+), 424 deletions(-) diff --git a/gemfiles/ruby_3.4_activesupport.gemfile b/gemfiles/ruby_3.4_activesupport.gemfile index 9c6d7cf607d..b9efe74db8f 100644 --- a/gemfiles/ruby_3.4_activesupport.gemfile +++ b/gemfiles/ruby_3.4_activesupport.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_activesupport.gemfile.lock b/gemfiles/ruby_3.4_activesupport.gemfile.lock index c93111f5ec2..c4a46291810 100644 --- a/gemfiles/ruby_3.4_activesupport.gemfile.lock +++ b/gemfiles/ruby_3.4_activesupport.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -263,6 +256,7 @@ GEM simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) stringio (3.1.1) + strscan (3.1.1) thor (1.3.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) @@ -317,7 +311,6 @@ DEPENDENCIES ruby-kafka (>= 0.7.10) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_aws.gemfile b/gemfiles/ruby_3.4_aws.gemfile index 1d0ffa5ece1..85239ef89ed 100644 --- a/gemfiles/ruby_3.4_aws.gemfile +++ b/gemfiles/ruby_3.4_aws.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_aws.gemfile.lock b/gemfiles/ruby_3.4_aws.gemfile.lock index c651a539845..1a68c8be039 100644 --- a/gemfiles/ruby_3.4_aws.gemfile.lock +++ b/gemfiles/ruby_3.4_aws.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -1686,6 +1679,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) thor (1.3.1) unicode-display_width (2.5.0) warning (1.4.0) @@ -1731,7 +1725,6 @@ DEPENDENCIES shoryuken simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_contrib.gemfile b/gemfiles/ruby_3.4_contrib.gemfile index 6b918e37619..4d6897b4608 100644 --- a/gemfiles/ruby_3.4_contrib.gemfile +++ b/gemfiles/ruby_3.4_contrib.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_contrib.gemfile.lock b/gemfiles/ruby_3.4_contrib.gemfile.lock index 94793d838e6..df998e8e4bf 100644 --- a/gemfiles/ruby_3.4_contrib.gemfile.lock +++ b/gemfiles/ruby_3.4_contrib.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -203,6 +196,7 @@ GEM sorted_set (1.0.3) rbtree set (~> 1.0) + strscan (3.1.1) sucker_punch (3.2.0) concurrent-ruby (~> 1.0) thor (1.3.1) @@ -260,7 +254,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sneakers (>= 2.12.0) - strscan! sucker_punch warning (~> 1) webmock (>= 3.10.0) diff --git a/gemfiles/ruby_3.4_contrib_old.gemfile b/gemfiles/ruby_3.4_contrib_old.gemfile index e9ec700e6c5..a49d7a0f057 100644 --- a/gemfiles/ruby_3.4_contrib_old.gemfile +++ b/gemfiles/ruby_3.4_contrib_old.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_contrib_old.gemfile.lock b/gemfiles/ruby_3.4_contrib_old.gemfile.lock index 0f84dba9508..a47f824e3d3 100644 --- a/gemfiles/ruby_3.4_contrib_old.gemfile.lock +++ b/gemfiles/ruby_3.4_contrib_old.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -179,6 +172,7 @@ GEM rack-protection (= 2.0.8.1) tilt (~> 2.0) statsd-ruby (1.5.0) + strscan (3.1.1) thin (1.8.2) daemons (~> 1.0, >= 1.0.9) eventmachine (~> 1.0, >= 1.0.4) @@ -232,7 +226,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_core_old.gemfile b/gemfiles/ruby_3.4_core_old.gemfile index 547f67430e4..7212c4c6b31 100644 --- a/gemfiles/ruby_3.4_core_old.gemfile +++ b/gemfiles/ruby_3.4_core_old.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_core_old.gemfile.lock b/gemfiles/ruby_3.4_core_old.gemfile.lock index 9b0963022f9..84b9fb016eb 100644 --- a/gemfiles/ruby_3.4_core_old.gemfile.lock +++ b/gemfiles/ruby_3.4_core_old.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -133,6 +126,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -175,7 +169,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_elasticsearch_7.gemfile b/gemfiles/ruby_3.4_elasticsearch_7.gemfile index ca0a57a3b86..0daf60388b5 100644 --- a/gemfiles/ruby_3.4_elasticsearch_7.gemfile +++ b/gemfiles/ruby_3.4_elasticsearch_7.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_elasticsearch_7.gemfile.lock b/gemfiles/ruby_3.4_elasticsearch_7.gemfile.lock index 60fe66892ac..518ba2bd4ea 100644 --- a/gemfiles/ruby_3.4_elasticsearch_7.gemfile.lock +++ b/gemfiles/ruby_3.4_elasticsearch_7.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -152,6 +145,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) unicode-display_width (2.5.0) uri (1.0.2) warning (1.4.0) @@ -196,7 +190,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_elasticsearch_8.gemfile b/gemfiles/ruby_3.4_elasticsearch_8.gemfile index e206077209e..c72e5234d71 100644 --- a/gemfiles/ruby_3.4_elasticsearch_8.gemfile +++ b/gemfiles/ruby_3.4_elasticsearch_8.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_elasticsearch_8.gemfile.lock b/gemfiles/ruby_3.4_elasticsearch_8.gemfile.lock index 5d6d0fc82f2..dd39d2036fb 100644 --- a/gemfiles/ruby_3.4_elasticsearch_8.gemfile.lock +++ b/gemfiles/ruby_3.4_elasticsearch_8.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -151,6 +144,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) unicode-display_width (2.5.0) uri (1.0.2) warning (1.4.0) @@ -195,7 +189,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_elasticsearch_latest.gemfile b/gemfiles/ruby_3.4_elasticsearch_latest.gemfile index 617eece269d..9ef8143ea77 100644 --- a/gemfiles/ruby_3.4_elasticsearch_latest.gemfile +++ b/gemfiles/ruby_3.4_elasticsearch_latest.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_elasticsearch_latest.gemfile.lock b/gemfiles/ruby_3.4_elasticsearch_latest.gemfile.lock index 3fbae0ceaf6..a8efec5d19c 100644 --- a/gemfiles/ruby_3.4_elasticsearch_latest.gemfile.lock +++ b/gemfiles/ruby_3.4_elasticsearch_latest.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -194,7 +187,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_graphql_1.13.gemfile b/gemfiles/ruby_3.4_graphql_1.13.gemfile index bed7165479a..bfd55a09fa2 100644 --- a/gemfiles/ruby_3.4_graphql_1.13.gemfile +++ b/gemfiles/ruby_3.4_graphql_1.13.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_graphql_1.13.gemfile.lock b/gemfiles/ruby_3.4_graphql_1.13.gemfile.lock index 59529d9c968..41bc5e725dc 100644 --- a/gemfiles/ruby_3.4_graphql_1.13.gemfile.lock +++ b/gemfiles/ruby_3.4_graphql_1.13.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -272,6 +265,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -326,7 +320,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sprockets (< 4) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_graphql_2.0.gemfile b/gemfiles/ruby_3.4_graphql_2.0.gemfile index 86a7af994d9..fc6b049dd44 100644 --- a/gemfiles/ruby_3.4_graphql_2.0.gemfile +++ b/gemfiles/ruby_3.4_graphql_2.0.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_graphql_2.0.gemfile.lock b/gemfiles/ruby_3.4_graphql_2.0.gemfile.lock index 6292fc3244c..ab0390ad394 100644 --- a/gemfiles/ruby_3.4_graphql_2.0.gemfile.lock +++ b/gemfiles/ruby_3.4_graphql_2.0.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -272,6 +265,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -326,7 +320,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sprockets (< 4) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_graphql_2.1.gemfile b/gemfiles/ruby_3.4_graphql_2.1.gemfile index 7910e1feec2..f5fe40a7add 100644 --- a/gemfiles/ruby_3.4_graphql_2.1.gemfile +++ b/gemfiles/ruby_3.4_graphql_2.1.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_graphql_2.1.gemfile.lock b/gemfiles/ruby_3.4_graphql_2.1.gemfile.lock index 5b7705eefdd..954ed12a904 100644 --- a/gemfiles/ruby_3.4_graphql_2.1.gemfile.lock +++ b/gemfiles/ruby_3.4_graphql_2.1.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -272,6 +265,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -326,7 +320,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sprockets (< 4) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_graphql_2.2.gemfile b/gemfiles/ruby_3.4_graphql_2.2.gemfile index 10c6d255c33..2c7558e0998 100644 --- a/gemfiles/ruby_3.4_graphql_2.2.gemfile +++ b/gemfiles/ruby_3.4_graphql_2.2.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_graphql_2.2.gemfile.lock b/gemfiles/ruby_3.4_graphql_2.2.gemfile.lock index fba40f152eb..abbb5921da2 100644 --- a/gemfiles/ruby_3.4_graphql_2.2.gemfile.lock +++ b/gemfiles/ruby_3.4_graphql_2.2.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -272,6 +265,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -326,7 +320,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sprockets (< 4) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_graphql_2.3.gemfile b/gemfiles/ruby_3.4_graphql_2.3.gemfile index f775428fe71..85c824645e9 100644 --- a/gemfiles/ruby_3.4_graphql_2.3.gemfile +++ b/gemfiles/ruby_3.4_graphql_2.3.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_graphql_2.3.gemfile.lock b/gemfiles/ruby_3.4_graphql_2.3.gemfile.lock index ab9dd543d85..9fd62652b3d 100644 --- a/gemfiles/ruby_3.4_graphql_2.3.gemfile.lock +++ b/gemfiles/ruby_3.4_graphql_2.3.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -272,6 +265,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -326,7 +320,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sprockets (< 4) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_http.gemfile b/gemfiles/ruby_3.4_http.gemfile index 9013f09cfca..823cd07ba5a 100644 --- a/gemfiles/ruby_3.4_http.gemfile +++ b/gemfiles/ruby_3.4_http.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_http.gemfile.lock b/gemfiles/ruby_3.4_http.gemfile.lock index fb8a0aef4cc..e3ccb3ab6a6 100644 --- a/gemfiles/ruby_3.4_http.gemfile.lock +++ b/gemfiles/ruby_3.4_http.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -169,6 +162,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) typhoeus (1.4.1) ethon (>= 0.9.0) unicode-display_width (2.5.0) @@ -220,7 +214,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! typhoeus warning (~> 1) webmock (>= 3.10.0) diff --git a/gemfiles/ruby_3.4_opensearch_2.gemfile b/gemfiles/ruby_3.4_opensearch_2.gemfile index 8487af6f277..b9f5dd06ab1 100644 --- a/gemfiles/ruby_3.4_opensearch_2.gemfile +++ b/gemfiles/ruby_3.4_opensearch_2.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_opensearch_2.gemfile.lock b/gemfiles/ruby_3.4_opensearch_2.gemfile.lock index 54ade015841..fbe94e88416 100644 --- a/gemfiles/ruby_3.4_opensearch_2.gemfile.lock +++ b/gemfiles/ruby_3.4_opensearch_2.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -151,6 +144,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) unicode-display_width (2.5.0) uri (1.0.2) warning (1.4.0) @@ -195,7 +189,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_opensearch_3.gemfile b/gemfiles/ruby_3.4_opensearch_3.gemfile index 1a928a4a7c8..c6b73fbb534 100644 --- a/gemfiles/ruby_3.4_opensearch_3.gemfile +++ b/gemfiles/ruby_3.4_opensearch_3.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_opensearch_3.gemfile.lock b/gemfiles/ruby_3.4_opensearch_3.gemfile.lock index 8475eadd9b9..bd49940dd79 100644 --- a/gemfiles/ruby_3.4_opensearch_3.gemfile.lock +++ b/gemfiles/ruby_3.4_opensearch_3.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -146,6 +139,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) unicode-display_width (2.5.0) uri (1.0.2) warning (1.4.0) @@ -190,7 +184,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_opensearch_latest.gemfile b/gemfiles/ruby_3.4_opensearch_latest.gemfile index 4bdc9cd1ec5..d7ee68961b8 100644 --- a/gemfiles/ruby_3.4_opensearch_latest.gemfile +++ b/gemfiles/ruby_3.4_opensearch_latest.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_opensearch_latest.gemfile.lock b/gemfiles/ruby_3.4_opensearch_latest.gemfile.lock index dd0d9e7320d..b5252634c3f 100644 --- a/gemfiles/ruby_3.4_opensearch_latest.gemfile.lock +++ b/gemfiles/ruby_3.4_opensearch_latest.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -189,7 +182,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_opentelemetry.gemfile b/gemfiles/ruby_3.4_opentelemetry.gemfile index 13f8c87ba04..2b1ee29481c 100644 --- a/gemfiles/ruby_3.4_opentelemetry.gemfile +++ b/gemfiles/ruby_3.4_opentelemetry.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_opentelemetry.gemfile.lock b/gemfiles/ruby_3.4_opentelemetry.gemfile.lock index b3ab9d1ec70..c8aef7ddd35 100644 --- a/gemfiles/ruby_3.4_opentelemetry.gemfile.lock +++ b/gemfiles/ruby_3.4_opentelemetry.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -145,6 +138,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -188,7 +182,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_opentelemetry_otlp.gemfile b/gemfiles/ruby_3.4_opentelemetry_otlp.gemfile index dcef28884e0..cd64e4e680b 100644 --- a/gemfiles/ruby_3.4_opentelemetry_otlp.gemfile +++ b/gemfiles/ruby_3.4_opentelemetry_otlp.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_opentelemetry_otlp.gemfile.lock b/gemfiles/ruby_3.4_opentelemetry_otlp.gemfile.lock index ffabe185890..78db044daa4 100644 --- a/gemfiles/ruby_3.4_opentelemetry_otlp.gemfile.lock +++ b/gemfiles/ruby_3.4_opentelemetry_otlp.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -197,7 +190,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_rack_2.gemfile b/gemfiles/ruby_3.4_rack_2.gemfile index 1471d0b6b31..f9b1fda874c 100644 --- a/gemfiles/ruby_3.4_rack_2.gemfile +++ b/gemfiles/ruby_3.4_rack_2.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_rack_2.gemfile.lock b/gemfiles/ruby_3.4_rack_2.gemfile.lock index 7418d027cce..bcfa63671f1 100644 --- a/gemfiles/ruby_3.4_rack_2.gemfile.lock +++ b/gemfiles/ruby_3.4_rack_2.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -138,6 +131,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -183,7 +177,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_rack_3.gemfile b/gemfiles/ruby_3.4_rack_3.gemfile index 7c8b1e43db9..6483683c9cb 100644 --- a/gemfiles/ruby_3.4_rack_3.gemfile +++ b/gemfiles/ruby_3.4_rack_3.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_rack_3.gemfile.lock b/gemfiles/ruby_3.4_rack_3.gemfile.lock index 56041730327..9af02fb4158 100644 --- a/gemfiles/ruby_3.4_rack_3.gemfile.lock +++ b/gemfiles/ruby_3.4_rack_3.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -138,6 +131,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -183,7 +177,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_rack_latest.gemfile b/gemfiles/ruby_3.4_rack_latest.gemfile index 9f705bee167..675b9e26fd3 100644 --- a/gemfiles/ruby_3.4_rack_latest.gemfile +++ b/gemfiles/ruby_3.4_rack_latest.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_rack_latest.gemfile.lock b/gemfiles/ruby_3.4_rack_latest.gemfile.lock index 4ff59f8edd1..ddbe1a2a65e 100644 --- a/gemfiles/ruby_3.4_rack_latest.gemfile.lock +++ b/gemfiles/ruby_3.4_rack_latest.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -182,7 +175,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_rails61_mysql2.gemfile b/gemfiles/ruby_3.4_rails61_mysql2.gemfile index 88849759a64..b0259c8f84d 100644 --- a/gemfiles/ruby_3.4_rails61_mysql2.gemfile +++ b/gemfiles/ruby_3.4_rails61_mysql2.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_rails61_mysql2.gemfile.lock b/gemfiles/ruby_3.4_rails61_mysql2.gemfile.lock index a2c1144b087..7f4dcac9b39 100644 --- a/gemfiles/ruby_3.4_rails61_mysql2.gemfile.lock +++ b/gemfiles/ruby_3.4_rails61_mysql2.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -271,6 +264,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -326,7 +320,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sprockets (< 4) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_rails61_postgres.gemfile b/gemfiles/ruby_3.4_rails61_postgres.gemfile index 017c1a501db..b7792f10cbc 100644 --- a/gemfiles/ruby_3.4_rails61_postgres.gemfile +++ b/gemfiles/ruby_3.4_rails61_postgres.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_rails61_postgres.gemfile.lock b/gemfiles/ruby_3.4_rails61_postgres.gemfile.lock index 9e54602c501..d6472b2a812 100644 --- a/gemfiles/ruby_3.4_rails61_postgres.gemfile.lock +++ b/gemfiles/ruby_3.4_rails61_postgres.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -271,6 +264,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -326,7 +320,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sprockets (< 4) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_rails61_postgres_redis.gemfile b/gemfiles/ruby_3.4_rails61_postgres_redis.gemfile index 5227ff1a053..952e9a6f865 100644 --- a/gemfiles/ruby_3.4_rails61_postgres_redis.gemfile +++ b/gemfiles/ruby_3.4_rails61_postgres_redis.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_rails61_postgres_redis.gemfile.lock b/gemfiles/ruby_3.4_rails61_postgres_redis.gemfile.lock index fa5d9163b5a..853fe2afe0b 100644 --- a/gemfiles/ruby_3.4_rails61_postgres_redis.gemfile.lock +++ b/gemfiles/ruby_3.4_rails61_postgres_redis.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -272,6 +265,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -328,7 +322,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sprockets (< 4) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_rails61_postgres_sidekiq.gemfile b/gemfiles/ruby_3.4_rails61_postgres_sidekiq.gemfile index e36430d98c7..69cf36345bc 100644 --- a/gemfiles/ruby_3.4_rails61_postgres_sidekiq.gemfile +++ b/gemfiles/ruby_3.4_rails61_postgres_sidekiq.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_rails61_postgres_sidekiq.gemfile.lock b/gemfiles/ruby_3.4_rails61_postgres_sidekiq.gemfile.lock index 083f02824e6..a3795dddbcb 100644 --- a/gemfiles/ruby_3.4_rails61_postgres_sidekiq.gemfile.lock +++ b/gemfiles/ruby_3.4_rails61_postgres_sidekiq.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -285,6 +278,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -342,7 +336,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sprockets (< 4) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_rails61_semantic_logger.gemfile b/gemfiles/ruby_3.4_rails61_semantic_logger.gemfile index eb3d09a2613..6842d8876ea 100644 --- a/gemfiles/ruby_3.4_rails61_semantic_logger.gemfile +++ b/gemfiles/ruby_3.4_rails61_semantic_logger.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_rails61_semantic_logger.gemfile.lock b/gemfiles/ruby_3.4_rails61_semantic_logger.gemfile.lock index 739d739d381..29776284dd4 100644 --- a/gemfiles/ruby_3.4_rails61_semantic_logger.gemfile.lock +++ b/gemfiles/ruby_3.4_rails61_semantic_logger.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -270,6 +263,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -325,7 +319,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sprockets (< 4) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_rails61_trilogy.gemfile b/gemfiles/ruby_3.4_rails61_trilogy.gemfile index ebb99bceb42..f5aa9ddf483 100644 --- a/gemfiles/ruby_3.4_rails61_trilogy.gemfile +++ b/gemfiles/ruby_3.4_rails61_trilogy.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_rails61_trilogy.gemfile.lock b/gemfiles/ruby_3.4_rails61_trilogy.gemfile.lock index 0f3d03e4eb8..3417f522d57 100644 --- a/gemfiles/ruby_3.4_rails61_trilogy.gemfile.lock +++ b/gemfiles/ruby_3.4_rails61_trilogy.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -273,6 +266,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) trilogy (2.8.1) @@ -329,7 +323,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sprockets (< 4) - strscan! trilogy warning (~> 1) webmock (>= 3.10.0) diff --git a/gemfiles/ruby_3.4_rails7.gemfile b/gemfiles/ruby_3.4_rails7.gemfile index ce59672af11..182edfe9da3 100644 --- a/gemfiles/ruby_3.4_rails7.gemfile +++ b/gemfiles/ruby_3.4_rails7.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_rails7.gemfile.lock b/gemfiles/ruby_3.4_rails7.gemfile.lock index cadeb0f339a..23e47c46e81 100644 --- a/gemfiles/ruby_3.4_rails7.gemfile.lock +++ b/gemfiles/ruby_3.4_rails7.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -264,6 +257,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -316,7 +310,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_rails71.gemfile b/gemfiles/ruby_3.4_rails71.gemfile index d62f469a994..a3c36b665b3 100644 --- a/gemfiles/ruby_3.4_rails71.gemfile +++ b/gemfiles/ruby_3.4_rails71.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_rails71.gemfile.lock b/gemfiles/ruby_3.4_rails71.gemfile.lock index 1176a752d43..3bf31d83ce7 100644 --- a/gemfiles/ruby_3.4_rails71.gemfile.lock +++ b/gemfiles/ruby_3.4_rails71.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -292,6 +285,7 @@ GEM simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) stringio (3.1.1) + strscan (3.1.1) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -344,7 +338,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_rails_old_redis.gemfile b/gemfiles/ruby_3.4_rails_old_redis.gemfile index 3b67a2fe8da..27a681c7644 100644 --- a/gemfiles/ruby_3.4_rails_old_redis.gemfile +++ b/gemfiles/ruby_3.4_rails_old_redis.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_redis_3.gemfile b/gemfiles/ruby_3.4_redis_3.gemfile index 58da84c1f65..c12e260ce06 100644 --- a/gemfiles/ruby_3.4_redis_3.gemfile +++ b/gemfiles/ruby_3.4_redis_3.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_redis_3.gemfile.lock b/gemfiles/ruby_3.4_redis_3.gemfile.lock index a3996881bdc..379c806e722 100644 --- a/gemfiles/ruby_3.4_redis_3.gemfile.lock +++ b/gemfiles/ruby_3.4_redis_3.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -134,6 +127,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -177,7 +171,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_redis_4.gemfile b/gemfiles/ruby_3.4_redis_4.gemfile index 9abbb22f0f9..4720c68ece2 100644 --- a/gemfiles/ruby_3.4_redis_4.gemfile +++ b/gemfiles/ruby_3.4_redis_4.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_redis_4.gemfile.lock b/gemfiles/ruby_3.4_redis_4.gemfile.lock index e64ed262a78..8786579f576 100644 --- a/gemfiles/ruby_3.4_redis_4.gemfile.lock +++ b/gemfiles/ruby_3.4_redis_4.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -134,6 +127,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -177,7 +171,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_redis_5.gemfile b/gemfiles/ruby_3.4_redis_5.gemfile index d7d32251619..a68bb653459 100644 --- a/gemfiles/ruby_3.4_redis_5.gemfile +++ b/gemfiles/ruby_3.4_redis_5.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_redis_5.gemfile.lock b/gemfiles/ruby_3.4_redis_5.gemfile.lock index e372400cdf2..1d0286608d0 100644 --- a/gemfiles/ruby_3.4_redis_5.gemfile.lock +++ b/gemfiles/ruby_3.4_redis_5.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -138,6 +131,7 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -181,7 +175,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_relational_db.gemfile b/gemfiles/ruby_3.4_relational_db.gemfile index 1edd7a29e13..15035f00277 100644 --- a/gemfiles/ruby_3.4_relational_db.gemfile +++ b/gemfiles/ruby_3.4_relational_db.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_relational_db.gemfile.lock b/gemfiles/ruby_3.4_relational_db.gemfile.lock index 3afe5e5e690..0f9c10999b0 100644 --- a/gemfiles/ruby_3.4_relational_db.gemfile.lock +++ b/gemfiles/ruby_3.4_relational_db.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -212,7 +205,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sqlite3 (~> 1.4) - strscan! trilogy warning (~> 1) webmock (>= 3.10.0) diff --git a/gemfiles/ruby_3.4_resque2_redis3.gemfile b/gemfiles/ruby_3.4_resque2_redis3.gemfile index 441d2cec014..11a44bd90ea 100644 --- a/gemfiles/ruby_3.4_resque2_redis3.gemfile +++ b/gemfiles/ruby_3.4_resque2_redis3.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_resque2_redis3.gemfile.lock b/gemfiles/ruby_3.4_resque2_redis3.gemfile.lock index fa349354fab..2181d0b81d1 100644 --- a/gemfiles/ruby_3.4_resque2_redis3.gemfile.lock +++ b/gemfiles/ruby_3.4_resque2_redis3.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -158,6 +151,7 @@ GEM rack-protection (= 4.0.0) rack-session (>= 2.0.0, < 3) tilt (~> 2.0) + strscan (3.1.1) tilt (2.4.0) unicode-display_width (2.5.0) warning (1.4.0) @@ -203,7 +197,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_resque2_redis4.gemfile b/gemfiles/ruby_3.4_resque2_redis4.gemfile index 71b690f141b..1d97a21787a 100644 --- a/gemfiles/ruby_3.4_resque2_redis4.gemfile +++ b/gemfiles/ruby_3.4_resque2_redis4.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_resque2_redis4.gemfile.lock b/gemfiles/ruby_3.4_resque2_redis4.gemfile.lock index 8a64dc9b6e4..8480cc29f1e 100644 --- a/gemfiles/ruby_3.4_resque2_redis4.gemfile.lock +++ b/gemfiles/ruby_3.4_resque2_redis4.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -162,6 +155,7 @@ GEM rack-protection (= 4.0.0) rack-session (>= 2.0.0, < 3) tilt (~> 2.0) + strscan (3.1.1) tilt (2.4.0) unicode-display_width (2.5.0) warning (1.4.0) @@ -207,7 +201,6 @@ DEPENDENCIES rubocop-rspec (~> 2.20, < 2.21) simplecov! simplecov-cobertura (~> 2.1.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_sinatra_2.gemfile b/gemfiles/ruby_3.4_sinatra_2.gemfile index 5c157ea5e77..41fda663a9f 100644 --- a/gemfiles/ruby_3.4_sinatra_2.gemfile +++ b/gemfiles/ruby_3.4_sinatra_2.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_sinatra_2.gemfile.lock b/gemfiles/ruby_3.4_sinatra_2.gemfile.lock index 0ae275e47d7..7dd32ba1e29 100644 --- a/gemfiles/ruby_3.4_sinatra_2.gemfile.lock +++ b/gemfiles/ruby_3.4_sinatra_2.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -148,6 +141,7 @@ GEM rack (~> 2.2) rack-protection (= 2.2.4) tilt (~> 2.0) + strscan (3.1.1) tilt (2.4.0) unicode-display_width (2.5.0) warning (1.4.0) @@ -194,7 +188,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sinatra (~> 2) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_sinatra_3.gemfile b/gemfiles/ruby_3.4_sinatra_3.gemfile index 808a0a071a8..f0a164eb69b 100644 --- a/gemfiles/ruby_3.4_sinatra_3.gemfile +++ b/gemfiles/ruby_3.4_sinatra_3.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_sinatra_3.gemfile.lock b/gemfiles/ruby_3.4_sinatra_3.gemfile.lock index 5ac70a1ed5b..31412a6cf53 100644 --- a/gemfiles/ruby_3.4_sinatra_3.gemfile.lock +++ b/gemfiles/ruby_3.4_sinatra_3.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -149,6 +142,7 @@ GEM rack (~> 2.2, >= 2.2.4) rack-protection (= 3.2.0) tilt (~> 2.0) + strscan (3.1.1) tilt (2.4.0) unicode-display_width (2.5.0) warning (1.4.0) @@ -195,7 +189,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sinatra (~> 3) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_sinatra_4.gemfile b/gemfiles/ruby_3.4_sinatra_4.gemfile index dce6bd501f4..6a26ce80c7c 100644 --- a/gemfiles/ruby_3.4_sinatra_4.gemfile +++ b/gemfiles/ruby_3.4_sinatra_4.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_sinatra_4.gemfile.lock b/gemfiles/ruby_3.4_sinatra_4.gemfile.lock index aa6745e09aa..e85be404281 100644 --- a/gemfiles/ruby_3.4_sinatra_4.gemfile.lock +++ b/gemfiles/ruby_3.4_sinatra_4.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -152,6 +145,7 @@ GEM rack-protection (= 4.0.0) rack-session (>= 2.0.0, < 3) tilt (~> 2.0) + strscan (3.1.1) tilt (2.4.0) unicode-display_width (2.5.0) warning (1.4.0) @@ -198,7 +192,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) sinatra (~> 4) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_stripe_10.gemfile b/gemfiles/ruby_3.4_stripe_10.gemfile index 564e99d4354..73f9288292b 100644 --- a/gemfiles/ruby_3.4_stripe_10.gemfile +++ b/gemfiles/ruby_3.4_stripe_10.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_stripe_10.gemfile.lock b/gemfiles/ruby_3.4_stripe_10.gemfile.lock index 1152fca6317..6bb9b782b1b 100644 --- a/gemfiles/ruby_3.4_stripe_10.gemfile.lock +++ b/gemfiles/ruby_3.4_stripe_10.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -134,6 +127,7 @@ GEM simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) stripe (10.15.0) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -177,7 +171,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) stripe (~> 10) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_stripe_11.gemfile b/gemfiles/ruby_3.4_stripe_11.gemfile index 8744f24ffd2..549cf4f0f28 100644 --- a/gemfiles/ruby_3.4_stripe_11.gemfile +++ b/gemfiles/ruby_3.4_stripe_11.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_stripe_11.gemfile.lock b/gemfiles/ruby_3.4_stripe_11.gemfile.lock index 9a6bdc16caf..090dc7b61d3 100644 --- a/gemfiles/ruby_3.4_stripe_11.gemfile.lock +++ b/gemfiles/ruby_3.4_stripe_11.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -134,6 +127,7 @@ GEM simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) stripe (11.7.0) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -177,7 +171,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) stripe (~> 11) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_stripe_12.gemfile b/gemfiles/ruby_3.4_stripe_12.gemfile index 8a5eefa2e33..8040f2e5afe 100644 --- a/gemfiles/ruby_3.4_stripe_12.gemfile +++ b/gemfiles/ruby_3.4_stripe_12.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_stripe_12.gemfile.lock b/gemfiles/ruby_3.4_stripe_12.gemfile.lock index 511dde8abf7..cad39c3e5f5 100644 --- a/gemfiles/ruby_3.4_stripe_12.gemfile.lock +++ b/gemfiles/ruby_3.4_stripe_12.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -134,6 +127,7 @@ GEM simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) stripe (12.6.0) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -177,7 +171,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) stripe (~> 12) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_stripe_7.gemfile b/gemfiles/ruby_3.4_stripe_7.gemfile index aa0580743a2..f5212922ca1 100644 --- a/gemfiles/ruby_3.4_stripe_7.gemfile +++ b/gemfiles/ruby_3.4_stripe_7.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_stripe_7.gemfile.lock b/gemfiles/ruby_3.4_stripe_7.gemfile.lock index 8bf4aaf86fd..058c1577101 100644 --- a/gemfiles/ruby_3.4_stripe_7.gemfile.lock +++ b/gemfiles/ruby_3.4_stripe_7.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -134,6 +127,7 @@ GEM simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) stripe (7.1.0) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -177,7 +171,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) stripe (~> 7) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_stripe_8.gemfile b/gemfiles/ruby_3.4_stripe_8.gemfile index bf483a884d8..d589321c320 100644 --- a/gemfiles/ruby_3.4_stripe_8.gemfile +++ b/gemfiles/ruby_3.4_stripe_8.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_stripe_8.gemfile.lock b/gemfiles/ruby_3.4_stripe_8.gemfile.lock index acd8dd37ed8..a81bba9fae0 100644 --- a/gemfiles/ruby_3.4_stripe_8.gemfile.lock +++ b/gemfiles/ruby_3.4_stripe_8.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -134,6 +127,7 @@ GEM simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) stripe (8.7.0) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -177,7 +171,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) stripe (~> 8) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_stripe_9.gemfile b/gemfiles/ruby_3.4_stripe_9.gemfile index 555bae6e9ce..338036c8081 100644 --- a/gemfiles/ruby_3.4_stripe_9.gemfile +++ b/gemfiles/ruby_3.4_stripe_9.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_stripe_9.gemfile.lock b/gemfiles/ruby_3.4_stripe_9.gemfile.lock index 9e3ec1b1f0f..e62a943ea07 100644 --- a/gemfiles/ruby_3.4_stripe_9.gemfile.lock +++ b/gemfiles/ruby_3.4_stripe_9.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -134,6 +127,7 @@ GEM simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) stripe (9.4.0) + strscan (3.1.1) unicode-display_width (2.5.0) warning (1.4.0) webmock (3.23.1) @@ -177,7 +171,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) stripe (~> 9) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_stripe_latest.gemfile b/gemfiles/ruby_3.4_stripe_latest.gemfile index 32fde1e0507..dcf18e7238c 100644 --- a/gemfiles/ruby_3.4_stripe_latest.gemfile +++ b/gemfiles/ruby_3.4_stripe_latest.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_stripe_latest.gemfile.lock b/gemfiles/ruby_3.4_stripe_latest.gemfile.lock index db77568274b..1aca6905be3 100644 --- a/gemfiles/ruby_3.4_stripe_latest.gemfile.lock +++ b/gemfiles/ruby_3.4_stripe_latest.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -176,7 +169,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) stripe - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) diff --git a/gemfiles/ruby_3.4_stripe_min.gemfile b/gemfiles/ruby_3.4_stripe_min.gemfile index 7082d9f9cfd..bd90818d9c2 100644 --- a/gemfiles/ruby_3.4_stripe_min.gemfile +++ b/gemfiles/ruby_3.4_stripe_min.gemfile @@ -30,7 +30,6 @@ gem "rubocop-performance", "~> 1.9", require: false gem "rubocop-rspec", ["~> 2.20", "< 2.21"], require: false gem "simplecov", git: "https://github.com/DataDog/simplecov", ref: "3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db" gem "simplecov-cobertura", "~> 2.1.0" -gem "strscan", git: "https://github.com/ruby/strscan", ref: "041b15df4ccc067deabd85fd489b2c15961d0e2f" gem "warning", "~> 1" gem "webmock", ">= 3.10.0" gem "webrick", ">= 1.8.2" diff --git a/gemfiles/ruby_3.4_stripe_min.gemfile.lock b/gemfiles/ruby_3.4_stripe_min.gemfile.lock index e3c6d1caa72..a0db08d178c 100644 --- a/gemfiles/ruby_3.4_stripe_min.gemfile.lock +++ b/gemfiles/ruby_3.4_stripe_min.gemfile.lock @@ -8,13 +8,6 @@ GIT simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) -GIT - remote: https://github.com/ruby/strscan - revision: 041b15df4ccc067deabd85fd489b2c15961d0e2f - ref: 041b15df4ccc067deabd85fd489b2c15961d0e2f - specs: - strscan (3.1.1) - PATH remote: .. specs: @@ -176,7 +169,6 @@ DEPENDENCIES simplecov! simplecov-cobertura (~> 2.1.0) stripe (= 5.15.0) - strscan! warning (~> 1) webmock (>= 3.10.0) webrick (>= 1.8.2) From cb788d79f4cc04801a1e188bef312e680d5d3d0a Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 7 Jan 2025 16:27:11 -0500 Subject: [PATCH 43/43] add hardcoded update workflow file --- .github/scripts/find_gem_version_bounds.rb | 19 +++++++++++++++++++ .../workflows/generate-supported-versions.yml | 3 --- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/scripts/find_gem_version_bounds.rb b/.github/scripts/find_gem_version_bounds.rb index 3a863747d0e..93daee54981 100644 --- a/.github/scripts/find_gem_version_bounds.rb +++ b/.github/scripts/find_gem_version_bounds.rb @@ -24,6 +24,7 @@ def initialize(directory: 'gemfiles/', contrib_dir: 'lib/datadog/tracing/contrib def process parse_gemfiles process_integrations + include_hardcoded_versions write_output end @@ -111,6 +112,24 @@ def process_integrations end end + def include_hardcoded_versions + # `httpx` is maintained externally + @integration_json_mapping['httpx'] = [ + '0.11', # Min version Ruby + '0.11', # Max version Ruby + nil, # Min version JRuby + nil # Max version JRuby + ] + + # `makara` is part of `activerecord` + @integration_json_mapping['makara'] = [ + '0.3.5', # Min version Ruby + '0.3.5', # Max version Ruby + nil, # Min version JRuby + nil # Max version JRuby + ] + end + def resolve_integration_name(integration) mod_name = SPECIAL_CASES[integration] || integration.split('_').map(&:capitalize).join module_name = "Datadog::Tracing::Contrib::#{mod_name}" diff --git a/.github/workflows/generate-supported-versions.yml b/.github/workflows/generate-supported-versions.yml index 54de441b557..ae64be78c6f 100644 --- a/.github/workflows/generate-supported-versions.yml +++ b/.github/workflows/generate-supported-versions.yml @@ -1,9 +1,6 @@ name: "Generate Supported Versions" on: - push: - branches: - - quinna.halim/add-supported-versions-table workflow_dispatch: