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

[BUG] Delete PVC should return PVC not status #5781

Closed
drewmullen opened this issue May 9, 2024 · 3 comments · Fixed by #5782
Closed

[BUG] Delete PVC should return PVC not status #5781

drewmullen opened this issue May 9, 2024 · 3 comments · Fixed by #5782
Assignees
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release reproduce/needed Reminder to add a reproduce label and to remove this one severity/needed Reminder to add a severity label and to remove this one
Milestone

Comments

@drewmullen
Copy link
Contributor

Describe the bug

Deleting a persistentvolumeclaim should return the pvc object, not Status:

"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/k8s.io.v1.Status"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/k8s.io.v1.Status"
}
}
}
},

This API comes from the k8s API which documents the appropriate return type: https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json

image
@drewmullen drewmullen added kind/bug Issues that are defects reported by users or that we know have reached a real release reproduce/needed Reminder to add a reproduce label and to remove this one severity/needed Reminder to add a severity label and to remove this one labels May 9, 2024
@drewmullen
Copy link
Contributor Author

drewmullen commented May 9, 2024

highly suspect:

if slice.ContainsString(actions, http.MethodDelete) {
ws.Route(addDeleteParams(
ws.DELETE(ResourcePath(resource, namespaced)).
Produces(mime.MIME_JSON, mime.MIME_YAML).
Consumes(mime.MIME_JSON, mime.MIME_YAML).
Operation("deleteNamespaced"+objKind).
To(Noop).
Reads(metav1.DeleteOptions{}).Writes(metav1.Status{}).
Doc("Delete a "+objKind+" object.").
Metadata("kind", objKind).
Returns(http.StatusOK, "OK", metav1.Status{}).
Returns(http.StatusUnauthorized, "Unauthorized", ""), ws,
))
}

@Vicente-Cheng
Copy link
Contributor

Hi @drewmullen
Thanks for raising this!

We would check your PR with both issues #5781, #5528

Hi @Yu-Jack, @m-ildefons, could you help to check the PR #5782?
Thanks!

@bk201 bk201 added this to the v1.4.0 milestone May 16, 2024
@bk201 bk201 reopened this May 22, 2024
@drewmullen
Copy link
Contributor Author

Thanks for accepting! Can you please confirm, I think the “reopen” was on accident? @bk201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release reproduce/needed Reminder to add a reproduce label and to remove this one severity/needed Reminder to add a severity label and to remove this one
Projects
Status: Resolved/Scheduled
Development

Successfully merging a pull request may close this issue.

3 participants