Repository navigation
Let a newer Meilisearch upgrade its volume instead of refusing to start - #12
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 setsMEILI_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.rsat v1.55.0). Without the variable, the nextmake upafter 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
Verification
Reviewers. Four independent read-only reviews (security; containers and proxy; shell portability; acceptance coverage) found nothing blocking. Their notes:
make reset;Upgrade rehearsal, on the existing local volume:
/versionreports 1.54.3, and a test document goes into arehearsalindex.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)."make upbrings every service up healthy. The log showsindex_scheduler::upgrade: Upgrading the task queue,/versionreports 1.55.0, and the test document is still there.make smokepasses all 32 checks.Clean rehearsal, on this branch:
make reset CONFIRM=yes,make bootstrap,make up. Every service is healthy, andmake smokepasses all 32 checks.make lintpasses 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.