Skip to content

Upgrade Mongoid to 9.0.11 to unblock Rails 7.2 - #892

Merged
CoryMCodes merged 1 commit into
rubyforgood:masterfrom
CoryMCodes:chore/mongoid-9-upgrade
Sep 3, 2026
Merged

Upgrade Mongoid to 9.0.11 to unblock Rails 7.2#892
CoryMCodes merged 1 commit into
rubyforgood:masterfrom
CoryMCodes:chore/mongoid-9-upgrade

Conversation

@CoryMCodes

Copy link
Copy Markdown
Collaborator

mongoid 8.1.3 declares activemodel >= 5.1, < 7.2, which makes Rails 7.2 unresolvable. 9.0.11 widens that to < 8.2.

config/initializers/mongoid.rb already pins Mongoid::Config.load_defaults 8.1, and 9.0.11 still honors it, so every feature-flagged behaviour change in Mongoid 9 stays off and this bump is behaviour-preserving. Flipping to 9.0 defaults is left as a follow-up.

Companion bumps the upgrade requires:

  • mongo 2.20.1 -> 2.25.0, bson 4.15.0 -> 5.2.0. Driver 2.25 supports wire versions 8..29 (MongoDB 4.2+); the server pinned in docker-compose.yml and backend CI is 4.4.9 (wire 9), so no server image bump is needed.
  • bullet 7.2.0 -> 8.2.0. 7.2.0 raises "Bullet does not support mongoid 9.0.11 yet" at boot; Mongoid 9 support landed in 8.0.2. Dev/test only.

Also covers the encrypted_user_id round-trip, which had only a presence validation despite being the Postgres <-> Mongo link.

closes #881

mongoid 8.1.3 declares activemodel >= 5.1, < 7.2, which makes Rails 7.2
unresolvable. 9.0.11 widens that to < 8.2.

config/initializers/mongoid.rb already pins Mongoid::Config.load_defaults
8.1, and 9.0.11 still honors it, so every feature-flagged behaviour change
in Mongoid 9 stays off and this bump is behaviour-preserving. Flipping to
9.0 defaults is left as a follow-up.

Companion bumps the upgrade requires:

- mongo 2.20.1 -> 2.25.0, bson 4.15.0 -> 5.2.0. Driver 2.25 supports wire
  versions 8..29 (MongoDB 4.2+); the server pinned in docker-compose.yml
  and backend CI is 4.4.9 (wire 9), so no server image bump is needed.
- bullet 7.2.0 -> 8.2.0. 7.2.0 raises "Bullet does not support mongoid
  9.0.11 yet" at boot; Mongoid 9 support landed in 8.0.2. Dev/test only.

Also covers the encrypted_user_id round-trip, which had only a presence
validation despite being the Postgres <-> Mongo link.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@CoryMCodes
CoryMCodes force-pushed the chore/mongoid-9-upgrade branch from 6ccd334 to ea5f542 Compare August 30, 2026 04:17
@CoryMCodes
CoryMCodes merged commit ffc6505 into rubyforgood:master Sep 3, 2026
12 checks passed
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.

Upgrade Mongoid 8.1.3 -> 9.1

2 participants