Skip to content

Conversation

irevoire
Copy link
Contributor

@irevoire irevoire commented Feb 3, 2022

We’ll do a little overview of what changed in this PR.

For the users:

  • All the update types have been renamed to task
  • The creation and deletion of index are now asynchronous
  • The Progress type have been removed entirely.
  • The method wait_for_pending_update has been replaced by the method wait_for_task which takes a task uid or a task directly in parameter.
  • A method wait_for_completion has been implemented directly on the Task

For the contributors:

@irevoire irevoire changed the base branch from main to bump-meilisearch-v0.25.0 February 7, 2022 12:46
@irevoire irevoire marked this pull request as ready for review February 8, 2022 13:37
Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

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

That is an amazing job that you've done here, especially this proc macro 🎉
Thank you very much for the time you took to improve this SDK!

run: cargo build --verbose
- name: Meilisearch (latest version) setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --no-analytics=true --master-key=masterKey
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --no-analytics --master-key=masterKey
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --no-analytics --master-key=masterKey
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --no-analytics=true --master-key=masterKey

Copy link
Member

Choose a reason for hiding this comment

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

Not yet, will be for v0.26.0, not v0.25.0 :)

Copy link
Member

Choose a reason for hiding this comment

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

I am not sure that I understand that, the previous version of meilisearch works with this change, and the newer version (v0.26) will only work with this change. This patch makes the command line compatible with the future version of Meilisearch and doesn't break the v0.25 one.

Can't we accept this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hum from what I see it has been merged some times ago already; meilisearch/meilisearch#1984
And it works for me on meilisearch v0.25.2

Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

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

Thank you so much for this PR @irevoire ❤️
✨ Amazing work ✨
I left a few comments.

Also I didn't see the wait_for_task function in the Index can we do something like:

client.index("indexName").wait_for_task(1);

let t1 = index.set_filterable_attributes(["kind", "value"]).await?;
let t2 = index.set_sortable_attributes(["title"]).await?;

t2.wait_for_completion(client, None, None).await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

I really like this name wait_for_completion 🥇 . You could do an issue to propose this new name 😊

@curquiza curquiza changed the title Bump meilisearch to v0.25.0 Bump meilisearch to v0.25.0 - Regarding new task API Feb 8, 2022
@curquiza curquiza changed the title Bump meilisearch to v0.25.0 - Regarding new task API Bump meilisearch to v0.25.0 - New task API Feb 8, 2022
Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

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

Awesome 🔥 🔥 🔥
LGTM!

Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

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

Could you remove the serialize lines, please? :)

@irevoire
Copy link
Contributor Author

irevoire commented Feb 8, 2022

oops yes sorry I thought I clicked on the commit suggestion button my bad.

Update CONTRIBUTING.md

Apply code suggestions

Co-authored-by: Amélie <[email protected]>
Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

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

Looks good to me Tamo! Thank you!

@curquiza
Copy link
Member

curquiza commented Feb 8, 2022

Perfecto!

bors merge

@bors
Copy link
Contributor

bors bot commented Feb 8, 2022

Build succeeded:

@bors bors bot merged commit dd3a0a5 into meilisearch:bump-meilisearch-v0.25.0 Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change The related changes are breaking for the users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants