From ce6ac45d5e0b6976e666e1d03c969199dbffe7fc Mon Sep 17 00:00:00 2001 From: Matthew Keeler Date: Mon, 2 Nov 2026 11:22:46 -0500 Subject: [PATCH] feat!: Require Ruby 3.4 and JRuby 10 The SDK no longer supports Ruby versions that are end-of-life or in security-only maintenance. Ruby 3.2 is end-of-life, and Ruby 3.3 gets only security fixes. The new minimum is Ruby 3.4. JRuby 9.4 reports Ruby 3.1 compatibility, so it no longer meets the minimum. JRuby 10 targets Ruby 3.4 and requires Java 21. CI now tests Ruby 3.4, Ruby 4.0 and JRuby 10.0, and the JRuby gem builds on JRuby 10.0. JRuby jobs install Java 21 because the runner image defaults to an older Java. Every job now uses Bundler 4, so the Bundler 2 fallback for JRuby 9 is removed. --- .github/actions/setup/action.yml | 10 ++++++++-- .github/workflows/build-gem.yml | 2 +- .github/workflows/ci.yml | 6 +++--- .github/workflows/manual-publish-docs.yml | 2 +- .github/workflows/manual-publish.yml | 6 +++--- .github/workflows/release-please.yml | 6 +++--- .rubocop.yml | 2 +- README.md | 2 +- launchdarkly-server-sdk.gemspec | 2 +- 9 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 68adc1d7..96ee9cd7 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -12,11 +12,17 @@ inputs: runs: using: composite steps: + # JRuby 10 requires Java 21. The runner image defaults to an older Java. + - uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 + if: ${{ startsWith(inputs.version, 'jruby') }} + with: + distribution: temurin + java-version: "21" + - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0 with: ruby-version: ${{ inputs.version }} - # The Gemfile cooldown needs Bundler 4, which requires Ruby 3.2 or later. - bundler: ${{ startsWith(inputs.version, 'jruby-9') && '2' || '4.0.19' }} + bundler: "4.0.19" - name: Install dependencies if: ${{ inputs.install-dependencies == 'true' }} diff --git a/.github/workflows/build-gem.yml b/.github/workflows/build-gem.yml index 86fd1eca..fa70a6ea 100644 --- a/.github/workflows/build-gem.yml +++ b/.github/workflows/build-gem.yml @@ -6,7 +6,7 @@ on: version: description: "The version of ruby to build against" type: string - default: "3.2" + default: "3.4" upload-artifact: description: "Whether to upload the gem as an artifact" type: boolean diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d69b4995..088b1785 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - version: ["3.2", "3.4", "jruby-9.4"] + version: ["3.4", "4.0", "jruby-10.0"] with: version: ${{ matrix.version }} @@ -27,7 +27,7 @@ jobs: - uses: ./.github/actions/setup with: - version: "3.2" + version: "3.4" - uses: ./.github/actions/build-docs @@ -46,7 +46,7 @@ jobs: - uses: ./.github/actions/setup with: - version: "3.2" + version: "3.4" - name: Run tests run: bundle exec rspec spec diff --git a/.github/workflows/manual-publish-docs.yml b/.github/workflows/manual-publish-docs.yml index 08c26b95..7ab57c1a 100644 --- a/.github/workflows/manual-publish-docs.yml +++ b/.github/workflows/manual-publish-docs.yml @@ -14,7 +14,7 @@ jobs: - uses: ./.github/actions/setup with: - version: "3.2" + version: "3.4" install-dependencies: false - uses: ./.github/actions/build-docs diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index b50942d9..654a8e72 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -11,12 +11,12 @@ jobs: build-ruby-gem: uses: ./.github/workflows/build-gem.yml with: - version: "3.2" + version: "3.4" build-jruby-gem: uses: ./.github/workflows/build-gem.yml with: - version: "jruby-9.4" + version: "jruby-10.0" publish: runs-on: ubuntu-latest @@ -32,7 +32,7 @@ jobs: - uses: ./.github/actions/setup with: - version: "3.2" + version: "3.4" install-dependencies: false - uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 3d1d044d..7b32d95e 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -25,14 +25,14 @@ jobs: if: ${{ needs.release-package.outputs.release-created == 'true' }} uses: ./.github/workflows/build-gem.yml with: - version: "3.2" + version: "3.4" build-jruby-gem: needs: ["release-package"] if: ${{ needs.release-package.outputs.release-created == 'true' }} uses: ./.github/workflows/build-gem.yml with: - version: "jruby-9.4" + version: "jruby-10.0" publish: runs-on: ubuntu-latest @@ -49,7 +49,7 @@ jobs: - uses: ./.github/actions/setup with: - version: "3.2" + version: "3.4" install-dependencies: false - uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1 diff --git a/.rubocop.yml b/.rubocop.yml index 0d93de48..988437dd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,7 @@ plugins: - rubocop-performance AllCops: - TargetRubyVersion: 3.1 + TargetRubyVersion: 3.4 Include: - lib/**/*.rb - spec/**/*.rb diff --git a/README.md b/README.md index 20ff5d72..6acadf29 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ LaunchDarkly overview Supported Ruby versions ----------------------- -This version of the LaunchDarkly SDK has a minimum Ruby version of 3.1.0. +This version of the LaunchDarkly SDK has a minimum Ruby version of 3.4.0. On JRuby, the minimum is JRuby 10.0, which requires Java 21. Getting started ----------- diff --git a/launchdarkly-server-sdk.gemspec b/launchdarkly-server-sdk.gemspec index 0940d6bc..ec9b6722 100644 --- a/launchdarkly-server-sdk.gemspec +++ b/launchdarkly-server-sdk.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |spec| spec.files = Dir["lib/**/*.rb", "README.md", "LICENSE.txt"] spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.required_ruby_version = ">= 3.1.0" + spec.required_ruby_version = ">= 3.4.0" spec.add_development_dependency "aws-sdk-dynamodb", "~> 1.57" spec.add_development_dependency "bigdecimal", "~> 3.1.1" # Neccessary for aws-sdk-dynamodb https://github.com/aws/aws-sdk-ruby/issues/3271