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

Failure to delete model when model is training should not return 200 #831

Closed
jmazanec15 opened this issue Mar 30, 2023 · 1 comment
Closed
Assignees
Labels
bug Something isn't working v2.8.0

Comments

@jmazanec15
Copy link
Member

Currently, when we try to delete a model while it is training, we block the request:

curl -X DELETE "localhost:9200/_plugins/_knn/models/my-model3?pretty"
{
  "model_id" : "my-model3",
  "result" : "failed",
  "error" : "Cannot delete model \"my-model3\". Model is still in training"
}

However, this request returns a 200 response code, even though it failed to delete the resource.

curl -I -X DELETE "localhost:9200/_plugins/_knn/models/my-model3"
HTTP/1.1 200 OK

I believe that this should throw a 409 conflict error code.

@jmazanec15 jmazanec15 added the bug Something isn't working label Mar 30, 2023
@jmazanec15 jmazanec15 self-assigned this Mar 31, 2023
@navneet1v
Copy link
Collaborator

Closing this issue as the PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.8.0
Projects
None yet
Development

No branches or pull requests

2 participants