Towards new kubernetes-client 6.x

104 views
Skip to first unread message

Vincent Latombe

unread,
Jan 5, 2023, 11:18:17 AM1/5/23
to Jenkins Dev
Hello,

https://github.com/jenkinsci/kubernetes-client-api-plugin bundles today version 5.x of fabric8 kubernetes-client.

A new major version of this library (6.x) has been available for a while and has breaking changes (See https://github.com/fabric8io/kubernetes-client/blob/v6.3.1/doc/MIGRATION-v6.md for details) requiring coordinated changes across plugins using this library in the Jenkins ecosystem.

I've built a series of plugin incremental builds with this new version. I believe I am covering all existing plugins in the Jenkins OSS ecosystem using this library. All existing tests are passing.
https://github.com/jenkinsci/kubernetes-cli-plugin/pull/101 (incrementals not enabled on that repository)

Unfortunately, the UC doesn't provide any facility to declare such incompatibility (e.g. https://issues.jenkins.io/browse/JENKINS-49651), so this kind of breaking upgrade is unfortunately unavoidable.

If you have a consuming plugin using this library, you will need to make necessary changes before upgrading the client library.

If you are just a kubernetes-plugin user, please don't rush any kubernetes-client-api upgrade, wait for the new kubernetes-plugin version to be available, and it will pull the required transitive dependency upgrade.

I plan to make a coordinated release early next week. Please hold on applying any upgrade to kubernetes-client-api plugin unless you get the matching updates from consuming plugins!

Regards,

Vincent

Daniel Beck

unread,
Jan 5, 2023, 11:55:03 AM1/5/23
to jenkin...@googlegroups.com
On Thu, Jan 5, 2023 at 5:18 PM Vincent Latombe <vincent...@gmail.com> wrote:
A new major version of this library (6.x) has been available for a while and has breaking changes (See https://github.com/fabric8io/kubernetes-client/blob/v6.3.1/doc/MIGRATION-v6.md for details) requiring coordinated changes across plugins using this library in the Jenkins ecosystem.

Would a new library plugin for the new major release not solve this problem in a way much less likely to affect existing users? There's already jquery and jquery3-api, commons-lang-api and commons-lang3-api, jackson-databind and jackson2-api, bootstrap4-api and bootstrap5-api, etc. all doing it that way AFAIUI.

jn...@cloudbees.com

unread,
Jan 5, 2023, 1:58:30 PM1/5/23
to Jenkins Developers
the package names are still the same as far as I understand, and this would still have issues due to the nature of the dependencies.

as k8s has dependencies on both -creds and -api  if the creds where updated to use the new -6-api when the classess that k8s would see would be a bit "iffy" would they not (as they would see both -6-api and -api) whith some interesting conflicting results....

>  i, jackson-databind and jackson2-api, bootstrap4-api and bootstrap5-api   . all doing it that way AFAIUI.

because the underlying libraries are well behaved and used a new namespace for the new version? (at least the java ones - I do not know about the JS stuff...)

jn...@cloudbees.com

unread,
Jan 5, 2023, 1:59:27 PM1/5/23
to Jenkins Developers
> I've built a series of plugin incremental builds with this new version. I believe I am covering all existing plugins in the Jenkins OSS ecosystem using this library. All existing tests are passing.

kubernetes-credential-provider uses the api.

/James

Vincent Latombe

unread,
Jan 5, 2023, 2:35:37 PM1/5/23
to jenkin...@googlegroups.com
Unfortunately not, as James pointed out, the package on fabric8 side is not updated to a new one, so both plugins wouldn't be able to co-exist in the classpath.

Vincent


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAMo7PtLoJKB3o-ugJmoH6DhkbKVzLLEnOcVSqhKZqjv1TgQgGA%40mail.gmail.com.

Vincent Latombe

unread,
Jan 5, 2023, 2:46:10 PM1/5/23
to jenkin...@googlegroups.com
> kubernetes-credential-provider uses the api.

I just checked it (https://github.com/jenkinsci/kubernetes-credentials-provider-plugin/pull/72), it doesn't seem to require any update considering its api usage.

There is one deprecated code usage that can be cleaned up but is not mandatory, and one test usage that should be updated, but it doesn't seem to fail currently.

Vincent


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.

Jesse Glick

unread,
Jan 5, 2023, 2:46:35 PM1/5/23
to jenkin...@googlegroups.com
On Thu, Jan 5, 2023 at 2:35 PM Vincent Latombe <vincent...@gmail.com> wrote:
the package on fabric8 side is not updated to a new one, so both plugins wouldn't be able to co-exist in the classpath.

You can simultaneously run multiple wrapper plugins with the same package, so long as any given caller’s transitive dependency closure only uses one of them. I think that means there would have to be a `kubernetes-credentials-6` plugin, since its `kubernetes-client-api-6` dependency makes it implicitly incompatible. Seems like a mess.

Setting that aside, it would be awkward to create a new `kubernetes-client-api-6` plugin because then people would be left with the old `kubernetes-client-api` installed and enabled but unused, and need to manually clean up.

Pending JENKINS-49651, I agree that just releasing the batch of updates on the same day and asking users to please refrain from partial updates is the least disruptive option.

Mark Waite

unread,
Jan 9, 2023, 9:58:43 PM1/9/23
to Jenkins Developers
Several users have reported an issue with the most recent releases.  More information at https://issues.jenkins.io/browse/JENKINS-70392 

Vincent Latombe

unread,
Jan 10, 2023, 4:16:49 AM1/10/23
to jenkin...@googlegroups.com
Thanks, I'm on it.
Vincent


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages