-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update Kubernetes client deps #1805
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
Conversation
|
afaik, this is treated as a "breaking change" and such upgrades are only possible in next major releases. Also, we have dependabot that should take care of this... I'll wait for @ryanjbaxter to provide his input. |
|
Are you getting some kind of runtime exception using Boot 3.4.0? |
Yes, kubernetes client java is pulling Gson 2.10.1, and it's downgrading it from 2.11, which is required on spring boot 3.4.0 because now the gson configuration class, GsonProperties, uses the Strictness class from latest gson. This, for example, breaks spring-boot-admin when used with kubernetes discovery. Of course, I can just force the gson version via the build system, but it's doing the wrong thing by default. |
|
I stumbled on this while encountering kubernetes-client/java#1659 and trying to use a fixed version in the build pipeline: It appears that due to API incompatibility there currently isn't a version of kubernetes-client with that bugfix that can be used with spring-cloud-kubernetes. |
|
@wind57 is right this is a breaking change. I have opened a PR agains the Kubernetes Java client to upgrade the version of GSON so it is compatible with the version we are currently using. Hopefully they are willing to make the change and do a release. @xcq1 I am not sure how this is related |
|
@ryanjbaxter Upgrading the kubernetes-client version like suggested in this PR would resolve that problem as well. If you prefer, I can open a detailed issue. |
|
Unfortunately we can't upgrade in a minor release, we have to wait for a major. The best solution is to backport whatever fix was made in the kubernetes java client to the |
|
Sorry, I am unfamiliar with Spring cloud's exact release cycles, I just wanted to point out the general need. I assume the next major version is a longer time away, in that case a backport of the fix would be well appreciated. |
|
@xcq1 Can you open a separate issue for this and include the fix in the Kubernetes Java Client that needs to be backported? I can submit a PR with that fix to the correct branch and hopefully get a release from them that we can then use in our next release of Spring Cloud Kubernetes. |
|
So while trying to make a minimal sample for my problem, I discovered I can completely remove any manual registration call to ModelMapper which makes the error go away and everything still works. With that I don't see a need for an additional backport. Sorry for the noise, it was just one of those days. Thanks anyway. |
|
@desiderantes @xcq1 the issues you have identified with the Kubernetes Java client should he addressed in the 19.0.2 release. I have upgraded the dependency version in Spring Cloud Kuberentes and our next release of 2023.0.x and 2024.0.x should include this latest release. |
Avoids inconsistency with Spring Boot 3.4.0 which requires gson 2.11.x due to the
com.google.gson.Strictnessclass