Skip to content

Add delete task api for v0.30.0 #598

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

Merged
merged 2 commits into from
Nov 28, 2022

Conversation

alallema
Copy link
Contributor

@alallema alallema commented Nov 16, 2022

Add the delete task API see spec

Enhancement

It is now possible to delete your tasks:

example:

    client.delete_tasks({"status": "failed"})

TODO

  • Implement deletel_tasks()
    • params: parameters: dict[str, Any]
    • returns: TaskInfo
  • Tests deletion with query parameters
    • With uid
    • Delete every task

@alallema alallema changed the base branch from main to bump-meilisearch-v0.30.0 November 16, 2022 14:31
@alallema alallema added the enhancement New feature or request label Nov 16, 2022
@alallema alallema force-pushed the bump-meilisearch-v0.30.0 branch from dee4333 to c54dbf0 Compare November 17, 2022 11:54
@alallema alallema force-pushed the add_delete_task_api_for_v0.30.0 branch from 727e71f to 463ea19 Compare November 21, 2022 18:04
@alallema alallema marked this pull request as ready for review November 21, 2022 18:34
Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

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

LGTM! (just an idea)

@@ -463,6 +463,25 @@ def cancel_tasks(self, parameters: dict[str, Any]) -> TaskInfo:
"""
return cancel_tasks(self.config, parameters=parameters)

def delete_tasks(self, parameters: dict[str, Any]) -> TaskInfo:
Copy link
Member

Choose a reason for hiding this comment

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

Using types in dynamic languages is complex, but I believe we at least can allow or not some parameters. WDYT?

https://github.com/meilisearch/meilisearch-ruby/pull/389/files#diff-34321aa6a7ffc59be7968ad4251433b3f6f30cdd222ed8d54572bf37f0000d7bR8-R13

I have to do that on the ruby side because of the camelCase/snake_case conversion, but it could be an excellent addition to the python SDK... (a issue could be created in this case)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, great idea it could be a really nice addition but I don't know how to do that in python, to be honest.
I will check it and create an issue about it.

@alallema alallema merged commit ec64322 into bump-meilisearch-v0.30.0 Nov 28, 2022
@alallema alallema deleted the add_delete_task_api_for_v0.30.0 branch November 28, 2022 14:14
bors bot added a commit that referenced this pull request Nov 28, 2022
588: Changes related to the next Meilisearch release (v0.30.0) r=alallema a=meili-bot

Related to this issue: meilisearch/integration-guides#221

This PR:
- gathers the changes related to the next Meilisearch release (v0.30.0) so that this package is ready when the official release is out.
- should pass the tests against the [latest pre-release of Meilisearch](https://github.com/meilisearch/meilisearch/releases).
- might eventually contain test failures until the Meilisearch v0.30.0 is out.

⚠️ This PR should NOT be merged until the next release of Meilisearch (v0.30.0) is out.

_This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/main/resources/pre-release-week.md) purpose._

- #597 
- #595 
- #596 
- #598
- #603

Co-authored-by: meili-bot <[email protected]>
Co-authored-by: alallema <[email protected]>
Co-authored-by: Amélie <[email protected]>
bors bot added a commit that referenced this pull request Nov 28, 2022
588: Changes related to the next Meilisearch release (v0.30.0) r=alallema a=meili-bot

Related to this issue: meilisearch/integration-guides#221

This PR:
- gathers the changes related to the next Meilisearch release (v0.30.0) so that this package is ready when the official release is out.
- should pass the tests against the [latest pre-release of Meilisearch](https://github.com/meilisearch/meilisearch/releases).
- might eventually contain test failures until the Meilisearch v0.30.0 is out.

⚠️ This PR should NOT be merged until the next release of Meilisearch (v0.30.0) is out.

_This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/main/resources/pre-release-week.md) purpose._

- #597 
- #595 
- #596 
- #598
- #603

Co-authored-by: meili-bot <[email protected]>
Co-authored-by: alallema <[email protected]>
Co-authored-by: Amélie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants