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

Add Ruby 3.4.0-preview2 support for CircleCI tests #4040

Closed
wants to merge 7 commits into from

Conversation

sarahchen6
Copy link
Contributor

What does this PR do?
This PR adds "3.4" versions to the config.yml file under .circleci everywhere there is a comment to # ADD NEW RUBIES HERE.

Motivation:
Though the official Ruby 3.4 is not yet released, we can temporarily add Ruby 3.4.0-preview2. This allows us to start testing with Ruby 3.4 in our CI and spot -> address issues early. After Ruby 3.4 is officially released post-Dec 25, 2024, we can replace the preview with it.

Change log entry
No change log entry for now. Thinking to have a "Ruby 3.4.0-preview2 support added" update after it is fully supported.

Additional Notes:
This PR is one step toward full support and only addresses CircleCI workflow tests. It acts alongside #4038 and #4039 .

How to test the change?
This change can be tested in CI.

@sarahchen6 sarahchen6 force-pushed the sarahchen6/add-ruby-3.4-circleci branch from dd6e6b1 to 3dc6500 Compare October 28, 2024 21:14
@pr-commenter
Copy link

pr-commenter bot commented Oct 28, 2024

Benchmarks

Benchmark execution time: 2024-11-08 21:02:17

Comparing candidate commit f1c7fe4 in PR branch sarahchen6/add-ruby-3.4-circleci with baseline commit c8bd1e4 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 29 metrics, 2 unstable metrics.

Gemfile Show resolved Hide resolved
appraisal/ruby-3.4.rb Show resolved Hide resolved
Rakefile Outdated Show resolved Hide resolved
@sarahchen6 sarahchen6 force-pushed the sarahchen6/add-ruby-3.4-circleci branch 4 times, most recently from 7f6cef7 to 53f6d72 Compare November 6, 2024 16:28
@p-datadog
Copy link
Contributor

p-datadog commented Nov 6, 2024

Rack::Handler was also deleted in 3.1.0. The removal is mentioned in https://github.com/rack/rack/blob/main/UPGRADE-GUIDE.md but it looks like some/all of those changes were made in 3.1.0 and not in 3.0 as advertised.

Could be fixed by requiring rackup in the affected test?

@p-datadog
Copy link
Contributor

The following makes the test pass on ruby-3.4 config:

diff --git a/spec/datadog/tracing/contrib/suite/integration_spec.rb b/spec/datadog/tracing/contrib/suite/integration_spec.rb
index eaf37eb1f..eaa9ab0ba 100644
--- a/spec/datadog/tracing/contrib/suite/integration_spec.rb
+++ b/spec/datadog/tracing/contrib/suite/integration_spec.rb
@@ -8,7 +8,7 @@ require 'semantic_logger'
 
 require 'rack'
 # `Rack::Handler::WEBrick` was extracted to the `rackup` gem in Rack 3.0
-require 'rackup' if Gem::Version.new(Rack::RELEASE) >= Gem::Version.new('3')
+require 'rackup/handler/webrick' if Gem::Version.new(Rack::RELEASE) >= Gem::Version.new('3')
 require 'webrick'
 
 RSpec.describe 'contrib integration testing', :integration do
@@ -164,7 +164,7 @@ RSpec.describe 'contrib integration testing', :integration do
             end
           end.to_app
 
-          server.mount '/', Rack::Handler::WEBrick, app
+          server.mount '/', Rackup::Handler::WEBrick, app
 
           @thread = Thread.new { server.start }
           try_wait_until { started }

I haven't checked if this would also work on rack 3.0, and I am quite certain this will NOT work on rack 2 and lower therefore the change needs to be conditional on rack version.

@sarahchen6 sarahchen6 force-pushed the sarahchen6/add-ruby-3.4-circleci branch 6 times, most recently from 616046e to 602a389 Compare November 6, 2024 21:37
@sarahchen6 sarahchen6 force-pushed the sarahchen6/add-ruby-3.4-circleci branch 12 times, most recently from 724b1cb to 00e02df Compare November 7, 2024 23:06
@ivoanjo
Copy link
Member

ivoanjo commented Nov 8, 2024

Slight suggestion: This PR is getting so big at this point that GitHub literally does not show me the complete list of files changed when I go on the diff tab.

May be worth splitting some of the changes into smaller PRs that could go in already? E.g. maybe a separate PR for the ffi/webrick stuff, that doesn't even add 3.4 yet, etc?

@sarahchen6 sarahchen6 force-pushed the sarahchen6/add-ruby-3.4-circleci branch from ccc80ce to bfeecc3 Compare November 8, 2024 20:14
@sarahchen6
Copy link
Contributor Author

This PR was split up. See #4114 .

@sarahchen6 sarahchen6 closed this Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants