Skip to content

Comments

chore: update MongoDB version to 8.0#38596

Merged
ggazzo merged 9 commits intodevelopfrom
chore/mongo-8.0
Feb 12, 2026
Merged

chore: update MongoDB version to 8.0#38596
ggazzo merged 9 commits intodevelopfrom
chore/mongo-8.0

Conversation

@ggazzo
Copy link
Member

@ggazzo ggazzo commented Feb 10, 2026

We initially documented MongoDB 8.2 as the minimum supported version. However, MongoDB 8.2 belongs to the Rapid Release channel, which has a short support lifecycle (approximately three months).

To avoid relying on short-lived releases and to provide a more stable and predictable support matrix, we have adjusted the minimum supported MongoDB version to MongoDB 8.

With this change, we explicitly commit that this Rocket.Chat version is tested and guaranteed to work with MongoDB 8.x.
https://rocketchat.atlassian.net/browse/CORE-1814

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores
    • Updated MongoDB minimum supported version from 8.2 to 8.0
    • Enhanced deprecation warning system to account for development and test environments
    • Added tooling to manage MongoDB version constraints across CI/CD pipelines and local development environments

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 10, 2026

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

🦋 Changeset detected

Latest commit: deaefe9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 40 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

Walkthrough

This change lowers the minimum supported MongoDB version from 8.2 to 8.0 LTS across the entire codebase. It updates CI workflows, Docker configurations, server startup validation logic, and introduces a utility script for managing MongoDB version references.

Changes

Cohort / File(s) Summary
MongoDB CI/CD Configuration
.github/workflows/ci-test-e2e.yml, .github/workflows/ci.yml, docker-compose-ci.yml, docker-compose-local.yml
Updated default MongoDB versions from 8.2 to 8.0 across CI workflows and Docker Compose configurations. Includes parameterized version variables with 8.0 defaults for environment-specific overrides.
Federation Testing Configuration
ee/packages/federation-matrix/docker-compose.test.yml
Changed MongoDB image for federation tests from fixed tag mongo:8.0 to parameterized tag mongo:${MONGODB_FEDERATION_VERSION:-8.0}.
MongoDB Version Tooling
scripts/set-mongo-version.mjs, package.json
Added new Node.js utility script to manage MongoDB version updates across multiple files. Script supports command-line arguments for version, federation mode, compatible versions, and dry-run previewing. Integrated as npm script set:mongo-version.
Server Startup Validation
apps/meteor/server/startup/serverRunning.ts
Updated MongoDB version requirement from 7.0+ to 8.0+. Extended deprecation check logic to consider TEST_MODE and development environments. Added deprecation warning for MongoDB versions below 8.0.0.
Package Metadata
.changeset/twelve-meals-sit.md
Added changeset marking two packages as patch updates with minimum MongoDB version constraint lowered from 8.2 to 8.0.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 From 8.2 down to 8.0 we hop,
Long-term support—no more version swap!
Scripts automate the changes we make,
CI and Docker aligned for goodness sake.
MongoDB LTS, stable and true,
Rabbit-approved for a smoother brew! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating MongoDB version to 8.0 across the codebase.
Linked Issues check ✅ Passed The PR fulfills all coding requirements from CORE-1814: CI now uses MongoDB 8.0, version references updated across configurations, and deprecation warnings reflect the new 8.0+ requirement.
Out of Scope Changes check ✅ Passed All changes are directly related to updating MongoDB version to 8.0; no unrelated modifications detected in CI workflows, configuration files, startup logic, or new scripts.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ggazzo ggazzo added this to the 8.2.0 milestone Feb 10, 2026
Adjusts the minimum supported MongoDB version for stability.
@ggazzo ggazzo marked this pull request as ready for review February 10, 2026 19:51
@ggazzo ggazzo requested review from a team as code owners February 10, 2026 19:51
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 9 files

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@apps/meteor/server/startup/serverRunning.ts`:
- Around line 87-93: The deprecation text in the semver check block (where
skipMongoDbDeprecationCheck, semver.satisfies(semver.coerce(mongoVersion)!,
'<8.0.0'), and showWarningBox are used) incorrectly claims MongoDB <8.0 "WILL
NOT BE SUPPORTED ON ROCKET.CHAT VERSION 8.0.0 AND GREATER" even though this code
runs in Rocket.Chat 8.x; update the warning message in that block to either: (A)
state that MongoDB <8.0 is deprecated now and will be removed in the next major
release (e.g., "DEPRECATED: MongoDB <8.0. Will be removed in Rocket.Chat
9.0.0"), or (B) say it is deprecated and support will be dropped in a future
major release (e.g., "DEPRECATED: MongoDB <8.0. Support will be removed in a
future release"), ensuring the strings built for msg reflect the corrected
wording so users on 8.x are not misled.
🧹 Nitpick comments (2)
apps/meteor/server/startup/serverRunning.ts (1)

95-122: Large block of commented-out code.

This 28-line block of dead code hurts readability. Consider removing it entirely — it can always be recovered from version control if needed. As per coding guidelines, code comments in the implementation should be avoided.

scripts/set-mongo-version.mjs (1)

48-59: --help exits with code 1 and writes to stderr.

Conventional CLI behavior is to print help to stdout and exit with code 0 when the user explicitly requests --help. Currently, both "no args" and --help go through die(), which uses stderr and a non-zero exit code. Consider separating help from error exits.

Proposed fix
   if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
-    die(
-      [
+    const isHelp = args.includes('--help') || args.includes('-h');
+    const msg = [
         'Usage: node ./scripts/set-mongo-version.mjs <mongodbVersion> [--federation <federationMongoVersion>] [--compatible <v1,v2,...>] [--dry-run]',
         '',
         'Examples:',
         '  node ./scripts/set-mongo-version.mjs 8.2',
         '  node ./scripts/set-mongo-version.mjs 8.2 --federation 8.0',
         '  node ./scripts/set-mongo-version.mjs 7.0 --dry-run',
-      ].join('\n'),
-    );
+    ].join('\n');
+    (isHelp ? process.stdout : process.stderr).write(`${msg}\n`);
+    process.exit(isHelp ? 0 : 1);
   }
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c53312f and 2f6ac44.

📒 Files selected for processing (9)
  • .changeset/twelve-meals-sit.md
  • .github/workflows/ci-test-e2e.yml
  • .github/workflows/ci.yml
  • apps/meteor/server/startup/serverRunning.ts
  • docker-compose-ci.yml
  • docker-compose-local.yml
  • ee/packages/federation-matrix/docker-compose.test.yml
  • package.json
  • scripts/set-mongo-version.mjs
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/server/startup/serverRunning.ts
🧠 Learnings (2)
📚 Learning: 2026-01-17T01:51:47.764Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 38219
File: packages/core-typings/src/cloud/Announcement.ts:5-6
Timestamp: 2026-01-17T01:51:47.764Z
Learning: In packages/core-typings/src/cloud/Announcement.ts, the AnnouncementSchema.createdBy field intentionally overrides IBannerSchema.createdBy (object with _id and optional username) with a string enum ['cloud', 'system'] to match existing runtime behavior. This is documented as technical debt with a FIXME comment at apps/meteor/app/cloud/server/functions/syncWorkspace/handleCommsSync.ts:53 and should not be flagged as an error until the runtime behavior is corrected.

Applied to files:

  • apps/meteor/server/startup/serverRunning.ts
📚 Learning: 2025-09-19T15:15:04.642Z
Learnt from: rodrigok
Repo: RocketChat/Rocket.Chat PR: 36991
File: apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts:219-221
Timestamp: 2025-09-19T15:15:04.642Z
Learning: The Federation_Matrix_homeserver_domain setting in apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts is part of the old federation system and is being deprecated/removed, so configuration issues with this setting should not be flagged for improvement.

Applied to files:

  • .changeset/twelve-meals-sit.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: 🔎 Code Check / Code Lint
  • GitHub Check: 🔨 Test Unit / Unit Tests
  • GitHub Check: 📦 Meteor Build (coverage)
  • GitHub Check: 🔨 Test Storybook / Test Storybook
  • GitHub Check: 🔎 Code Check / TypeScript
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (12)
.changeset/twelve-meals-sit.md (1)

1-6: LGTM!

Changeset correctly marks both affected packages as patch updates with a clear description of the version policy change.

apps/meteor/server/startup/serverRunning.ts (1)

24-27: Skipping deprecation check in development and test modes looks reasonable.

This prevents noisy warnings during local dev and CI runs.

scripts/set-mongo-version.mjs (2)

118-140: replaceAllOrThrow logic is sound.

Proper lastIndex reset for global/sticky patterns, and the distinction between "pattern didn't match at all" (throw if required) vs. "pattern matched but replacement was identical" (no-op) is well handled.


161-258: Main execution block and file update orchestration look good.

The dry-run support, progress output, and centralized version management across multiple config files is a solid approach. The regex patterns are appropriately tailored to each target file's format.

docker-compose-ci.yml (1)

178-178: LGTM!

Default MongoDB version correctly updated to 8.0 while remaining overrideable via MONGODB_VERSION.

docker-compose-local.yml (1)

133-133: Good improvement: parameterized with env variable override.

Previously hardcoded, now consistent with docker-compose-ci.yml and overrideable via MONGODB_VERSION.

ee/packages/federation-matrix/docker-compose.test.yml (1)

122-123: LGTM!

Parameterized with MONGODB_FEDERATION_VERSION and a sensible default, consistent with the separate federation version derivation logic in set-mongo-version.mjs.

.github/workflows/ci.yml (3)

161-162: LGTM — draft release notification updated to compatibleMongoVersions: ["8.0"].

Consistent with the version policy change.


551-552: LGTM — EE test jobs updated to MongoDB 8.0.

Both test-api-ee and test-ui-ee consistently use ['8.0'] for mongodb-version and '8.0' for coverage.

Also applies to: 573-574


984-985: LGTM — final release notification updated consistently.

.github/workflows/ci-test-e2e.yml (1)

22-25: LGTM — default MongoDB version updated to 8.0 LTS.

Aligns with the PR objective to target the long-term-support release instead of the short-lived 8.2 Rapid Release.

package.json (1)

31-31: New utility script for MongoDB version management looks good.

Centralizing version updates via set:mongo-version is a solid approach to keep CI workflows, Docker Compose files, and other configs in sync. Verify the referenced script exists and handles edge cases (e.g., no arguments, invalid version format).
[approve_code_changes, request_verification]

#!/bin/bash
# Verify the script file exists and check its basic structure
fd 'set-mongo-version.mjs' --type f
echo "---"
cat scripts/set-mongo-version.mjs 2>/dev/null | head -40

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.45%. Comparing base (f5d4ecd) to head (deaefe9).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #38596   +/-   ##
========================================
  Coverage    70.45%   70.45%           
========================================
  Files         3174     3174           
  Lines       111005   111004    -1     
  Branches     20000    20019   +19     
========================================
+ Hits         78207    78208    +1     
+ Misses       30758    30755    -3     
- Partials      2040     2041    +1     
Flag Coverage Δ
unit 71.40% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

KevLehman
KevLehman previously approved these changes Feb 10, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.1GiB 1.1GiB +11MiB
rocketchat 360MiB 349MiB +11MiB
omnichannel-transcript-service 134MiB 134MiB -2.2KiB
queue-worker-service 134MiB 134MiB -568B
ddp-streamer-service 128MiB 128MiB +772B
account-service 115MiB 115MiB +2.0KiB
authorization-service 112MiB 112MiB -1.9KiB
presence-service 112MiB 112MiB +1.1KiB

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 22:31", "12/16 22:18", "12/17 21:04", "12/18 23:12", "12/19 23:27", "12/20 21:03", "12/22 18:54", "12/23 16:16", "12/24 19:38", "12/25 17:51", "12/26 13:18", "12/29 19:01", "12/30 20:52", "02/12 03:41", "02/12 13:20 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
Loading

Statistics (last 30 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.4GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.1GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-38596
  • Baseline: develop
  • Timestamp: 2026-02-12 13:20:22 UTC
  • Historical data points: 30

Updated: Thu, 12 Feb 2026 13:20:23 GMT

Copilot AI and others added 4 commits February 11, 2026 02:10
Co-authored-by: ggazzo <5263975+ggazzo@users.noreply.github.com>
Co-authored-by: ggazzo <5263975+ggazzo@users.noreply.github.com>
…ecation-warning

Fix MongoDB <8.0 deprecation warning for version 8.x
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Feb 12, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Feb 12, 2026
@ggazzo ggazzo merged commit 379c2b2 into develop Feb 12, 2026
41 of 43 checks passed
@ggazzo ggazzo deleted the chore/mongo-8.0 branch February 12, 2026 13:57
TheRazorbill pushed a commit to TheRazorbill/Rocket.Chat that referenced this pull request Feb 20, 2026
TheRazorbill pushed a commit to TheRazorbill/Rocket.Chat that referenced this pull request Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants