Skip to content

docs(billing): document MongoDB ≥ 5.2 minimum (#3630)#3638

Merged
PierreBrisorgueil merged 2 commits intomasterfrom
docs/3630-mongodb-min-5-2
May 9, 2026
Merged

docs(billing): document MongoDB ≥ 5.2 minimum (#3630)#3638
PierreBrisorgueil merged 2 commits intomasterfrom
docs/3630-mongodb-min-5-2

Conversation

@PierreBrisorgueil
Copy link
Copy Markdown
Contributor

@PierreBrisorgueil PierreBrisorgueil commented May 9, 2026

Summary

Document MongoDB ≥ 5.2 as the minimum supported version. The billing module uses the \$sortArray aggregation operator (introduced in 5.2). CI already runs mongo:7 so production is unaffected — this is a local DX fix.

Changes

  • README.md — bump install instruction + Prerequisites block
  • modules/billing/STRIPE_SETUP.md — add Requirements section with the version + symptom

Why option 1 (docs)?

Per the issue, three options were considered:

  1. Document min version ← chosen (smallest blast radius, CI already on mongo:7)
  2. Skip-guard the failing test at runtime
  3. Refactor the aggregation to avoid \$sortArray

Option 1 was selected to keep the change local DX-only and avoid touching billing aggregation code for an LSE local-Mongo issue.

Test plan

  • Markdown still renders cleanly
  • No code or test changes
  • CI green (docs-only)

closes #3630

Summary by CodeRabbit

  • Documentation
    • Updated prerequisites and setup documentation to specify MongoDB version ≥ 5.2 as a minimum requirement.

Review Change Stack

Copilot AI review requested due to automatic review settings May 9, 2026 11:00
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5117c669-54dc-4855-8c41-cba369c5b67d

📥 Commits

Reviewing files that changed from the base of the PR and between 8db3757 and b8eee90.

📒 Files selected for processing (2)
  • README.md
  • modules/billing/STRIPE_SETUP.md

Walkthrough

This pull request updates project documentation to specify MongoDB ≥ 5.2 as a minimum version requirement. The changes document that the billing module's aggregation pipeline uses the $sortArray operator, which was introduced in MongoDB 5.2, addressing test failures on older versions.

Changes

MongoDB Version Requirement Documentation

Layer / File(s) Summary
Project Prerequisites
README.md
MongoDB prerequisite changed from generic reference to specific ≥ 5.2 requirement with note on $sortArray dependency and CI MongoDB image (mongo:7).
Billing Module Setup
modules/billing/STRIPE_SETUP.md
New "Requirements" section added specifying MongoDB ≥ 5.2, explaining $sortArray test failure in older versions, and confirming CI uses mongo:7.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: documenting MongoDB ≥ 5.2 as the minimum version requirement for the billing module.
Description check ✅ Passed The description provides a summary of the change, rationale for choosing documentation over code fixes, and mentions the test plan and related issue closure, though some template sections are omitted.
Linked Issues check ✅ Passed The PR fully addresses the linked issue #3630 by documenting MongoDB ≥ 5.2 requirement, which was the selected solution to resolve the $sortArray compatibility issue.
Out of Scope Changes check ✅ Passed All changes are in-scope documentation updates directly addressing the MongoDB version requirement identified in issue #3630; no extraneous code modifications present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/3630-mongodb-min-5-2

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Documents MongoDB ≥ 5.2 as the minimum supported version to prevent local dev/test failures caused by the billing module’s use of the $sortArray aggregation operator (MongoDB 5.2+).

Changes:

  • Updates root prerequisites to explicitly require MongoDB ≥ 5.2 and explains the reason.
  • Adds a MongoDB version requirement note to the billing Stripe setup documentation, including the typical failure symptom on older MongoDB versions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
README.md Updates project prerequisites to specify MongoDB ≥ 5.2 due to billing aggregation usage.
modules/billing/STRIPE_SETUP.md Adds a Requirements section documenting MongoDB ≥ 5.2 and the common error on older versions.

@PierreBrisorgueil PierreBrisorgueil merged commit d9cf7a3 into master May 9, 2026
6 checks passed
@PierreBrisorgueil PierreBrisorgueil deleted the docs/3630-mongodb-min-5-2 branch May 9, 2026 11:02
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.

fix(billing): billing.extraBalance.listLedger.perf.integration.tests.js fails on MongoDB < 5.2 ()

2 participants