Skip to content

feat: introduce managed mongodb orchestration for local development#40350

Draft
cardoso wants to merge 8 commits intodevelopfrom
dev-db
Draft

feat: introduce managed mongodb orchestration for local development#40350
cardoso wants to merge 8 commits intodevelopfrom
dev-db

Conversation

@cardoso
Copy link
Copy Markdown
Member

@cardoso cardoso commented Apr 30, 2026

Proposed changes (including videos or screenshots)

This PR introduces a new managed development database workflow and integrates it into local Meteor startup.

Main changes:

  1. Added a new @rocket.chat/dev-db package with a command lifecycle for up, down, status, url, logs, doctor, and reset.
  2. Implemented backend selection with policy controls and explicit override support:
  • external
  • docker
  • binary
  • auto/preference policies
  1. Added robust lifecycle safety mechanisms:
  • lock/state management
  • deterministic exit behavior
  • health checks and readiness gates
  1. Implemented Docker backend support for managed MongoDB lifecycle.
  2. Implemented Binary backend support with local binary resolution and managed process lifecycle.
  3. Added deterministic seed profiles and reset-with-seed support.
  4. Integrated managed DB startup into Meteor dev flow by resolving DB URLs before launching Meteor.
  5. Added root scripts for easy dev-db operations.
  6. Moved dev-db documentation into a dedicated document and removed the temporary section from the Meteor modern stack doc.

Issue(s)

Steps to test or reproduce

  1. Build dev-db:
  • yarn workspace @rocket.chat/dev-db build
  1. Start managed DB:
  • yarn dev-db:up
  1. Validate state:
  • yarn dev-db:status
  • yarn dev-db:url
  1. Run Meteor with managed DB:
  • yarn dev
  1. Validate backend overrides:
  • DEV_DB_BACKEND=docker yarn dev-db:up
  • DEV_DB_BACKEND=binary yarn dev-db:up
  • DEV_DB_BACKEND=external DEV_DB_EXTERNAL_MONGO_URL=<mongo-url> yarn dev-db:up
  1. Validate reset + seed:
  • yarn dev-db:reset --seed demo
  1. Teardown:
  • yarn dev-db:down

Further comments

  • A rollback path is available via DEV_DB_BYPASS_MANAGED=1.
  • This change is designed to improve local setup consistency while preserving flexibility across environments.

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented Apr 30, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 30, 2026

⚠️ No Changeset found

Latest commit: e9bd703

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2e3969ae-71f4-467e-8de4-d6c0b4283768

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.84%. Comparing base (981af32) to head (e9bd703).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #40350      +/-   ##
===========================================
- Coverage    69.86%   69.84%   -0.02%     
===========================================
  Files         3298     3298              
  Lines       119347   119347              
  Branches     21530    21506      -24     
===========================================
- Hits         83377    83357      -20     
- Misses       32672    32692      +20     
  Partials      3298     3298              
Flag Coverage Δ
unit 70.58% <ø> (-0.04%) ⬇️

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.

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.

1 participant