Skip to content

Commit 4780480

Browse files
feat!: Set minimum supported version to Ruby 3.1 (#1216)
* feat!: Set minimum supported version to Ruby 3.1 Ruby 3.0 is no longer receiving security updates. Per our manitenace policy we will only provide updates for Ruby and library versions that are at a minimum receiving security updates. Any users that require Ruby support prior to 3.0 should pin their versions > Ruby 3.0 > status: eol > release date: 2020-12-25 > normal maintenance until: 2023-04-01 > EOL: 2024-04-23 cc: #1211 * squash: Temporarily disable rule https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Naming/BlockForwarding * fix: Duplicate block * squash: use correct rule * squash: Apply code review comments * squash: remove post-install msg
1 parent 717f1c3 commit 4780480

File tree

65 files changed

+68
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+68
-126
lines changed

.github/workflows/ci-contrib.yml

-24
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ jobs:
4444
with:
4545
gem: "opentelemetry-helpers-${{ matrix.gem }}"
4646
ruby: "3.1"
47-
- name: "Test Ruby 3.0"
48-
if: "${{ matrix.os == 'ubuntu-latest' }}"
49-
uses: ./.github/actions/test_gem
50-
with:
51-
gem: "opentelemetry-helpers-${{ matrix.gem }}"
52-
ruby: "3.0"
5347
yard: true
5448
rubocop: true
5549
build: true
@@ -89,12 +83,6 @@ jobs:
8983
with:
9084
gem: "opentelemetry-propagator-${{ matrix.gem }}"
9185
ruby: "3.1"
92-
- name: "Test Ruby 3.0"
93-
if: "${{ matrix.os == 'ubuntu-latest' }}"
94-
uses: ./.github/actions/test_gem
95-
with:
96-
gem: "opentelemetry-propagator-${{ matrix.gem }}"
97-
ruby: "3.0"
9886
yard: true
9987
rubocop: true
10088
build: true
@@ -134,15 +122,9 @@ jobs:
134122
with:
135123
gem: "opentelemetry-${{ matrix.gem }}"
136124
ruby: "3.1"
137-
- name: "Test Ruby 3.0"
138-
if: "${{ matrix.os == 'ubuntu-latest' }}"
139-
uses: ./.github/actions/test_gem
140-
with:
141-
gem: "opentelemetry-${{ matrix.gem }}"
142125
yard: true
143126
rubocop: true
144127
build: true
145-
ruby: "3.0"
146128
- name: "Test JRuby"
147129
if: "${{ matrix.os == 'ubuntu-latest' }}"
148130
uses: ./.github/actions/test_gem
@@ -177,12 +159,6 @@ jobs:
177159
with:
178160
gem: "opentelemetry-processor-${{ matrix.gem }}"
179161
ruby: "3.1"
180-
- name: "Test Ruby 3.0"
181-
if: "${{ matrix.os == 'ubuntu-latest' }}"
182-
uses: ./.github/actions/test_gem
183-
with:
184-
gem: "opentelemetry-processor-${{ matrix.gem }}"
185-
ruby: "3.0"
186162
yard: true
187163
rubocop: true
188164
build: true

.github/workflows/ci-instrumentation-with-services.yml

-30
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ jobs:
4444
with:
4545
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
4646
ruby: "3.1"
47-
- name: "Test Ruby 3.0"
48-
uses: ./.github/actions/test_gem
49-
with:
50-
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
51-
ruby: "3.0"
5247
yard: true
5348
rubocop: true
5449
build: true
@@ -95,11 +90,6 @@ jobs:
9590
with:
9691
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
9792
ruby: "3.1"
98-
- name: "Test Ruby 3.0"
99-
uses: ./.github/actions/test_gem
100-
with:
101-
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
102-
ruby: "3.0"
10393
yard: true
10494
rubocop: true
10595
build: true
@@ -137,11 +127,6 @@ jobs:
137127
with:
138128
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
139129
ruby: "3.1"
140-
- name: "Test Ruby 3.0"
141-
uses: ./.github/actions/test_gem
142-
with:
143-
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
144-
ruby: "3.0"
145130
yard: true
146131
rubocop: true
147132
build: true
@@ -195,11 +180,6 @@ jobs:
195180
with:
196181
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
197182
ruby: "3.1"
198-
- name: "Test Ruby 3.0"
199-
uses: ./.github/actions/test_gem
200-
with:
201-
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
202-
ruby: "3.0"
203183
yard: true
204184
rubocop: true
205185
build: true
@@ -244,11 +224,6 @@ jobs:
244224
with:
245225
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
246226
ruby: "3.1"
247-
- name: "Test Ruby 3.0"
248-
uses: ./.github/actions/test_gem
249-
with:
250-
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
251-
ruby: "3.0"
252227
yard: true
253228
rubocop: true
254229
build: true
@@ -290,11 +265,6 @@ jobs:
290265
with:
291266
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
292267
ruby: "3.1"
293-
- name: "Test Ruby 3.0"
294-
uses: ./.github/actions/test_gem
295-
with:
296-
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
297-
ruby: "3.0"
298268
yard: true
299269
rubocop: true
300270
build: true

.github/workflows/ci-instrumentation.yml

-6
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ jobs:
7474
with:
7575
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
7676
ruby: "3.1"
77-
- name: "Test Ruby 3.0"
78-
if: "${{ matrix.os == 'ubuntu-latest' }}"
79-
uses: ./.github/actions/test_gem
80-
with:
81-
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
82-
ruby: "3.0"
8377
yard: true
8478
rubocop: true
8579
build: true

.github/workflows/release-hook-on-closed.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
release-process-request:
99
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
1010
env:
11-
ruby_version: "3.0"
11+
ruby_version: "3.1"
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Install Ruby ${{ env.ruby_version }}

.github/workflows/release-hook-on-push.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
release-update-open-requests:
1010
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
1111
env:
12-
ruby_version: "3.0"
12+
ruby_version: "3.1"
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Install Ruby ${{ env.ruby_version }}

.github/workflows/release-perform.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
release-perform:
1919
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
2020
env:
21-
ruby_version: "3.0"
21+
ruby_version: "3.1"
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Install Ruby ${{ env.ruby_version }}

.github/workflows/release-please.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
5353
- uses: ruby/[email protected]
5454
with:
55-
ruby-version: "3.0"
55+
ruby-version: "3.1"
5656
bundler: latest
5757
bundler-cache: false
5858
working-directory: ${{ matrix.path }}

.github/workflows/release-request-weekly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
release-request:
99
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
1010
env:
11-
ruby_version: "3.0"
11+
ruby_version: "3.1"
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Install Ruby ${{ env.ruby_version }}

.github/workflows/release-request.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
release-request:
1313
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
1414
env:
15-
ruby_version: "3.0"
15+
ruby_version: "3.1"
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Install Ruby ${{ env.ruby_version }}

.github/workflows/release-retry.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
release-retry:
1616
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
1717
env:
18-
ruby_version: "3.0"
18+
ruby_version: "3.1"
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Install Ruby ${{ env.ruby_version }}

.instrumentation_generator/instrumentation_generator.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def add_to_instrumentation_all
6161
insert_into_file("#{instrumentation_all_path}/Gemfile", gemfile_text, after: "gemspec\n")
6262

6363
gemspec_text = "\n spec.add_dependency '#{instrumentation_gem_name}', '~> 0.0.0'"
64-
insert_into_file("#{instrumentation_all_path}/opentelemetry-instrumentation-all.gemspec", gemspec_text, after: "spec.required_ruby_version = '>= 3.0'\n")
64+
insert_into_file("#{instrumentation_all_path}/opentelemetry-instrumentation-all.gemspec", gemspec_text, after: "spec.required_ruby_version = '>= 3.1'\n")
6565

6666
all_rb_text = "\nrequire '#{instrumentation_gem_name}'"
6767
insert_into_file("#{instrumentation_all_path}/lib/opentelemetry/instrumentation/all.rb", all_rb_text, after: "# SPDX-License-Identifier: Apache-2.0\n")

.instrumentation_generator/templates/gemspec.tt

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-api', '~> <%= opentelemetry_version %>'
2929
spec.add_dependency 'opentelemetry-instrumentation-base', '~> <%= instrumentation_base_version %>'

.rubocop.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require: rubocop-performance
22

33
AllCops:
4-
TargetRubyVersion: '3.0'
4+
TargetRubyVersion: '3.1'
55
NewCops: enable
66
Exclude:
77
- Rakefile
@@ -38,6 +38,12 @@ Metrics/PerceivedComplexity:
3838
Naming/FileName:
3939
Exclude:
4040
- '**/opentelemetry-*'
41+
### TODO: Enable this is a separate PR
42+
Naming/BlockForwarding:
43+
Enabled: false
44+
Style/ArgumentsForwarding:
45+
Enabled: false
46+
#######################
4147
Style/Documentation:
4248
Exclude:
4349
- "**/test/**/*"

POST_INSTALL_MESSAGE

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
Ruby 3.0 has reached EoL 2024-04-23. OTel Ruby Contrib gems will no longer accept new features or bug fixes for Ruby 3.0 after 2025-01-15. Please upgrade to Ruby 3.1 or higher to continue receiving updates.

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ This repository also contains libraries to aid with interoperability with vendor
7575

7676
OpenTelemetry Ruby follows the [versioning and stability document][otel-versioning] in the OpenTelemetry specification. Notably, we adhere to the outlined version numbering exception, which states that experimental signals may have a `0.x` version number.
7777

78-
### Library Compatibility
78+
### Ruby and Library Compatibility
79+
80+
All libraries in this repository require Ruby Versions 3.1 or newer.
7981

8082
This project is managed on a volunteer basis and therefore we have limited capacity to support compatibility with unmaintained or EOL libraries.
8183

helpers/mysql/opentelemetry-helpers-mysql.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-common', '~> 0.21'

helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-common', '~> 0.21'
2929

instrumentation/CONTRIBUTING.md

-5
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,6 @@ If we determine the service container slows down the test suite significantly, i
368368
with:
369369
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
370370
ruby: "3.1"
371-
- name: "Test Ruby 3.0"
372-
uses: ./.github/actions/test_gem
373-
with:
374-
gem: "opentelemetry-instrumentation-${{ matrix.gem }}"
375-
ruby: "3.0"
376371
yard: true
377372
rubocop: true
378373
build: true

instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.7'

instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.7'

instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-instrumentation-active_support', '>= 0.7.0'

instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

instrumentation/all/opentelemetry-instrumentation-all.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
2424
Dir.glob('*.md') +
2525
['LICENSE', '.yardopts']
2626
spec.require_paths = ['lib']
27-
spec.required_ruby_version = '>= 3.0'
27+
spec.required_ruby_version = '>= 3.1'
2828

2929
spec.add_dependency 'opentelemetry-instrumentation-active_model_serializers', '~> 0.21.0'
3030
spec.add_dependency 'opentelemetry-instrumentation-aws_lambda', '~> 0.1.0'

instrumentation/aws_lambda/opentelemetry-instrumentation-aws_lambda.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
2424
Dir.glob('*.md') +
2525
['LICENSE', '.yardopts']
2626
spec.require_paths = ['lib']
27-
spec.required_ruby_version = '>= 3.0'
27+
spec.required_ruby_version = '>= 3.1'
2828

2929
spec.add_dependency 'opentelemetry-api', '~> 1.0'
3030
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

instrumentation/base/opentelemetry-instrumentation-base.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-common', '~> 0.21'

instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
2323
Dir.glob('*.md') +
2424
['LICENSE', '.yardopts']
2525
spec.require_paths = ['lib']
26-
spec.required_ruby_version = '>= 3.0'
26+
spec.required_ruby_version = '>= 3.1'
2727

2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

0 commit comments

Comments
 (0)