Skip to content

Commit

Permalink
Merge branch 'master' into feature/sinatra-rack
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCTHsu committed Oct 20, 2022
2 parents 20b24e5 + 25a23c2 commit cf11e06
Show file tree
Hide file tree
Showing 514 changed files with 11,505 additions and 4,855 deletions.
36 changes: 17 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ job_configuration:
- &config-3_2
<<: *filters_all_branches_and_tags
ruby_version: '3.2'
image: ivoanjo/docker-library:ddtrace_rb_3_2_0_preview1
image: ivoanjo/docker-library:ddtrace_rb_3_2_0_preview2
resource_class_to_use: medium+
# ADD NEW RUBIES HERE
- &config-jruby-9_2_8_0 # Test with older 9.2 release because 9.2.9.0 changed behavior, see https://github.com/DataDog/dd-trace-rb/pull/1409
Expand Down Expand Up @@ -630,14 +630,14 @@ workflows:
integration_apps: 'rack rails-six rails-seven sinatra2-classic sinatra2-modular'
ruby_version: '3.1'
<<: *filters_all_branches_and_tags
# TODO: Re-enable once 3.2 testing is green!
# - orb/build_and_test_integration:
# name: build_and_test_integration-3.2
# integration_apps: 'rack rails-six rails-seven'
# ruby_version: '3.2'
# <<: *filters_all_branches_and_tags
- orb/build_and_test_integration:
name: build_and_test_integration-3.2
integration_apps: 'rack rails-six rails-seven sinatra2-classic sinatra2-modular'
ruby_version: '3.2'
<<: *filters_all_branches_and_tags
# ⬆️ **Note**: If add/remove test apps above, remember to also copy-paste the changes to the "edge" workflow further down the file.
#
# ADD NEW RUBIES HERE
# MRI
- orb/build:
<<: *config-2_1
name: build-2.1
Expand Down Expand Up @@ -842,32 +842,30 @@ workflows:
<<: *filters_all_branches_and_tags
- orb/build_and_test_integration:
name: build_and_test_integration-2.6
integration_apps: 'rack rails-five rails-six'
integration_apps: 'rack rails-five rails-six sinatra2-classic sinatra2-modular'
ruby_version: '2.6'
<<: *filters_all_branches_and_tags
- orb/build_and_test_integration:
name: build_and_test_integration-2.7
integration_apps: 'rack rails-five rails-six rails-seven'
integration_apps: 'rack rails-five rails-six rails-seven sinatra2-classic sinatra2-modular'
ruby_version: '2.7'
<<: *filters_all_branches_and_tags
- orb/build_and_test_integration:
name: build_and_test_integration-3.0
integration_apps: 'rack rails-six rails-seven'
integration_apps: 'rack rails-six rails-seven sinatra2-classic sinatra2-modular'
ruby_version: '3.0'
<<: *filters_all_branches_and_tags
- orb/build_and_test_integration:
name: build_and_test_integration-3.1
integration_apps: 'rack rails-six rails-seven'
integration_apps: 'rack rails-six rails-seven sinatra2-classic sinatra2-modular'
ruby_version: '3.1'
<<: *filters_all_branches_and_tags
# TODO: Re-enable once 3.2 testing is green!
# - orb/build_and_test_integration:
# name: build_and_test_integration-3.2
# integration_apps: 'rack rails-six rails-seven'
# ruby_version: '3.2'
# <<: *filters_all_branches_and_tags
- orb/build_and_test_integration:
name: build_and_test_integration-3.2
integration_apps: 'rack rails-six rails-seven sinatra2-classic sinatra2-modular'
ruby_version: '3.2'
<<: *filters_all_branches_and_tags
# ADD NEW RUBIES HERE
# MRI
- orb/build:
<<: *config-2_1
name: build-2.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This image supports multiple platforms, see README for build instructions

FROM ruby:3.2.0-preview1-bullseye
FROM ruby:3.2.0-preview2-bullseye

# Make apt non-interactive
RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \
Expand Down
45 changes: 45 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Configuration for GitHub Action `.github/workflows/pull-request-labeler.yml`.
# See https://github.com/marketplace/actions/labeler for more information.

core:
- any: [ 'lib/datadog/core/**' ]

# Only documentation changes
docs:
- all: [ '**/*.md' ]

# Only test changes
dev/testing:
- all: [ '{spec/**,integration/**,benchmarks/**,sorbet/**}' ]

# Changes to Profiling
profiling:
- any: [ '{lib/datadog/profiling/**,ext/ddtrace_profiling_loader/**,ext/ddtrace_profiling_native_extension/**}' ]

# Changes to CI-App
ci-app:
- any: [ 'lib/datadog/ci/**' ]

# Changes to ASM
appsec:
- any: [ 'lib/datadog/appsec/**' ]

# Changes to Tracing
tracing:
- any: [ 'lib/datadog/tracing/**' ]

# Changes to Tracing integrations
integrations:
- any: [ '{lib/datadog/tracing/contrib/**,lib/datadog/appsec/contrib/**}' ]

# Only repository GitHub changes
dev/github:
- all: [ '.github/**' ]

# Only repository CI changes
dev/ci:
- all: [ '{.circleci/**,.gitlab-ci.yml}' ]

# Version bump pull request
release:
- all: [ '{CHANGELOG.md,lib/ddtrace/version.rb}' ]
16 changes: 16 additions & 0 deletions .github/workflows/pull-request-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Pull Request Labeler"
on:
- pull_request_target

jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: kachkaev/labeler@d89797c51d07680aec17049cc6790e9d323d9a93 # actions/labeler@v4 + https://github.com/actions/labeler/pull/316
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
dot: true # From https://github.com/actions/labeler/pull/316
9 changes: 5 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ AllCops:
- 'lib/datadog/**/vendor/**/*.rb'
- 'integration/apps/*/bin/*'
- 'integration/apps/*/Gemfile'
- 'integration/apps/hanami/Rakefile'
- 'lib/datadog/profiling/pprof/pprof_pb.rb'
- 'spec/**/**/interesting_backtrace_helper.rb' # This file needs quite a few bizarre code patterns by design
NewCops: disable # Don't allow new cops to be enabled implicitly.
Expand Down Expand Up @@ -61,7 +62,7 @@ Style/NumericLiterals:
Enabled: false

Metrics/ClassLength:
Max: 140
Enabled: false

Metrics/BlockLength:
Max: 42
Expand All @@ -70,8 +71,7 @@ Metrics/BlockLength:
- spec/**/*

Metrics/ModuleLength:
Exclude:
- spec/**/*
Enabled: false

Metrics/ParameterLists:
Enabled: false
Expand Down Expand Up @@ -124,8 +124,9 @@ Lint/EmptyClass: # (new in 1.3)
Enabled: true
Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
Enabled: true
# Prevents `return` in an assignment block `var = begin; return; end` block.
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
Enabled: true
Enabled: false
Lint/NumberedParameterAssignment: # (new in 1.9)
Enabled: true
Lint/OrAssignmentToConstant: # (new in 1.9)
Expand Down
40 changes: 40 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ if ruby_version?('2.1')
gem 'mysql2', '0.3.21'
gem 'pg', '>= 0.18.4', '< 1.0'
gem 'rack', '1.4.7'
gem 'rack-contrib'
gem 'rack-cache', '1.7.1'
gem 'rack-test', '0.7.0'
gem 'rake', '< 12.3'
Expand Down Expand Up @@ -288,6 +289,7 @@ elsif ruby_version?('2.2')
gem 'qless'
gem 'racecar', '>= 0.3.5'
gem 'rack', '< 2.1.0' # Locked due to grape incompatibility: https://github.com/ruby-grape/grape/issues/1980
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand All @@ -312,6 +314,12 @@ elsif ruby_version?('2.2')
end
# ----------------------------------------------------------------------------------------------------------------------
elsif ruby_version?('2.3')
appraise 'hanami-1' do
gem 'rack'
gem 'rack-test'
gem 'hanami', '~> 1'
end

appraise 'rails32-mysql2' do
gem 'test-unit'
gem 'rails', '3.2.22.5'
Expand Down Expand Up @@ -472,6 +480,7 @@ elsif ruby_version?('2.3')
gem 'qless'
gem 'racecar', '>= 0.3.5'
gem 'rack', '< 2.1.0' # Locked due to grape incompatibility: https://github.com/ruby-grape/grape/issues/1980
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -502,6 +511,12 @@ elsif ruby_version?('2.3')
end
# ----------------------------------------------------------------------------------------------------------------------
elsif ruby_version?('2.4')
appraise 'hanami-1' do
gem 'rack'
gem 'rack-test'
gem 'hanami', '~> 1'
end

appraise 'rails5-mysql2' do
gem 'rails', '~> 5.2.1'
gem 'mysql2', '< 1'
Expand Down Expand Up @@ -590,6 +605,7 @@ elsif ruby_version?('2.4')
gem 'qless'
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -621,6 +637,12 @@ elsif ruby_version?('2.4')
end
# ----------------------------------------------------------------------------------------------------------------------
elsif ruby_version?('2.5')
appraise 'hanami-1' do
gem 'rack'
gem 'rack-test'
gem 'hanami', '~> 1'
end

appraise 'rails5-mysql2' do
gem 'rails', '~> 5.2.1'
gem 'mysql2', '< 1', platform: :ruby
Expand Down Expand Up @@ -838,6 +860,7 @@ elsif ruby_version?('2.5')
gem 'qless', (RUBY_PLATFORM == 'java' ? '0.10.0' : '>= 0') # Newer releases require `rusage`, which is not available for JRuby
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -871,6 +894,12 @@ elsif ruby_version?('2.5')
end
# ----------------------------------------------------------------------------------------------------------------------
elsif ruby_version?('2.6')
appraise 'hanami-1' do
gem 'rack'
gem 'rack-test'
gem 'hanami', '~> 1'
end

appraise 'rails5-mysql2' do
gem 'rails', '~> 5.2.1'
gem 'mysql2', '< 1', platform: :ruby
Expand Down Expand Up @@ -1062,6 +1091,7 @@ elsif ruby_version?('2.6')
gem 'qless', (RUBY_PLATFORM == 'java' ? '0.10.0' : '>= 0') # Newer releases require `rusage`, which is not available for JRuby
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -1095,6 +1125,12 @@ elsif ruby_version?('2.6')
end
# ----------------------------------------------------------------------------------------------------------------------
elsif ruby_version?('2.7')
appraise 'hanami-1' do
gem 'rack'
gem 'rack-test'
gem 'hanami', '~> 1'
end

appraise 'rails5-mysql2' do
gem 'rails', '~> 5.2.1'
gem 'mysql2', '< 1', platform: :ruby
Expand Down Expand Up @@ -1266,6 +1302,7 @@ elsif ruby_version?('2.7')
gem 'qless'
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -1381,6 +1418,7 @@ elsif ruby_version?('3.0') || ruby_version?('3.1')
gem 'qless'
# gem 'racecar', '>= 0.3.5' # Pending release of our fix: https://github.com/appsignal/rdkafka-ruby/pull/144
gem 'rack'
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -1496,6 +1534,7 @@ elsif ruby_version?('3.2')
gem 'qless'
# gem 'racecar', '>= 0.3.5' # Pending release of our fix: https://github.com/appsignal/rdkafka-ruby/pull/144
gem 'rack'
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand All @@ -1514,6 +1553,7 @@ elsif ruby_version?('3.2')
gem 'typhoeus'
gem 'que', '>= 1.0.0'
gem 'net-smtp'
gem 'nokogiri', platform: :ruby # TODO: binary gem has max ruby version constraint excluding previews, switch to using minimum version constraint once a non-3.2-excluding binary gem is released
end

appraise 'contrib-old' do
Expand Down
Loading

0 comments on commit cf11e06

Please sign in to comment.