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

Event model classes from core/v1 have been lost #2205

Closed
cheinema opened this issue May 7, 2020 · 9 comments · Fixed by #2206
Closed

Event model classes from core/v1 have been lost #2205

cheinema opened this issue May 7, 2020 · 9 comments · Fixed by #2206
Assignees
Labels

Comments

@cheinema
Copy link

cheinema commented May 7, 2020

Since #2137 (v1.10.0) the model classes

  • io.fabric8.kubernetes.api.model.Event
  • io.fabric8.kubernetes.api.model.EventList
  • io.fabric8.kubernetes.api.model.EventSeries

from the core/v1 API are missing. They were included in kubernetes-model-4.9.1.jar, but are now missing in kubernetes-model-core-4.10.0.jar.

@rohanKanojia
Copy link
Member

@cheinema
Copy link
Author

cheinema commented May 7, 2020

Nope, these are the model classes of the (deprecated) events/v1beta1. They are not compatible with each other.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#event-v1-core vs.
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#event-v1beta1-events-k8s-io

They can also be distinguished by kubernetes_core_Event and kubernetes_events_Event in kube-schema.json.

@rohanKanojia
Copy link
Member

ah, I see. Apologies for inconvenience. Let me add them back.

@cheinema
Copy link
Author

cheinema commented May 8, 2020

@rohanKanojia Can you please take a look at KubernetesClient#events? Due to #2137 the import statements of the event classes have been changed (diff). In my oppinion they must be switched back to io.fabric8.kubernetes.api.model.*.

@rohanKanojia
Copy link
Member

rohanKanojia commented May 8, 2020

Actually, In #2206 I moved core events to client.v1().events() and kept client.events() to events/v1beta1. Do you think it would work for you?

@cheinema
Copy link
Author

cheinema commented May 8, 2020

Ahh, I see. Thank you for the hint.

@rohanKanojia
Copy link
Member

@cheinema : Do you know if events/v1beta1 is used anywhere?

@manusa
Copy link
Member

manusa commented May 8, 2020

client.events() should be reverted to call the API version that was called previously (i.e. v1), in order to avoid breaking backwards compatibility.

As a way to move forward, the method should be annotated with Deprecated and a JavaDoc line added indicating the recommended new approach client.v1().events().

@rohanKanojia
Copy link
Member

@manusa @cheinema : I will update #2206 to have client.events() using v1 Events. Thanks for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants