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

Remove deprecated methods #2694

Closed
jorsol opened this issue Dec 23, 2020 · 2 comments · Fixed by #2775 or jenkinsci/kubernetes-client-api-plugin#83
Closed

Remove deprecated methods #2694

jorsol opened this issue Dec 23, 2020 · 2 comments · Fixed by #2775 or jenkinsci/kubernetes-client-api-plugin#83
Assignees
Milestone

Comments

@jorsol
Copy link
Contributor

jorsol commented Dec 23, 2020

Kubernetes Client 5.0 already breaks many things, so why not do a cleanup for all the deprecated methods?

We are talking about a MAJOR version upgrade, so it should be "safe" to break API compatibility here and have a clean API.

Some examples include:

KubernetesClient.customResourceDefinitions();
KubernetesClient.customResources(CustomResourceDefinition crd, Class<T> resourceType, Class<L> listClass);
KubernetesClient.customResource(CustomResourceDefinition crd, Class<T> resourceType, Class<L> listClass);
KubernetesClient.events();
...
(and all others)

This has the potential risk that people migrating to this version would not know what it's the alternative, but the risk could be reduced by writing the items in the migration guide.

Probably this would be undesirable, but there are few major upgrades that allow being this harsh. But if the intention is to be more polite, then please close this now.

@manusa
Copy link
Member

manusa commented Dec 23, 2020

Hi Jorge,

Thanks for your input, it is much appreciated. I do agree that it's the time to remove these deprecated methods.

However, we're on a very tight schedule (must cut final release in the coming week), and most of the team is on PTO or starts PTO today.

All of these methods are annotated with @deprecated javadoc entry or @Deprecated annotation (and some have been for a while).
I'm not sure if in these situations it's OK to remove such methods in minor version releases (I've seen this). We are also not following a strict SemVer policy since our models are based on K8s APIs including alpha and beta version that keep changing every release.

The safest approach (IMHO), given our current situation, is to add a deprecation target version in the docs (e.g. @deprecated To be removed in 5.1.0 use ... and a clear notice in the changelog and address these changes in the future.

WDYT?

@jorsol
Copy link
Contributor Author

jorsol commented Dec 23, 2020

Well, since there is no strict SemVer policy, adding a target version in the docs should be fine 👍

@manusa manusa added this to the 5.1.0 milestone Dec 23, 2020
@rohanKanojia rohanKanojia self-assigned this Feb 2, 2021
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Feb 2, 2021
Removing the following deprecated methods from KubernetesClient DSL:
- `client.customResourceDefinitions()`
- `client.events()`
- `client.customResources(CustomResourceDefinition crd, Class<T>
  resourceType, Class<L> listClass)`
- `client.customResource(CustomResourceDefinition crd, Class<T>
  resourceType, Class<L> listClass)`
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Feb 2, 2021
Removing the following deprecated methods from KubernetesClient DSL:
- `client.customResourceDefinitions()`
- `client.events()`
- `client.customResources(CustomResourceDefinitionContext crd, Class<T>
  resourceType, Class<L> listClass)`
- `client.customResources(CustomResourceDefinition crd, Class<T>
  resourceType, Class<L> listClass)`
- `client.customResource(CustomResourceDefinition crd, Class<T>
  resourceType, Class<L> listClass)`
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Feb 2, 2021
Removing the following deprecated methods from KubernetesClient DSL:
- `client.customResourceDefinitions()`
- `client.events()`
- `client.customResources(CustomResourceDefinitionContext crd, Class<T>
  resourceType, Class<L> listClass)`
- `client.customResources(CustomResourceDefinition crd, Class<T>
  resourceType, Class<L> listClass)`
- `client.customResource(CustomResourceDefinition crd, Class<T>
  resourceType, Class<L> listClass)`
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Feb 8, 2021
Removing the following deprecated methods from KubernetesClient DSL:
- `client.customResourceDefinitions()`
- `client.events()`
- `client.customResources(CustomResourceDefinitionContext crd, Class<T>
  resourceType, Class<L> listClass)`
- client.customResource(CustomResourceDefinitionContext, Class<T>
  resource, Class<L> resourceList) is now marked as deprecated
manusa pushed a commit to rohanKanojia/kubernetes-client that referenced this issue Feb 10, 2021
Removing the following deprecated methods from KubernetesClient DSL:
- `client.customResourceDefinitions()`
- `client.events()`
- `client.customResources(CustomResourceDefinitionContext crd, Class<T>
  resourceType, Class<L> listClass)`
- client.customResource(CustomResourceDefinitionContext, Class<T>
  resource, Class<L> resourceList) is now marked as deprecated
manusa pushed a commit that referenced this issue Feb 10, 2021
Removing the following deprecated methods from KubernetesClient DSL:
- `client.customResourceDefinitions()`
- `client.events()`
- `client.customResources(CustomResourceDefinitionContext crd, Class<T>
  resourceType, Class<L> listClass)`
- client.customResource(CustomResourceDefinitionContext, Class<T>
  resource, Class<L> resourceList) is now marked as deprecated
This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment