Skip to content

Add tasks filters for v0.30.0 #375

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 13 commits into from
Nov 15, 2022

Conversation

bidoubiwa
Copy link
Contributor

@bidoubiwa bidoubiwa commented Nov 9, 2022

Add new filters on the get /tasks route.

Present in this spec

TODO:
V0.30.0rc1

  • TasksQuery:
    • index_uid renamed to index_uids
    • type renamed to types
    • status renamed to statuses
    • uid renamed to uids
  • In TaskQuery impl constructor:
    • with_index_uid renamed to with_index_uids
    • with_type renamed to with_types
    • with_status renamed to with_statuses
    • with_uid renamed to with_uids
  • ErrorsCodes:
    • invalid_task_types_filter
    • invalid_task_statuses_filter
    • invalid_task_canceled_by_filter
    • invalid_task_uids_filter
    • invalid_task_date_filter
    • missing_task_filter

V0.30.0rc0
in TasksQuery struct:

  • Add uid
  • Add before_enqueued_at
  • Add after_enqueued_at
  • Add before_started_at
  • Add after_started_at
  • Add before_finished_at
  • Add after_finished_at

In TaskQuery impl constructor:

  • Add uids: None
  • Add before_enqueued_at: None
  • Add after_enqueued_at: None
  • Add before_started_at: None
  • Add after_started_at: None
  • Add before_finished_at: None
  • Add after_finished_at: None

in TasksQuery implementation:

  • Add with_uids()
  • Add with_before_enqueued_at()
  • Add with_after_enqueued_at()
  • Add with_before_started_at()
  • Add with_after_started_at()
  • Add with_before_finished_at()
  • Add with_after_finished_at()

Tests:

  • Add test on filters

@bidoubiwa bidoubiwa changed the title WIP Add filters in tasksQuery WIP Add tasks filters for v0.30.0 Nov 9, 2022
@bidoubiwa bidoubiwa requested a review from alallema November 10, 2022 14:04
@bidoubiwa bidoubiwa marked this pull request as ready for review November 10, 2022 14:04
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.

Just a comment

Co-authored-by: Amélie <[email protected]>
@bidoubiwa bidoubiwa requested a review from alallema November 10, 2022 15:52
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.

Good job 🎉
LGTM! 🌯

@bidoubiwa bidoubiwa changed the title WIP Add tasks filters for v0.30.0 Add tasks filters for v0.30.0 Nov 14, 2022
@bidoubiwa bidoubiwa force-pushed the bump-meilisearch-v0.30.0 branch from 65c2527 to 0cf2505 Compare November 15, 2022 18:04
@bidoubiwa bidoubiwa merged commit 02d1008 into bump-meilisearch-v0.30.0 Nov 15, 2022
@bidoubiwa bidoubiwa deleted the add_tasks_filters_for_v0.30.0 branch November 15, 2022 18:10
@bidoubiwa bidoubiwa added the breaking-change The related changes are breaking for the users label Nov 16, 2022
bors bot added a commit that referenced this pull request Nov 28, 2022
399: Update version for the next release (v0.21.0) r=bidoubiwa a=bidoubiwa

This version makes this package compatible with Meilisearch v0.30.0 🎉
Check out the changelog of [Meilisearch v0.30.0](https://github.com/meilisearch/meilisearch/releases/tag/v0.30.0) for more information on the changes.

## 🚀 Enhancements

- New `pagination` strategy with the search parameters`page` and `hitsPerPage` #374
- New bulder methods on `get_tasks`: `with_uids`, `with_before_enqueued_at`, ... see #375
- New `client.cancel_tasks` method that lets you cancel `enqueued` and `processing` tasks #377 
- New `client.delete_tasks` method that lets you delete tasks #381 
- New `client.swap_indexes` method that lets you swap two indexes #382

## ⚠️ Breaking change

- builder functions on `TasksQuery` name changes: #375
   - `with_status` -> `with_statuses`
   - `with_index_uid` -> `with_index_uids`
   - `with_type` -> `with_types`
- Task detail `receivedDocumentIds` renamed to `providedIds` #393
- Error field in `Task` is now always present and has a `None` value when there are no errors #390
- Add and rename some error codes: #384 

Co-authored-by: Charlotte Vermandel <[email protected]>
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.

3 participants