Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC:Remove devtools from main gem set #2421

Closed
wants to merge 7 commits into from
Closed
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
43 changes: 30 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ test_containers:
description: Use latest version of dependencies during testing
type: boolean
default: false
bundle_with:
description: Sets the BUNDLE_WITH environment variable to install optional gems
type: string
default: ''
resource_class: <<parameters.resource_class_to_use>>
- &container_base_environment
BUNDLE_GEMFILE: /app/Gemfile
Expand Down Expand Up @@ -206,10 +210,16 @@ orbs:
- *step_compute_bundle_checksum
- restore_cache:
keys:
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.bundle_with>>-REMOVEME-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.bundle_with>>-REMOVEME-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.bundle_with>>-REMOVEME-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}
- *check_exact_bundle_cache_hit
- when:
condition: << parameters.bundle_with >>
steps:
- run:
name: Install optional gem groups from the top-level Gemfile
command: echo 'export BUNDLE_WITH=<<parameters.bundle_with>>' >> $BASH_ENV
- *step_bundle_install
- when:
condition:
Expand All @@ -218,8 +228,10 @@ orbs:
- *step_appraisal_update # Run on latest version of all gems we integrate with
- when:
condition:
not:
equal: [ << parameters.edge >>, true ]
and:
- not: << parameters.bundle_with >>
- not:
equal: [ << parameters.edge >>, true ]
steps:
- *step_appraisal_install # Run on a stable set of gems we integrate with
- *save_bundle_checksum
Expand All @@ -228,7 +240,7 @@ orbs:
paths:
- /app
- save_cache:
key: bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
key: bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.bundle_with>>-REMOVEME-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
paths:
- /usr/local/bundle
build_and_test_integration:
Expand Down Expand Up @@ -280,7 +292,7 @@ orbs:
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
- restore_cache:
keys:
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.bundle_with>>-REMOVEME-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- run:
name: Set coverage report directory
command: |
Expand Down Expand Up @@ -325,7 +337,7 @@ orbs:
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
- restore_cache:
keys:
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.bundle_with>>-REMOVEME-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- run:
name: Run Benchmark
command: bundle exec appraisal rails5-postgres-sidekiq ruby benchmarks/sidekiq_test.rb 2>&1 1> /dev/null | tee benchmark_results.csv
Expand All @@ -340,7 +352,7 @@ orbs:
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
- restore_cache:
keys:
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.bundle_with>>-REMOVEME-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- *step_rubocop
sorbet_type_checker:
<<: *test_job_default
Expand All @@ -350,7 +362,7 @@ orbs:
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
- restore_cache:
keys:
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.bundle_with>>-REMOVEME-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- *step_sorbet_type_checker
coverage:
<<: *test_job_default
Expand All @@ -360,7 +372,7 @@ orbs:
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
- restore_cache:
keys:
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.bundle_with>>-REMOVEME-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- attach_workspace:
at: /tmp/workspace
- run:
Expand All @@ -383,7 +395,7 @@ orbs:
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
- restore_cache:
keys:
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<<parameters.bundle_with>>-REMOVEME-<<parameters.ruby_version>>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }}
- attach_workspace:
at: /tmp/workspace
- run:
Expand Down Expand Up @@ -561,8 +573,9 @@ workflows:
- orb/lint:
<<: *config-2_7-small
name: lint
bundle_with: check
requires:
- build-2.7
- build-lint
- orb/sorbet_type_checker:
<<: *config-2_7-small
name: sorbet_type_checker
Expand Down Expand Up @@ -706,6 +719,10 @@ workflows:
- orb/build:
<<: *config-2_7
name: build-2.7
- orb/build:
<<: *config-2_7
name: build-lint
bundle_with: check
- orb/test:
<<: *config-2_7
name: test-2.7
Expand Down
9 changes: 9 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ if ruby_version?('2.1')
gem 'makara', '< 0.5.0' # >= 0.5.0 contain Ruby 2.3+ syntax
gem 'mongo', '< 2.5'
gem 'mysql2', '0.3.21'
gem 'opentracing', '>= 0.4.1'
gem 'pg', '>= 0.18.4', '< 1.0'
gem 'rack', '1.4.7'
gem 'rack-contrib'
Expand Down Expand Up @@ -307,6 +308,7 @@ elsif ruby_version?('2.2')
gem 'makara', '< 0.5.0' # >= 0.5.0 contain Ruby 2.3+ syntax
gem 'mongo', '>= 2.8.0'
gem 'mysql2', '< 0.5'
gem 'opentracing', '>= 0.4.1'
gem 'pg', '>= 0.18.4'
gem 'presto-client', '>= 0.5.14'
gem 'racecar', '>= 0.3.5'
Expand Down Expand Up @@ -506,6 +508,7 @@ elsif ruby_version?('2.3')
gem 'makara'
gem 'mongo', '>= 2.8.0', '< 2.15.0' # TODO: FIX TEST BREAKAGES ON >= 2.15 https://github.com/DataDog/dd-trace-rb/issues/1596
gem 'mysql2', '< 0.5'
gem 'opentracing', '>= 0.4.1'
gem 'pg', '>= 0.18.4'
gem 'racecar', '>= 0.3.5'
gem 'rack', '< 2.1.0' # Locked due to grape incompatibility: https://github.com/ruby-grape/grape/issues/1980
Expand Down Expand Up @@ -638,6 +641,7 @@ elsif ruby_version?('2.4')
gem 'makara'
gem 'mongo', '>= 2.8.0', '< 2.15.0' # TODO: FIX TEST BREAKAGES ON >= 2.15 https://github.com/DataDog/dd-trace-rb/issues/1596
gem 'mysql2', '< 0.5'
gem 'opentracing', '>= 0.4.1'
gem 'pg', '>= 0.18.4'
gem 'racecar', '>= 0.3.5'
gem 'rack'
Expand Down Expand Up @@ -901,6 +905,7 @@ elsif ruby_version?('2.5')
gem 'activerecord-jdbcmysql-adapter', '>= 60.2', platform: :jruby
gem 'pg', '>= 0.18.4', platform: :ruby
gem 'activerecord-jdbcpostgresql-adapter', '>= 60.2', platform: :jruby
gem 'opentracing', '>= 0.4.1'
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
Expand Down Expand Up @@ -1148,6 +1153,7 @@ elsif ruby_version?('2.6')
gem 'activerecord-jdbcmysql-adapter', platform: :jruby
gem 'pg', '>= 0.18.4', platform: :ruby
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
gem 'opentracing', '>= 0.4.1'
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
Expand Down Expand Up @@ -1376,6 +1382,7 @@ elsif ruby_version?('2.7')
gem 'mongo', '>= 2.8.0', '< 2.15.0' # TODO: FIX TEST BREAKAGES ON >= 2.15 https://github.com/DataDog/dd-trace-rb/issues/1596
gem 'mysql2', '< 1', platform: :ruby
gem 'pg', '>= 0.18.4', platform: :ruby
gem 'opentracing', '>= 0.4.1'
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
Expand Down Expand Up @@ -1507,6 +1514,7 @@ elsif ruby_version?('3.0') || ruby_version?('3.1')
gem 'activerecord-jdbcmysql-adapter', platform: :jruby
gem 'pg', platform: :ruby
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
gem 'opentracing', '>= 0.4.1'
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
Expand Down Expand Up @@ -1638,6 +1646,7 @@ elsif ruby_version?('3.2')
gem 'mongo', '>= 2.8.0', '< 2.15.0' # TODO: FIX TEST BREAKAGES ON >= 2.15 https://github.com/DataDog/dd-trace-rb/issues/1596
# gem 'mysql2', '>= 0.5.3', platform: :ruby # broken on Ruby 3.2.0-preview1
gem 'pg', '>= 1.1', platform: :ruby
gem 'opentracing', '>= 0.4.1'
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
Expand Down
Loading