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

Update tests and tested versions to cover Ruby 3.4 and Rails 8 #832

Merged
merged 26 commits into from
Jan 16, 2025

Conversation

Cawllec
Copy link
Contributor

@Cawllec Cawllec commented Jan 15, 2025

Goal

With the releases of Ruby 3.4 and Rails 8 we need to ensure that the test setups run correctly on those versions. To that end, this PR:

  • Bumps the leading test version of Ruby to 3.4
  • Adds 3.4 to any multi-testing matrices
  • Adds a Rails 8 test fixture, and tests it with Ruby 3.4
  • Updates unit tests to allow changes in Ruby 3.4 to work correctly (as an example, {a: 1} as a string is '{a: 1}' in 3.4, where it was '{:a => 1}' previously)
  • Adds any required dependencies to test fixtures for Ruby 3.4 (Such as to-be deprecated stdlib gems)

Changeset

The majority of the changeset is the rails8 app addition. I would suggest skimming everything in the features/fixtures/rails8/app directory as a lot of it will be generated from the rails application, and the rest will be identical to rails6/7 setups.

Notes

There are a few changes worth commenting on:

  • We're currently skipping a JRuby unit test ensuring that java.lang.Throwables are processed correctly as this test fails when running on CI, but not locally. A ticket has been created to examine this further at a later date.
  • We're currently only running the Rails 8 tests on Ruby 3.4, not earlier versions. The test fixtures are unable to start when running on CI, even though they run fine locally. A ticket will be created to examine this further as well.
  • The test for SQL breadcrumbs with ActiveRecord bindings in Rails 8 has been skipped, as we've been unable to get the rails application to generate any bindings. A ticket for this has been created and we can revisit it at a later date. We're still testing to see if the SQL breadcrumbs without the bindings are created correctly.

@Cawllec Cawllec requested a review from tomlongridge January 15, 2025 16:49
@Cawllec Cawllec merged commit f771d0b into master Jan 16, 2025
151 checks passed
@Cawllec Cawllec deleted the tests/updated-versions branch January 16, 2025 09:34
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.

2 participants