Skip to content

Let a newer Meilisearch upgrade its volume instead of refusing to start - #12

Merged
ABilenduke merged 1 commit into
mainfrom
meilisearch-upgrade-db
Oct 25, 2026
Merged

ABilenduke merged 1 commit into
mainfrom
meilisearch-upgrade-db

Conversation

@ABilenduke

@ABilenduke ABilenduke commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

No issue: this unblocks Dependabot's #9, which moves Meilisearch from 1.54.3 to 1.55.0.

What changed

  • compose.yaml: the meilisearch service sets MEILI_UPGRADE_DB: "true".

Meilisearch won't open a database that another version wrote. Its startup check compares major, minor and patch (crates/meilisearch/src/lib.rs at v1.55.0). Without the variable, the next make up after any Meilisearch bump stops the service until someone deletes its volume, and that would happen on every bump, for every contributor. With the variable, the new version upgrades the volume in place. Both 1.54.3 and 1.55.0 read it (crates/meilisearch/src/option.rs). CI's smoke job starts from empty volumes, so it can't catch this.

Requirements covered

Requirement Evidence
An existing volume survives a Meilisearch bump Upgrade rehearsal below
The variable is harmless on the current version Clean rehearsal below, on 1.54.3
AGENTS.md: reviewers and a rehearsal from nothing before the PR Both below

Verification

Reviewers. Four independent read-only reviews (security; containers and proxy; shell portability; acceptance coverage) found nothing blocking. Their notes:

  • an upgrade can't be undone, and Meilisearch doesn't support a downgrade, so going back means make reset;
  • the healthcheck allows about 80 s, which is enough for a local database;
  • no automated check exercises an upgrade, so the upgrade rehearsal below stands in for one.

Upgrade rehearsal, on the existing local volume:

  1. On this branch (1.54.3): Meilisearch is healthy, /version reports 1.54.3, and a test document goes into a rehearsal index.
  2. With Bump the base-images group across 2 directories with 2 updates #9 merged in but the variable off (MEILI_UPGRADE_DB=false), 1.55.0 refuses to start: "Your database version (1.54.3) is incompatible with your current engine version (1.55.0)."
  3. With Bump the base-images group across 2 directories with 2 updates #9 merged in and the variable on, make up brings every service up healthy. The log shows index_scheduler::upgrade: Upgrading the task queue, /version reports 1.55.0, and the test document is still there. make smoke passes all 32 checks.

Clean rehearsal, on this branch: make reset CONFIRM=yes, make bootstrap, make up. Every service is healthy, and make smoke passes all 32 checks. make lint passes too. The rehearsal ran in an existing checkout, so bootstrap reused its root certificate; a fresh clone would also ask Windows to trust a new root.

Risk and rollback

An upgrade is one-way: going back to an older image after its volume has been upgraded needs make reset. The volume holds only local development data. To roll back the change, revert; Meilisearch bumps then need the volume deleted again.

@ABilenduke
ABilenduke merged commit b0c90e4 into main Oct 25, 2026
6 checks passed
@ABilenduke
ABilenduke deleted the meilisearch-upgrade-db branch October 25, 2026 14:42
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