Skip to content

Conversation

@bytestream
Copy link
Member

  • Handle docker-compose

@bytestream bytestream force-pushed the meilisearch-upgrade branch from 841adb5 to 7dbf1be Compare January 6, 2026 12:48
@bytestream bytestream marked this pull request as ready for review January 6, 2026 12:49
Copilot AI review requested due to automatic review settings January 6, 2026 12:49
Copy link
Contributor

Copilot AI left a 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.

Comment on lines +29 to +32
error_exit() {
echo "ERROR: $1" >&2
echo "A debug log is available in: $LOG_FILE"
exit 1
Copy link

Copilot AI Jan 6, 2026

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.

Copilot uses AI. Check for mistakes.

# Check if a version requires data dumping for upgrade
meili_requires_upgrade() {
local MEILISEARCH_DUMPLESS_VERSION="1.12.0"
Copy link

Copilot AI Jan 6, 2026

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.

Suggested change
local MEILISEARCH_DUMPLESS_VERSION="1.12.0"
local -r MEILISEARCH_DUMPLESS_VERSION="1.12.0"

Copilot uses AI. Check for mistakes.
bytestream and others added 5 commits January 6, 2026 13:52
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>
@bytestream bytestream merged commit 5814c88 into master Jan 6, 2026
2 of 3 checks passed
@bytestream bytestream deleted the meilisearch-upgrade branch January 6, 2026 14:04
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.

2 participants