Skip to content

Conversation

@ikreymer
Copy link
Member

@ikreymer ikreymer commented Dec 11, 2025

When switching from 6.0 -> 7.0, mongo remains in '6.0' compatibility mode, so we need to set it to use 7.0 features.
This allows for eventual default image upgrade to mongo 8.0. To do that, we first need to update to 7.0 and update flag to have it not stay in 6.0-compatibility mode. 8.0 does not have 6.0-compatibility mode, so direct update is not possible, unfortunately.

Browsertrix already works with 8.0, but the default image needs to be upgraded to 7.0 first before upgrading to 8.0 for this reason -- it's not possible to update from mongo 6 to mongo 8 directly.

This should be done first thing so better to do it before db migrations.

Testing

  1. Start a new Browsertrix with mongo 6.0 (without this PR)
  2. Switch to this PR, observe the image switched to 7.0 and the db version update logged in the migrations init container.
  3. You can then update to mongo 8.0, eg. via local.yaml - not in this PR, for a future update - without issue

- set feature compatibility version to be 7.0 to support future upgrades
- allow updating feature compatibility version on startup
- fixes #2680
Copy link
Member

@tw4l tw4l left a comment

Choose a reason for hiding this comment

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

Tested locally following the instructions in this PR. Verified that the compatibility version upgrade to 7 was logged in the migrations container, the database image was upgraded, and I'm still able to run crawls, see existing data, and otherwise do everything I expect to be able to do in Browsertrix following the upgrade.

@ikreymer ikreymer merged commit a128ebe into main Dec 11, 2025
24 checks passed
@ikreymer ikreymer deleted the mongo-migrate branch December 11, 2025 23:39
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.

[Change]: Migrate default MongoDB version from 6 to 7/8

3 participants