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

fix(type): add canceled status to type TaskStatus #1561

Merged
merged 2 commits into from
Aug 7, 2023

Conversation

nicolasvienot
Copy link
Member

@nicolasvienot nicolasvienot commented Aug 7, 2023

Pull Request

Related issue

Fixes #1560

What does this PR do?

In Meilisearch v0.30.0, the feature Cancel processing and enqueued tasks has been added.
By doing so, they added a task status canceled. It's documented here.
The status canceled is missing in the type TaskStatus in meilisearch-js.

  • Add canceled status to TaskStatus type
  • Update a test in the cancel part of the task tests

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

Copy link
Contributor

@atoulmet atoulmet left a comment

Choose a reason for hiding this comment

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

LGTM! 🎏

@atoulmet atoulmet added the bug Something isn't working label Aug 7, 2023
@atoulmet atoulmet changed the title fix: add canceled status to type TaskStatus fix(type): add canceled status to type TaskStatus Aug 7, 2023
@atoulmet atoulmet changed the title fix(type): add canceled status to type TaskStatus fix(ts): add canceled status to type TaskStatus Aug 7, 2023
@atoulmet atoulmet changed the title fix(ts): add canceled status to type TaskStatus fix(type): add canceled status to type TaskStatus Aug 7, 2023
@atoulmet
Copy link
Contributor

atoulmet commented Aug 7, 2023

bors merge

meili-bors bot added a commit that referenced this pull request Aug 7, 2023
1561: fix(type): add canceled status to type TaskStatus r=atoulmet a=nicolasvienot

# Pull Request

## Related issue
Fixes #1560

## What does this PR do?
In Meilisearch `v0.30.0`, the feature `Cancel processing and enqueued tasks` [has been added](https://github.com/meilisearch/meilisearch/releases/tag/v0.30.0).
By doing so, they added a task status `canceled`. It's documented [here](https://www.meilisearch.com/docs/reference/api/tasks#status).
The status `canceled` is missing in the type `TaskStatus` in meilisearch-js.

- Add `canceled` status to `TaskStatus` type
- Update a test in the cancel part of the task tests

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: nicolasvienot <nvienot@gmail.com>
@meili-bors
Copy link
Contributor

meili-bors bot commented Aug 7, 2023

Build failed:

Copy link
Contributor

@atoulmet atoulmet left a comment

Choose a reason for hiding this comment

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

This does not work because the task succeeds before cancelling it. Even if we chose a longer task, it will probably end up with a flaky test, so it's better to not test it for now.

tests/task.test.ts Outdated Show resolved Hide resolved
tests/task.test.ts Outdated Show resolved Hide resolved
@atoulmet atoulmet self-requested a review August 7, 2023 15:11
Copy link
Contributor

@atoulmet atoulmet left a comment

Choose a reason for hiding this comment

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

bors merge

@meili-bors
Copy link
Contributor

meili-bors bot commented Aug 7, 2023

Build succeeded:

@nicolasvienot nicolasvienot merged commit 2cba878 into main Aug 7, 2023
5 checks passed
@nicolasvienot nicolasvienot deleted the fix/add-task-status-canceled branch August 7, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

status canceled is missing on TaskStatus type
2 participants