Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/lock-dependency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
matrix:
engine:
# ADD NEW RUBIES HERE
- name: ruby
version: '3.5'
- name: ruby
version: '3.4'
- name: ruby
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- '3.2'
- '3.3'
- '3.4'
- '3.5'
# ADD NEW RUBIES HERE
name: Test (${{ matrix.os }}, ${{ matrix.ruby }})
runs-on: ${{ matrix.os }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-yjit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- '3.2'
- '3.3'
- '3.4'
- '3.5'
# ADD NEW RUBIES HERE
rubyopt:
- '--yjit'
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ concurrency:
cancel-in-progress: "${{ github.ref != 'refs/heads/master' }}"

jobs:
# ADD NEW RUBIES HERE
ruby-35:
name: "Ruby 3.5"
uses: ./.github/workflows/_unit_test.yml
with:
engine: ruby
version: "3.5"
alias: ruby-35

ruby-34:
name: "Ruby 3.4"
uses: ./.github/workflows/_unit_test.yml
Expand Down Expand Up @@ -127,6 +136,8 @@ jobs:
DD_SERVICE: dd-trace-rb
DD_GIT_REPOSITORY_URL: "${{ github.repositoryUrl }}"
needs:
# ADD NEW RUBIES HERE
- ruby-35
- ruby-34
- ruby-33
- ruby-32
Expand Down Expand Up @@ -171,6 +182,8 @@ jobs:
name: dd/coverage
runs-on: ubuntu-24.04
needs:
# ADD NEW RUBIES HERE
- ruby-35
- ruby-34
- ruby-33
- ruby-32
Expand Down Expand Up @@ -208,6 +221,8 @@ jobs:
name: Unit Tests (complete)
runs-on: ubuntu-24.04
needs:
# ADD NEW RUBIES HERE
- ruby-35
- ruby-34
- ruby-33
- ruby-32
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-latest-dependency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
matrix:
engine:
# ADD NEW RUBIES HERE
- name: ruby
version: '3.5'
- name: ruby
version: '3.4'
- name: ruby
Expand Down
6 changes: 4 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ default:
parallel:
matrix:
# ADD NEW RUBIES HERE
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
- RUBY_VERSION: ["3.5", "3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
script:
- >
docker build
Expand Down Expand Up @@ -71,7 +71,7 @@ promote-image:
parallel:
matrix:
# ADD NEW RUBIES HERE
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
- RUBY_VERSION: ["3.5", "3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
ARCHITECTURE: ["amd64", "arm64"]
script:
- docker pull $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCHITECTURE:$CI_PIPELINE_ID
Expand Down Expand Up @@ -109,6 +109,8 @@ install-dependencies:
tags: ["arch:$ARCH"]
parallel:
matrix:
# ADD NEW RUBIES HERE
# TODO: Ruby 3.5 - Not added here yet to avoid increasing SSI OCI image size and adding premature support for 3.5.
- RUBY_VERSION: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
ARCH: ["amd64", "arm64"]
stage: package
Expand Down
1 change: 1 addition & 0 deletions .gitlab/Dockerfile-3.5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM ghcr.io/datadog/images-rb/engines/ruby:3.5-centos-gcc
341 changes: 175 additions & 166 deletions Matrixfile

Large diffs are not rendered by default.

196 changes: 196 additions & 0 deletions appraisal/ruby-3.5.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
appraise 'rails7' do
gem 'rails', '~> 7.0.0'
end

appraise 'rails71' do
gem 'rails', '~> 7.1.0'
end

appraise 'rails8-mysql2' do
gem 'rails', '~> 8.0.0'
gem 'mysql2', '~> 0.5', platform: :ruby
gem 'lograge', '~> 0.11'
gem 'net-smtp'
end

appraise 'rails8-postgres' do
gem 'rails', '~> 8.0.0'
gem 'pg', '>= 1.1', platform: :ruby
gem 'lograge', '~> 0.11'
gem 'net-smtp'
end

appraise 'rails8-postgres-redis' do
gem 'rails', '~> 8.0.0'
gem 'pg', '>= 1.1', platform: :ruby
gem 'redis', '~> 4'
gem 'lograge', '~> 0.11'
gem 'net-smtp'
end

appraise 'rails8-postgres-sidekiq' do
gem 'rails', '~> 8.0.0'
gem 'pg', '>= 1.1', platform: :ruby
gem 'sidekiq', '~> 8'
gem 'lograge', '~> 0.11'
gem 'rails_semantic_logger', '~> 4.0'
gem 'net-smtp'
end

appraise 'rails8-semantic-logger' do
gem 'rails', '~> 8.0.0'
gem 'pg', '>= 1.1', platform: :ruby
gem 'rails_semantic_logger', '~> 4.0'
gem 'net-smtp'
end

appraise 'rails8-trilogy' do
gem 'rails', '~> 8.0.0'
gem 'trilogy'
gem 'sprockets', '< 4'
gem 'lograge', '~> 0.11'
gem 'net-smtp'
end

appraise 'rails-old-redis' do
# All dependencies except Redis < 4 are not important, they are just required to run Rails tests.
gem 'redis', '< 4'
gem 'rails', '~> 6.1.0'
gem 'pg', '>= 1.1', platform: :ruby
gem 'sprockets', '< 4'
gem 'lograge', '~> 0.11'
end

appraise 'resque2-redis3' do
gem 'redis', '< 4.0'
gem 'resque', '>= 2.0'
end

appraise 'resque2-redis4' do
gem 'redis', '>= 4.0'
gem 'resque', '>= 2.0'
end

appraise 'aws' do
gem 'aws-sdk'
gem 'shoryuken'
gem 'ostruct'
end

appraise 'http' do
gem 'ethon'
gem 'http'
gem 'httpclient'
gem 'typhoeus'
end

build_coverage_matrix('stripe', 7..12, min: '5.15.0')
build_coverage_matrix('opensearch', [2], gem: 'opensearch-ruby')
build_coverage_matrix('elasticsearch', [7])
build_coverage_matrix('faraday')
build_coverage_matrix('excon')
build_coverage_matrix('rest-client')
build_coverage_matrix('mongo', min: '2.20.0')
build_coverage_matrix('dalli', [2])
build_coverage_matrix('karafka', min: '2.3.0')
build_coverage_matrix('devise', min: '3.2.1')

appraise 'relational_db' do
# ActiveRecord locked because tests are failing with 7.1, which was attempted as a part of Ruby 3.4 testing in CI.
# All existing relational_db configurations use ActiveRecord 7.0. ActiveRecord 7.1 is tested as a part of rails71
# appraisal configurations. The latest version of sqlite3 (i.e. 2+) requires ActiveRecord 7.1, so sqlite3 version
# has been locked as well.
#
# TODO: Repair the failures with ActiveRecord 7.1 in this configuration and remove the locked version.
# TODO: After ActiveRecord is upgraded to 7.1+, sqlite3 can be unlocked as well.
gem 'activerecord', '~> 7.0.0'
gem 'delayed_job'
gem 'delayed_job_active_record'
gem 'makara', '>= 0.6.0.pre' # Ruby 3 requires >= 0.6.0, which is currently in pre-release: https://rubygems.org/gems/makara/versions
gem 'mysql2', '>= 0.5.3', platform: :ruby
gem 'pg', platform: :ruby
gem 'sqlite3', '~> 1.4', platform: :ruby
gem 'sequel'
gem 'trilogy'
end

appraise 'activesupport' do
gem 'activesupport', '~> 7'
gem 'actionpack'
gem 'actionview'
gem 'active_model_serializers', '>= 0.10.0'
gem 'grape'
gem 'lograge'
gem 'racecar', '>= 0.3.5'
gem 'ruby-kafka', '>= 0.7.10'
end

appraise 'contrib' do
gem 'concurrent-ruby'
gem 'rack-test' # Dev dependencies for testing rack-based code
gem 'rake', '>= 12.3'
gem 'resque'
gem 'roda', '>= 2.0.0'
gem 'semantic_logger', '~> 4.0'
# Note: Sidekiq 8 uses different timestamp formatting compared to prior versions. As long as
# versions <8 are supported, make sure there's some CI running both older and newer versions.
gem 'sidekiq', '~> 8'
gem 'sneakers', '>= 2.12.0'
gem 'sucker_punch'
gem 'que', '>= 1.0.0'

# When Rack 3+ is used, we need rackup.
gem 'rackup'
end

[
'2.3',
'2.2',
'2.1',
'2.0',
'1.13',
].each do |v|
appraise "graphql-#{v}" do
gem 'rails', '~> 6.1.0'
gem 'graphql', "~> #{v}.0"
gem 'sprockets', '< 4'
gem 'lograge', '~> 0.11'
gem 'mutex_m', '>= 0.1.0'
end
end

build_coverage_matrix('redis', [3, 4])
build_coverage_matrix('rack', [2], meta: { 'rack-contrib' => nil, 'rack-test' => nil })

[2, 3, 4].each do |n|
appraise "sinatra-#{n}" do
gem 'sinatra', "~> #{n}"
gem 'sinatra-contrib', "~> #{n}"
gem 'rack-contrib'
gem 'rack-test' # Dev dependencies for testing rack-based code
end
end

appraise 'opentelemetry' do
gem 'opentelemetry-sdk', '~> 1.1'
end

appraise 'opentelemetry_otlp' do
gem 'opentelemetry-api', '< 1.5' # Context is kept in `Thread.current#[]`
gem 'opentelemetry-sdk', '~> 1.1'
gem 'opentelemetry-exporter-otlp'
end

appraise 'opentelemetry_otlp_1_5' do
gem 'opentelemetry-api', '>= 1.5' # Context is kept as instance variable in `Fiber.current`
gem 'opentelemetry-sdk', '~> 1.1'
gem 'opentelemetry-exporter-otlp'
end

appraise 'contrib-old' do
gem 'presto-client', '>= 0.5.14' # Renamed to trino-client in >= 1.0
end

appraise 'core-old' do
gem 'dogstatsd-ruby', '~> 4'
end
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,23 @@ services:
- extension-build-tmp:/app/tmp
- bundle-3.4:/usr/local/bundle
- "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}"
tracer-3.5:
image: ghcr.io/datadog/images-rb/engines/ruby:3.5-gnu-gcc
working_dir: /app
command: /bin/bash
depends_on: *common-depends-on
links: *common-links
env_file: ./.env
environment:
<<: *common-environment
BUNDLE_GEMFILE: /app/ruby-3.5.gemfile
stdin_open: true
tty: true
volumes:
- .:/app
- extension-build-tmp:/app/tmp
- bundle-3.5:/usr/local/bundle
- "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}"
# ADD NEW RUBIES HERE
tracer-jruby-9.2:
image: ghcr.io/datadog/images-rb/engines/jruby:9.2-gnu-gcc
Expand Down Expand Up @@ -327,6 +344,7 @@ volumes:
bundle-3.2:
bundle-3.3:
bundle-3.4:
bundle-3.5:
# ADD NEW RUBIES HERE
bundle-jruby-9.2:
bundle-jruby-9.3:
Expand Down
1 change: 1 addition & 0 deletions docs/Compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The Ruby Datadog Trace library is open source. See the [dd-trace-rb][1] GitHub r

### Supported Ruby interpreters

<!-- Ensure that all "# TODO: Ruby 3.5 - " comments are addressed before including 3.5 in our public support docs -->
| Type | Documentation | Version | Support type | Gem version support |
|-------|----------------------------|-----------|---------------------------|---------------------|
| MRI | https://www.ruby-lang.org/ | 3.4 | [latest](#support-latest) | Latest |
Expand Down
50 changes: 50 additions & 0 deletions gemfiles/ruby_3.5_activesupport.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading