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

[JENKINS-70392] Kubernetes client 6.x follow-up compatibility #1289

Merged
merged 4 commits into from
Jan 10, 2023

Conversation

Vlatombe
Copy link
Member

@Vlatombe Vlatombe commented Jan 10, 2023

For compatibility with Kubernetes client 6.x

Also adds RJR based tests as JenkinsRule tests did not catch the classloading issue.

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@Vlatombe Vlatombe added the bug Bug Fixes label Jan 10, 2023
@Vlatombe Vlatombe requested a review from a team as a code owner January 10, 2023 08:25
@Vlatombe Vlatombe changed the title [JENKINS-70392] Context classloader must be tweaked for Kubernetes client [JENKINS-70392] Kubernetes client 6.x follow-up compatibility Jan 10, 2023
@Vlatombe Vlatombe merged commit 87f0837 into jenkinsci:master Jan 10, 2023
@Vlatombe Vlatombe deleted the JENKINS-70392 branch January 10, 2023 11:54
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks promising. What is missing in RJR to let this run in kind.sh?

Comment on lines +1 to +4
package org.csanchez.jenkins.plugins.kubernetes.pipeline.steps;
/**
* Reusable steps for tests relying on RealJenkinsRule.
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is backwards? (Javadoc first, then package statement)

@Vlatombe
Copy link
Member Author

Vlatombe commented Jan 10, 2023

What is missing in RJR to let this run in kind.sh?

See #1290 for the follow-up (I needed to let this one go since the release was broken)

@jglick jglick mentioned this pull request Jan 10, 2023
8 tasks
@rpaasche
Copy link

I'm still getting this error with 3800.v54b_077b_94b_a_4

2023-01-10 15:49:01 |  hudson.remoting.ProxyException: io.fabric8.kubernetes.client.KubernetesClientException: No httpclient implementations found on the context classloader, please ensure your classpath includes an implementation jar
2023-01-10 15:49:01 |  	at io.fabric8.kubernetes.client.utils.HttpClientUtils.getHttpClientFactory(HttpClientUtils.java:164)
2023-01-10 15:49:01 |  	at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:145)
2023-01-10 15:49:01 |  	at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:56)
2023-01-10 15:49:01 |  	at io.fabric8.kubernetes.client.DefaultKubernetesClient.<init>(DefaultKubernetesClient.java:48)
2023-01-10 15:49:01 |  	at org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.parseFromYaml(PodTemplateUtils.java:602)
2023-01-10 15:49:01 |  	at org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.validateYamlContainerNames(PodTemplateUtils.java:639)
2023-01-10 15:49:01 |  	at org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.validateYamlContainerNames(PodTemplateUtils.java:629)
2023-01-10 15:49:01 |  	at org.csanchez.jenkins.plugins.kubernetes.pipeline.PodTemplateStepExecution.start(PodTemplateStepExecution.java:145)

@mobidroid
Copy link

Getting the same error when trying to test connection from the Manage Nodes & Clouds > Kubernetes Cloud:

Error testing connection https://<my-cluster> No httpclient implementations found on the context classloader, please ensure your classpath includes an implementation jar

@PatrickGhezali
Copy link

Same issue here with this plugin combination:

Kubernetes Client API Plugin 6.3.1-206.v76d3b_6b_14db_b
Kubernetes Credentials Plugin 0.10.0
Kubernetes plugin 3800.v54b_077b_94b_a_4

@Nuc7ear
Copy link

Nuc7ear commented Jan 10, 2023

Kubernetes Client API Plugin 6.3.1-206.v76d3b_6b_14db_b
Kubernetes Credentials Plugin 0.10.0
Kubernetes plugin 3800.v54b_077b_94b_a_4

Same problem with this version of plugins

@Vlatombe
Copy link
Member Author

Very sorry for these inconvenience, seems like I missed a few more occurrences.

@PatrickGhezali
Copy link

Thanks for taking care!

@Vlatombe
Copy link
Member Author

#1291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug Fixes
Projects
None yet
6 participants