-
Notifications
You must be signed in to change notification settings - Fork 3
chore: upgrade meilisearch #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bytestream
commented
Sep 23, 2025
- Handle docker-compose
…pgrade dump marker
This reverts commit 471b7aa.
841adb5 to
7dbf1be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the Docker monolithic upgrade script with comprehensive Meilisearch upgrade handling. The changes add sophisticated version detection, logging infrastructure, and automated data migration logic to handle Meilisearch version upgrades, particularly for versions below 1.12.0 that require database reindexing.
Key changes:
- Added logging infrastructure with automatic log file generation and debug logging throughout the upgrade process
- Implemented Meilisearch version detection and comparison logic to determine if data dump/reindex is required
- Enhanced error handling with detailed error messages and references to debug logs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| error_exit() { | ||
| echo "ERROR: $1" >&2 | ||
| echo "A debug log is available in: $LOG_FILE" | ||
| exit 1 |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message states "A debug log is available in:" but the log file is not touched or created if an error occurs before line 21. If error_exit is called before LOG_FILE is initialized (e.g., during argument parsing), this will reference an undefined variable or non-existent file. Consider initializing LOG_FILE earlier or checking if it exists before printing this message.
|
|
||
| # Check if a version requires data dumping for upgrade | ||
| meili_requires_upgrade() { | ||
| local MEILISEARCH_DUMPLESS_VERSION="1.12.0" |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable name MEILISEARCH_DUMPLESS_VERSION uses all uppercase, which is appropriate for a constant. However, it should be declared with readonly to make it a true constant and prevent accidental modification.
| local MEILISEARCH_DUMPLESS_VERSION="1.12.0" | |
| local -r MEILISEARCH_DUMPLESS_VERSION="1.12.0" |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>