Skip to content

test(server): run embedded MongoDB natively on Apple Silicon - #42275

Open
wyattwalter wants to merge 1 commit into
releasefrom
codex/app-16017
Open

wyattwalter wants to merge 1 commit into
releasefrom
codex/app-16017

Conversation

@wyattwalter

@wyattwalter wyattwalter commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Server JUnit tests download Intel-only MongoDB 5.0.5 on Apple Silicon, so running tests through an IDE or coding agent triggers macOS Rosetta deprecation warnings. Pin embedded MongoDB to 7.0.34 and align the test-only Flapdoodle dependencies at 4.33.0, using the Spring 3.x integration. The resolver selects native packages automatically; 7.0.34 is the newest MongoDB 7 release listed in this compatible resolver.

Add regression coverage for macOS ARM64/x86_64, Ubuntu 22.04 ARM64/x86_64, and Windows x86_64 package selection. A live Spring/Flapdoodle test checks the launched server's architecture, configured version, replica-set readiness, and transaction commit/abort. Document the standalone smoke-test command.

Fixes https://linear.app/appsmith/issue/APP-16017

Testing

  • CE: 18 focused and existing repository tests passed, covering native startup, transactions, user repositories, user data, and plugins.
  • EE: the same 18 tests passed with the CE patch applied locally. The patch applies cleanly; no separate EE merge PR is needed.
  • Final regression tests run against the original pins: 4 expected failures, including Intel archive selection and the live server reporting x86_64 on an ARM64 JVM. Restoring the new pins gives 7/7 passing tests.
  • Downloaded mongod verified as Mach-O 64-bit executable arm64.
  • Spotless, dependency tree, and whitespace checks passed. Both Flapdoodle dependencies remain test-scoped.
  • CI and Cypress passed on commit 602d392e17dffacb4e98792275a94a0f09226f3e: quality checks, Cypress.

Completeness: checked both CE/EE version pins and dependencies, the shared TransactionalConfig replica-set arguments, existing MongoDB-backed repository tests, and server setup documentation. Datasource-plugin MongoDB tests use Testcontainers and do not use this embedded binary. Production Docker/Helm MongoDB settings are unchanged.

Impact on existing instances

State Impact
Fresh install No production change; only JUnit's disposable database changes.
Upgrade from defaults No production database or data migration.
Upgrade from customized settings Existing MongoDB connection settings remain unchanged.
Rollback Reverts the test dependency pins; no production data rollback required.

The first test run downloads the native archive. Old cached archives can coexist; deleting the cache is unnecessary. Apple Silicon test execution requires an ARM64 JDK.

Automation

/ok-to-test tags="@tag.All"

🔍 Cypress test results

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/35871157120
Commit: 602d392
Cypress dashboard.
Tags: @tag.All
Spec:


Wed, 23 Sep 2026 14:50:42 UTC

Summary by CodeRabbit

  • Tests
    • Added checks for embedded MongoDB startup, platform compatibility, replica-set behavior, and transaction commit and rollback.
    • Added coverage to verify MongoDB package selection across supported operating systems and architectures.
  • Documentation
    • Added guidance for running MongoDB-backed server tests, including platform requirements, version configuration, and test commands.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: appsmithorg/appsmith/.coderabbit.yaml

Review profile: CHILL

Plan: Essentials

Run ID: 48d1f662-76c5-4650-b3e0-cd7748cf3501

📥 Commits

Reviewing files that changed from the base of the PR and between bb851c2 and 602d392.

📒 Files selected for processing (5)
  • app/server/appsmith-server/pom.xml
  • app/server/appsmith-server/src/test/java/com/appsmith/server/configurations/EmbeddedMongoPackageTest.java
  • app/server/appsmith-server/src/test/java/com/appsmith/server/configurations/EmbeddedMongoTest.java
  • app/server/appsmith-server/src/test/resources/application-test.properties
  • contributions/ServerSetup.md

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


Walkthrough

The server test setup now uses Flapdoodle 4.33.0 and MongoDB 7.0.34. New tests check platform package URLs, embedded server and replica-set properties, and transaction outcomes. Server setup documentation describes the configuration and test command.

Changes

Embedded MongoDB tests

Layer / File(s) Summary
Embedded MongoDB test setup
app/server/appsmith-server/pom.xml, app/server/appsmith-server/src/test/resources/application-test.properties, contributions/ServerSetup.md
The test dependencies use Flapdoodle 4.33.0, and the configured MongoDB version changes to 7.0.34. The setup guide documents the embedded replica set, platform requirements, cache location, and test command.
Platform package resolution checks
app/server/appsmith-server/src/test/java/com/appsmith/server/configurations/EmbeddedMongoPackageTest.java
A parameterized test checks package URLs for macOS, Ubuntu 22.04, and Windows architectures against the configured MongoDB version.
Replica-set and transaction checks
app/server/appsmith-server/src/test/java/com/appsmith/server/configurations/EmbeddedMongoTest.java
Tests check the embedded server version and architecture, replica-set primary status, and transaction commit and abort results. The transaction test drops its collection in a finally block.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: sondermanish

Merge Risk: ⚪ Minimal · up to 602d3

No actionable issue is established. The change is ready for normal test validation before merge.

🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: running embedded MongoDB natively on Apple Silicon.
Description check ✅ Passed The description follows the template and provides motivation, issue tracking, testing evidence, impact analysis, dependencies, and documentation context. The validation and communication checkboxes ar…
Linked Issues check ✅ Passed The description includes a linked issue using the required Fixes reference: APP-16017.
Out of Scope Changes check ✅ Passed The changes remain within scope. They update test-only embedded MongoDB dependencies, add regression tests, and document test setup without changing production MongoDB settings.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Mongo starts with versions pinned tight,
Native builds meet each platform right.
A replica stands, writable and clear,
Commit and abort both leave records here.
Test notes guide the next run near.

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

@linear-code

linear-code Bot commented Sep 23, 2026

Copy link
Copy Markdown

APP-16017

@wyattwalter wyattwalter added the ok-to-test Required label for CI label Sep 23, 2026
@wyattwalter

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@wyattwalter
wyattwalter marked this pull request as ready for review September 23, 2026 16:18
@wyattwalter
wyattwalter requested a review from a team as a code owner September 23, 2026 16:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Required label for CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants