kubernetes-client / haskell

Haskell client for the kubernetes API. A work in progress.
Apache License 2.0
127 stars 59 forks source link

Wrong return type in deleteNamespacedPersistentVolumeClaim #86

Closed thomasjm closed 3 years ago

thomasjm commented 3 years ago

https://github.com/kubernetes-client/haskell/blob/b078aa6fe0f97cf6b52eaac0cd40082b67b0e8bd/kubernetes/lib/Kubernetes/OpenAPI/API/CoreV1.hs#L3810-L3816

In the type above, the return value says V1Status. I think it should be V1PersistentVolumeClaim; see the docs here:

https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#response-9

I noticed this because of a parsing error when running this command against my cluster. I'm not sure the right place to fix it. The swagger.json file in this repo also lists the return type as #/definitions/v1.Status.

jonschoning commented 3 years ago

The settings file currently targets kubernetes 1.16 and it looks like the api changed in 1.18 to return a V1PersistentVolumeClaim.

updating the targeted version in settings to >= 1.18 and re-gen client should work.

thomasjm commented 3 years ago

Ah, thanks for researching that.

I was just reading about the version skew policy and the policies of some major cloud providers. It seems each minor version is supported for about 3 years, so 1.16 is pretty much out of its support window now. What do you think of regenerating this library at 1.20? (What would be really cool is creating several tagged releases of this library at 1.16, 1.17 etc. so the user can choose.)

jonschoning commented 3 years ago

i think it's overdue for an update; i'll make a PR if everything goes well

jonschoning commented 3 years ago

c.f. https://github.com/kubernetes-client/haskell/pull/87

jonschoning commented 3 years ago

/close

k8s-ci-robot commented 3 years ago

@jonschoning: Closing this issue.

In response to [this](https://github.com/kubernetes-client/haskell/issues/86#issuecomment-782226648): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.