Skip to content

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 not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

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: f3ceaf5

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.

Comment on lines 87 to 93
if (!skipMongoDbDeprecationCheck && semver.satisfies(semver.coerce(mongoVersion)!, '<8.0.0')) {
msg = [
`YOUR CURRENT MONGODB VERSION (${mongoVersion}) IS DEPRECATED.`,
'IT WILL NOT BE SUPPORTED ON ROCKET.CHAT VERSION 8.0.0 AND GREATER,',
'PLEASE UPGRADE MONGODB TO VERSION 8.0 OR GREATER',
].join('\n');
showWarningBox('DEPRECATION', msg);
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Deprecation message references "ROCKET.CHAT VERSION 8.0.0" but this is Rocket.Chat 8.x.

Line 90 says MongoDB < 8.0 "WILL NOT BE SUPPORTED ON ROCKET.CHAT VERSION 8.0.0 AND GREATER," but this code ships with Rocket.Chat 8.x. If MongoDB 7.x is still intentionally allowed (soft-deprecated), the message should reference the next major version where it will actually be removed, or state it's deprecated now and will be blocked in a future release. As written, users on RC 8.x seeing this warning will be confused because the stated cutoff has already passed.

🤖 Prompt for AI Agents
In `@apps/meteor/server/startup/serverRunning.ts` around lines 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.

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.36%. Comparing base (248e4fa) to head (f3ceaf5).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38596      +/-   ##
===========================================
- Coverage    70.41%   70.36%   -0.05%     
===========================================
  Files         3162     3174      +12     
  Lines       110663   110886     +223     
  Branches     19940    19927      -13     
===========================================
+ Hits         77923    78026     +103     
- Misses       30711    30815     +104     
- Partials      2029     2045      +16     
Flag Coverage Δ
e2e 60.45% <ø> (+0.03%) ⬆️
e2e-api 47.71% <0.00%> (-1.10%) ⬇️
unit 71.35% <ø> (-0.03%) ⬇️

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 0B 0B 0B
account-service 0B 0B 0B
authorization-service 0B 0B 0B
ddp-streamer-service 0B 0B 0B
omnichannel-transcript-service 0B 0B 0B
presence-service 0B 0B 0B
queue-worker-service 0B 0B 0B
rocketchat 0B 0B 0B

📊 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/18 22:53", "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/11 02:37 (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.00]
  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.00]
  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.00]
  line "omnichannel-transcript-service" [0.14, 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.00]
  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.00]
  line "queue-worker-service" [0.14, 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.00]
  line "rocketchat" [0.35, 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.00]
Loading

Statistics (last 30 days):

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

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

  • Tag: pr-38596
  • Baseline: develop
  • Timestamp: 2026-02-11 02:37:25 UTC
  • Historical data points: 30

Updated: Wed, 11 Feb 2026 02:37:25 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
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.

3 participants