Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the project's testing infrastructure to support Rails 8.0 and newer Ruby versions, while removing support for older versions (Rails 7.1 and Ruby 3.2). The changes also improve database timestamp handling and fix test assertions.
- Upgrades Rails version support from 7.1/7.2 to 7.2/8.0
- Updates Ruby version support from 3.2/3.3 to 3.3/3.4
- Improves database timestamp fetching to be more explicit about timezone handling
- Refactors test assertions to use more robust string comparison
Reviewed Changes
Copilot reviewed 7 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/build.yml |
Updates CI matrix to test Ruby 3.3/3.4 and Rails 7.2/8.0 |
Appraisals |
Comments out Rails 7.1, updates Rails 7.2 and adds Rails 8.0 configuration |
gemfiles/rails_7.2.gemfile |
Upgrades rspec-rails to 8.0.2 for Rails 7.2 |
gemfiles/rails_8.0.gemfile |
Creates new gemfile for Rails 8.0 with rspec-rails 8.0.2 |
gemfiles/rails_7.1.gemfile.lock |
Removes lockfile for deprecated Rails 7.1 |
gemfiles/rails_7.2.gemfile.lock |
Removes lockfile (will be regenerated) |
Gemfile.lock |
Updates dependencies including nokogiri and sqlite3 versions |
lib/dfe/analytics/testing/helpers.rb |
Increases RSA key size from 2014 to 2048 bits for security |
lib/dfe/analytics/services/entity_table_checks.rb |
Refactors timestamp fetching to handle multiple DB adapters with explicit timezone conversion |
spec/dfe/analytics/send_events_spec.rb |
Refactors test assertions and removes debug statement |
Comments suppressed due to low confidence (1)
gemfiles/rails_8.0.gemfile:6
- rspec-rails version 8.0.2 does not exist. As of the latest stable release, rspec-rails is at version 7.x. The main Gemfile.lock shows rspec-rails 7.1.0 is being used, which suggests this version specification is incorrect and may cause bundle install failures.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| expect(log_message).to include('"key"=>"first_name", "value"=>["HIDDEN"]') | ||
| expect(log_message).to include('"key"=>"email", "value"=>"user@example.com"') | ||
| expect(log_message).to include('"key"=>"phone_number", "value"=>"1234567890"') | ||
| puts log_message |
There was a problem hiding this comment.
Debug statement (puts) should be removed before merging to production. This appears to be leftover debugging code.
Suggested change
| puts log_message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the test matrix ruby to include 3.4 and rails 8, removing ruby 3.2 and rails 7.1
Some tests were adjusted to allow for formatting etc, and Timezone we with a sqlite option to settle some flaky test fails.