Skip to content
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

Introduce the meilitool command line interface #4167

Merged
merged 6 commits into from
Oct 31, 2023

Conversation

Kerollmops
Copy link
Member

@Kerollmops Kerollmops commented Oct 25, 2023

This PR introduces a small tool to help the Cloud team:

  • Clear the tasks queue by removing all the tasks
  • Dump a Meilisearch database without having to enqueue the task
  • Access this meilitool binary from the Docker Image

TODO

  • Modify the Docker File to ship with this new tool (@curquiza, could you review that, please?)
  • Clear the tasks queue by removing all the tasks
    • Add more logs to explain what is happening
    • Clear the update_files folder
  • Dump a Meilisearch database without having to enqueue the task
    • Add more logs to explain what is happening
    • Introduce a flag to skip dumping enqueued and processing tasks.
    • Dump the instance uid.
    • Dump the keys.
    • Dump the tasks with the update files.
    • Dump the index documents and settings.
    • Dump the experimental features

@Kerollmops Kerollmops added this to the v1.5.0 milestone Oct 25, 2023
@curquiza
Copy link
Member

⚠️ @Kerollmops if you add the v1.5.0 milestones, please merge the PR into release-v1.5.0 and not main

@Kerollmops Kerollmops changed the base branch from main to release-v1.5.0 October 25, 2023 13:04
@Kerollmops Kerollmops force-pushed the meilitool-cli branch 6 times, most recently from 4ec52f0 to bef1f97 Compare October 30, 2023 13:20
@Kerollmops Kerollmops marked this pull request as ready for review October 30, 2023 13:20
@curquiza
Copy link
Member

curquiza commented Oct 30, 2023

@Kerollmops can you open an issue please ("sprint issue"), link it to this PR and ping the cloud team in the issue, since it's for them mostly? No need to detail the usage, just to let them know where they can find the usage

Also, can you rebase please (git conflicts)?

@curquiza
Copy link
Member

curquiza commented Oct 30, 2023

@Kerollmops did you try to build a Docker prototype? Locally I get this error when trying to build the Docker image:

$ docker build -t test-meili-tool .

#12 248.3   Downloaded lindera-ko-dic v0.27.1
#12 248.7 error: package `anstream v0.6.4` cannot be built because it requires rustc 1.70.0 or newer, while the currently active rustc version is 1.69.0
#12 248.7 Either upgrade to rustc 1.70.0 or newer, or use
#12 248.7 cargo update -p [email protected] --precise ver
#12 248.7 where `ver` is the latest version of `anstream` supporting rustc 1.69.0
------
executor failed running [/bin/sh -c set -eux;         apkArch="$(apk --print-arch)";         if [ "$apkArch" = "aarch64" ]; then             export JEMALLOC_SYS_WITH_LG_PAGE=16;         fi &&         cargo build --release -p meilisearch -p meilitool]: exit code: 101

@Kerollmops
Copy link
Member Author

@curquiza, it seems that you should probably clear your Docker cache or something, as the current Rust version is 1.74 according to this beautiful website 😇

@curquiza
Copy link
Member

@Kerollmops it does not work on the CI either -> https://github.com/meilisearch/meilisearch/actions/runs/6694669045/job/18188526604
⚠️ I recommend testing with the Docker CI directly (= create a prototype) to ensure we can release rc2 without issue.

@Kerollmops Kerollmops added the maintenance Issue about maintenance (CI, tests, refacto...) label Oct 30, 2023
Copy link
Member

@curquiza curquiza left a comment

Choose a reason for hiding this comment

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

Just tested with a basic and healthy database (not a "stuck" one or anything) -> the tool is available and the commands work! 🎉

Dockerfile Show resolved Hide resolved
@Kerollmops
Copy link
Member Author

bors merge

Copy link
Contributor

meili-bors bot commented Oct 31, 2023

@Kerollmops Kerollmops merged commit 54f0ee1 into release-v1.5.0 Oct 31, 2023
9 of 11 checks passed
@Kerollmops Kerollmops deleted the meilitool-cli branch October 31, 2023 14:51
@meili-bot meili-bot added the v1.5.0 PRs/issues solved in v1.5.0 released on 2023-11-20 label Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Issue about maintenance (CI, tests, refacto...) v1.5.0 PRs/issues solved in v1.5.0 released on 2023-11-20
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce meilitool: a CLI tool to do operations on Meilisearch
4 participants