Skip to content
Open
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 @@ -60,6 +60,8 @@ jobs:
version: '9.3'
- name: jruby
version: '9.2'
- name: jruby
version: '10.0'
container:
image: ghcr.io/datadog/images-rb/engines/${{ matrix.engine.name }}:${{ matrix.engine.version }}-gnu-gcc
env:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ jobs:
version: "2.5"
alias: ruby-25

jruby-100:
name: "JRuby 10.0"
uses: ./.github/workflows/_unit_test.yml
with:
engine: jruby
version: "10.0"
alias: jruby-100

jruby-94:
name: "JRuby 9.4"
uses: ./.github/workflows/_unit_test.yml
Expand Down Expand Up @@ -146,6 +154,7 @@ jobs:
- ruby-27
- ruby-26
- ruby-25
- jruby-100
- jruby-94
- jruby-93
- jruby-92
Expand Down Expand Up @@ -192,6 +201,7 @@ jobs:
- ruby-27
- ruby-26
- ruby-25
- jruby-100
- jruby-94
- jruby-93
- jruby-92
Expand Down Expand Up @@ -231,6 +241,7 @@ jobs:
- ruby-27
- ruby-26
- ruby-25
- jruby-100
- jruby-94
- jruby-93
- jruby-92
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 @@ -46,6 +46,8 @@ jobs:
version: '9.3'
- name: jruby
version: '9.2'
- name: jruby
version: '10.0'
container:
image: ghcr.io/datadog/images-rb/engines/${{ matrix.engine.name }}:${{ matrix.engine.version }}-gnu-gcc
steps:
Expand Down
6 changes: 4 additions & 2 deletions Matrixfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@
'activesupport' => '✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ✅ jruby'
},
'mongodb' => {
'mongo-latest' => '✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ✅ jruby',
'mongo-min' => '✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ✅ jruby',
# MongoDB does not support JRuby 10.0, which fails on an error related the bson_ruby NativeService for latest versions.
# https://github.com/mongodb/mongo-ruby-driver#mongodb-ruby-driver
'mongo-latest' => '✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ✅ jruby / ❌ jruby 10.0',
'mongo-min' => '✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ✅ jruby / ❌ jruby 10.0',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm stuck on how to properly skip JRuby 10.0 for mongodb tests (see also the tasks/runtime_matcher.rb file), or if that's even the right way to go. JRuby 10.0 fails with the latest version 2.21.3 with an error related to:

Failure/Error: Unable to find org.bson_ruby.NativeService.basicLoad(NativeService.java to read failed line

Java::JavaLang::NoSuchMethodError:
  'org.jruby.RubyModule org.jruby.Ruby.fastGetModule(java.lang.String)'...

Given the lack of support, I propose to skip these tests, but I'm not sure how best to skip them. What am I missing?

},
'mysql2' => {
'relational_db' => '✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ❌ jruby'
Expand Down
2 changes: 1 addition & 1 deletion appraisal/generate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# This implementation provides a much easier interface to customize our needs,
# while still using the same Appraisal formatting.
#
# For example, it solves the incompatbility of `eval_gemfile` from `Bundler::DSL`
# For example, it solves the incompatibility of `eval_gemfile` from `Bundler::DSL`
#
# Usage: `bundle exec ruby appraisal/generate.rb`

Expand Down
166 changes: 166 additions & 0 deletions appraisal/jruby-10.0.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
appraise 'rails61-mysql2' do
gem 'rails', '~> 6.1.0'
gem 'activerecord-jdbcmysql-adapter', '~> 61.0', platform: :jruby
gem 'sprockets', '< 4'
gem 'lograge', '~> 0.11'
gem 'net-smtp'
end

appraise 'rails61-postgres' do
gem 'rails', '~> 6.1.0'
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
gem 'sprockets', '< 4'
gem 'lograge', '~> 0.11'
gem 'net-smtp'
end

appraise 'rails61-postgres-redis' do
gem 'rails', '~> 6.1.0'
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
gem 'redis', '~> 4'
gem 'sprockets', '< 4'
gem 'lograge', '~> 0.11'
gem 'net-smtp'
end

appraise 'rails61-postgres-sidekiq' do
gem 'rails', '~> 6.1.0'
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
gem 'sidekiq', '>= 6.1.2'
gem 'sprockets', '< 4'
gem 'lograge', '~> 0.11'
gem 'rails_semantic_logger', '~> 4.0'
gem 'net-smtp'
end

appraise 'rails61-semantic-logger' do
gem 'rails', '~> 6.1.0'
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
gem 'sprockets', '< 4'
gem 'rails_semantic_logger', '~> 4.0'
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 'activerecord-jdbcpostgresql-adapter', platform: :jruby
gem 'sprockets', '< 4'
gem 'lograge', '~> 0.11'
gem 'net-smtp'
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', '~> 4' # TODO: Completely broken with this JRuby version, this has not be validate on CI
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('dalli', [2])
build_coverage_matrix('karafka', min: '2.3.0')

appraise 'karafka-min' do
gem 'karafka', '= 2.3.0'
end

# NOTE: JRuby bundler failed to install some dependencies https://github.com/ruby/psych/issues/700
# and it could be re-enabled when upstream fix the issue
# build_coverage_matrix('devise', min: '3.2.1')

appraise 'relational_db' do
gem 'activerecord', '~> 6.1.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 'activerecord-jdbcmysql-adapter', '~> 61.0', platform: :jruby
gem 'activerecord-jdbcpostgresql-adapter', '~> 61.0', platform: :jruby
gem 'sequel'
gem 'jdbc-sqlite3', '>= 3.28', platform: :jruby
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 'rackup'
gem 'rake', '>= 12.3'
gem 'resque'
gem 'roda', '>= 2.0.0'
gem 'semantic_logger', '~> 4.0'
gem 'sidekiq', '~> 7'
gem 'sneakers', '>= 2.12.0'
gem 'sucker_punch'
gem 'que', '>= 1.0.0'
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'
end
end

build_coverage_matrix('redis', [3, 4])
build_coverage_matrix('rack', 1..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 '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

17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,22 @@ services:
- .:/app
- bundle-jruby-9.4:/usr/local/bundle
- "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}"
tracer-jruby-10.0:
image: ghcr.io/datadog/images-rb/engines/jruby:10.0-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/jruby-10.0.gemfile
stdin_open: true
tty: true
volumes:
- .:/app
- bundle-jruby-10.0:/usr/local/bundle
- "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}"
ddagent:
image: datadog/agent
environment:
Expand Down Expand Up @@ -349,6 +365,7 @@ volumes:
bundle-jruby-9.2:
bundle-jruby-9.3:
bundle-jruby-9.4:
bundle-jruby-10.0:
ddagent_var_run:
# Temporary folder used while compiling the profiling native extension. We place this in a volume to avoid the
# massive performance hit (seconds to minutes) that we get when the tmp folder is shared with the host on macOS.
Expand Down
44 changes: 44 additions & 0 deletions gemfiles/jruby_10.0_activesupport.gemfile

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

Loading
Loading