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

lack of documentation on listNamespacedService breaking change #3100

Open
gyorokpeter opened this issue Feb 20, 2024 · 3 comments
Open

lack of documentation on listNamespacedService breaking change #3100

gyorokpeter opened this issue Feb 20, 2024 · 3 comments

Comments

@gyorokpeter
Copy link

This worked in 19.0.0:

kube.listNamespacedService(namespace, null, null, null, null, labelSelector, null, null, null, null, null);

But it breaks in 20.0.0:

[ERROR]   required: java.lang.String
[ERROR]   found: java.lang.String,<nulltype>,<nulltype>,<nulltype>,<nulltype>,java.lang.String,<nulltype>,<nulltype>,<nulltype>,<nulltype>,<nulltype>
[ERROR]   reason: actual and formal argument lists differ in length

https://javadoc.io/static/io.kubernetes/client-java-api/20.0.0/io/kubernetes/client/openapi/apis/CoreV1Api.html#listNamespacedService(java.lang.String) makes no mention of this breaking change and how to migrate old code that requires any of the parameters other than the namespace.

Also the changelog file (https://github.com/kubernetes-client/java/blob/master/CHANGELOG.md) cuts off at 14.0.0 so no luck finding this breaking change there either.

@yue9944882
Copy link
Member

@yue9944882
Copy link
Member

to obtain the backward-compatible client module, adding a -legacy suffix to the version will do

@gyorokpeter
Copy link
Author

In the meantime we found this example: https://github.com/kubernetes-client/java/blob/master/examples/examples-release-20/src/main/java/io/kubernetes/client/examples/WatchExample.java

It would still be useful to update the docs to better explain how to migrate from the old to the new style API.

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

No branches or pull requests

2 participants