Skip to content

Commit 1fdb8f7

Browse files
wyattwalterclaude
andauthored
chore(deploy): raise embedded MongoDB FCV floor to 7.0 (#41922)
## What Raise the embedded MongoDB `featureCompatibilityVersion` (FCV) floor from 6.0 to 7.0 in `mongodb-fixer.sh` (`FCV_MIN`). This release still ships MongoDB 7.x. The fixer now raises existing data's FCV to 7.0 once mongod is up. This is groundwork for a later MongoDB 8.x upgrade: MongoDB 8.x refuses to start on data below FCV 7.0, so bumping the data to 7.0 now — under MongoDB 7.x, which supports both 6.0 and 7.0 — lets that future release boot cleanly. ## What is intentionally NOT changed The pre-flight startup check `ensure_mongodb_fcv_compatible` in `entrypoint.sh` is left at the 6.0 mongod floor. MongoDB 7.x boots fine on FCV 6.0 data, so there is no need to raise the startup minimum yet. That is handled in the release that actually ships MongoDB 8.x. ## Tradeoff Raising FCV to 7.0 forfeits the ability to roll back to a 6.x Appsmith release (which shipped MongoDB 6.x) without first deleting the Mongo data files. Instances on this release are well past the 6.x line, so this is an accepted one-way step. ## Follow-up for the 8.x release (not this PR) The preflight fast-path checks the FCV marker file's presence only, not its value. A customer skipping this release and jumping from a 6.0-floor release straight to the 8.x release would have FCV-6.0 data plus a present marker, so the preflight would skip and mongod 8.x would refuse to boot. The 8.x release must compare the marker's stored value against 7.0 (or bump the marker filename). ## Sync note `mongodb-fixer.sh` is identical between CE and EE, so this CE change carries into EE via the hourly sync with no separate EE edit. Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated MongoDB minimum feature compatibility version from 6.0 to 7.0 to ensure data is brought up to (and enforced against) the higher compatibility floor. <!-- end of auto-generated comment: release notes by coderabbit.ai --> <!-- This is an auto-generated comment: Cypress test results --> > [!WARNING] > Tests have not run on the HEAD 60a89ee yet > <hr>Tue, 23 Jun 2026 21:24:20 UTC <!-- end of auto-generated comment: Cypress test results --> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 4a30154 commit 1fdb8f7

1 file changed

Lines changed: 23 additions & 11 deletions

File tree

deploy/docker/fs/opt/appsmith/mongodb-fixer.sh

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,22 @@ set -o nounset
1313
# current FCV. Use `mongosh` if you want the live value.
1414
MONGO_FCV_MIN_MARKER="/appsmith-stacks/data/mongodb/.appsmith-mongo-fcv-min"
1515

16-
# Minimum FCV this Appsmith release commits to preserve. We deliberately do
17-
# NOT raise FCV to 7.0 — keeping it at 6.0 preserves the ability to roll back
18-
# to a 6.x Appsmith release if something goes wrong. When MongoDB 8 arrives,
19-
# bump this constant to 7.0; the ensure_fcv_floor block below will handle the
20-
# `setFeatureCompatibilityVersion` call automatically.
21-
FCV_MIN="6.0"
16+
# Minimum FCV this Appsmith release commits to preserve. We raise this to 7.0
17+
# (up from 6.0) as groundwork for the upcoming MongoDB 8.x upgrade: MongoDB 8.x
18+
# refuses to start on data below FCV 7.0, so we bump the data to 7.0 now, while
19+
# this release still runs MongoDB 7.x. A later release can then ship MongoDB 8.x
20+
# and boot cleanly on data that is already at FCV 7.0.
21+
#
22+
# This release still ships MongoDB 7.x, whose binary only requires FCV >= 6.0 to
23+
# start (see entrypoint.sh::ensure_mongodb_fcv_compatible). The 7.0 floor here is
24+
# forward-prep applied by the block below, not a startup requirement yet — the
25+
# pre-flight check in entrypoint.sh is intentionally left at the 6.0 mongod floor.
26+
#
27+
# Tradeoff: raising FCV to 7.0 forfeits the ability to roll back to an Appsmith
28+
# release that bundles MongoDB 6.x (1.99 and earlier) without first deleting the
29+
# Mongo data files. Instances on this release are well past that line, so this is
30+
# an accepted one-way step.
31+
FCV_MIN="7.0"
2232

2333
write_fcv_marker() {
2434
local value="$1"
@@ -42,11 +52,13 @@ while ! supervisorctl status mongodb | grep -q RUNNING; do
4252
done
4353
tlog "MongoDB is RUNNING"
4454

45-
# Ensure FCV is at the floor this release commits to. In the steady state this
46-
# is a no-op — entrypoint.sh's pre-flight probe already guarantees mongod won't
47-
# come up on data below the supported FCV. The check is kept active so the
48-
# upgrade scaffolding is exercised and the next major-version bump is just a
49-
# constant change.
55+
# Ensure FCV is at the floor this release commits to. On the first boot of a
56+
# release that raises the floor, this performs the actual upgrade — e.g. issuing
57+
# setFeatureCompatibilityVersion to carry data from 6.0 up to 7.0. Because the
58+
# floor (7.0) now sits above the minimum FCV the embedded MongoDB 7.x binary needs
59+
# to start (6.0), this block — not entrypoint.sh's pre-flight probe — is what
60+
# raises the data to the committed floor. Once the data is already at the floor it
61+
# is a no-op, so it stays safe to run on every boot.
5062
tlog "Ensuring MongoDB featureCompatibilityVersion is at least $FCV_MIN"
5163
for _ in {1..60}; do
5264
if mongosh --quiet "$APPSMITH_DB_URL" --eval '

0 commit comments

Comments
 (0)