-
Notifications
You must be signed in to change notification settings - Fork 1.4k
MONGOID-5872 - [🛠️ Let's Fix Mongoid's Broken CI] Actually test Rails 6.0.0, 7.0.0, 7.1.0, and released version of 8.0.0 #5980
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
base: master
Are you sure you want to change the base?
Conversation
4c4e43c
to
6d9d656
Compare
We have MONGOID-5812 for separately addressing Ruby 3.4 support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes Mongoid's CI configuration to ensure proper testing of specific Rails major versions by making gem version constraints more precise. The issue was that loose version constraints like ~> 6.0
were resolving to the latest patch versions (e.g., 6.Y.Z) instead of testing the intended major.minor versions.
- Updates gem version constraints from
~> X.Y
to~> X.Y.0
format for Rails 6.0, 6.1, 7.0, 7.1, 7.2, and 8.0 - Changes Rails 8.0 from pinned RC version to stable release pattern
- Ensures CI actually tests the intended Rails versions rather than unintended newer patch releases
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
gemfiles/rails-6.0.gemfile | Updates Rails 6.0 gem constraints to ~> 6.0.0 format |
gemfiles/rails-6.1.gemfile | Updates Rails 6.1 gem constraints to ~> 6.1.0 format |
gemfiles/rails-7.0.gemfile | Updates Rails 7.0 gem constraints to ~> 7.0.0 format |
gemfiles/rails-7.1.gemfile | Updates Rails 7.1 gem constraints to ~> 7.1.0 format |
gemfiles/rails-7.2.gemfile | Updates Rails 7.2 gem constraints to ~> 7.2.0 format |
gemfiles/rails-8.0.gemfile | Changes from pinned RC version to ~> 8.0.0 stable release pattern |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Any reason this is not merged yet? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @johnnyshields!
Rails 6.0 doesn't have the necessary plumbing to allow us to massage the BSON value into something that can be interpreted as numeric. Rails 6.0 is EOL, though, and rather than copy-and-paste the entire validate_each implementation to support a dead version of Rails, we'll just skip the test when that version of Rails is installed.
Fun fact: Mongoid's CI is not testing the following versions of Rails at all:
The reason is that
gem 'actionpack', '~> 6.0'
resolves to6.Y.Z
where Y and Z are the highest possible version. To enforce it is actually testing6.0.Z
, one must declare it as~> 6.0.0
In addition, Rails 8.0 is pinned at 8.0.0-rc2, i.e. not the latest 8.0.Z release.
Please kindly backport this to any branches under stable maintenance to ensure that future patches to those branches also have proper test coverage.