Skip to content

Conversation

@julieheard
Copy link
Contributor

@julieheard julieheard commented Aug 17, 2023

Downstream of jenkinsci/kubernetes-client-api-plugin#221

Testing done

I ran mvn verify to test locally and all working, all tests passing

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

@julieheard julieheard changed the title Bump to 6.8.1 of kubernetes-client-api-plugin Upgrade kubernetes-client-api to 6.8.1 Aug 17, 2023
Co-authored-by: Robert Sandell <rsandell@cloudbees.com>
@rsandell
Copy link
Member

Just need to remember to update to the "real" version when it is released.

@julieheard julieheard marked this pull request as ready for review August 29, 2023 13:29
@julieheard julieheard requested a review from a team as a code owner August 29, 2023 13:29
@Vlatombe
Copy link
Member

@julieheard Need to bump jenkins.version here.

[2023-08-29T13:30:25.903Z] Caused by: org.apache.maven.plugin.MojoExecutionException: Dependency org.jenkins-ci.plugins:kubernetes-client-api:jar:6.8.1-224.vd388fca_4db_3b_ requires Jenkins 2.401.1 or higher.

@Vlatombe
Copy link
Member

@julieheard I can't update this PR so you need to fix it.

@julieheard
Copy link
Contributor Author

I am on it, when testing locally it also wants bumps for bouncycastle-api:2.27, okhttp-api:4.10.0-132.v7a_7b_91cef39c and jackson2-api:2.15.1-344.v6eb_55303dc3e

@julieheard
Copy link
Contributor Author

Due to the Jenkins bump I have also bumped Kotlin and included three new dependencies (bouncycastle-api, jackson2-api, okhttp-api) as they were creating RequireUpperBoundDeps errors.

I came accross a strange issue with a test, mvn verify it was failing intermittently with this message:

[ERROR] Tests run: 10, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 2.661 s <<< FAILURE! -- in com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.convertors.CertificateCredentialsConvertorTest
[ERROR] com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.convertors.CertificateCredentialsConvertorTest.failsToConvertWhenCertificateCorruptBase64 -- Time elapsed: 0.015 s <<< ERROR!
java.lang.NoSuchMethodError: 'org.hamcrest.Matcher org.hamcrest.CoreMatchers.allOf(org.hamcrest.Matcher, org.hamcrest.Matcher)'
[ERROR] com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.convertors.CertificateCredentialsConvertorTest.failsToConvertWhenCertificateCorruptPKCS12 -- Time elapsed: 0.006 s <<< ERROR!
java.lang.NoSuchMethodError: 'org.hamcrest.Matcher org.hamcrest.CoreMatchers.allOf(org.hamcrest.Matcher, org.hamcrest.Matcher)'

Digging into this I think it is a conflict between junit and hamcrest, I do not think it is due to the changes made in this PR.

@Vlatombe
Copy link
Member

Vlatombe commented Aug 30, 2023

java.lang.NoSuchMethodError: 'org.hamcrest.Matcher org.hamcrest.CoreMatchers.allOf(org.hamcrest.Matcher, org.hamcrest.Matcher)'

Can't reproduce on my side, and I only see one hamcrest copy in the classpath

+- junit:junit:jar:4.13.2:test
|  \- org.hamcrest:hamcrest-core:jar:2.2:test
+- org.hamcrest:hamcrest:jar:2.2:test

@julieheard
Copy link
Contributor Author

julieheard commented Aug 30, 2023

I have re-ran this test quite a few times today and also now can't reproduce. Must have been a small glitch in the classpath or something silly. This PR is now ready to merge 🙂

@agentgonzo or @jtnord would you mind merging as the upstream PR has now been merged? Many thanks 🙂

@jonesbusy
Copy link
Contributor

Any update there ? Is confusing to have the kubernetes-api client available for upgrade but not all consumer upgraded.

Specially for people upgrading regulary their Jenkins plugins.

Thanks!

pom.xml Outdated
Comment on lines 245 to 259
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>bouncycastle-api</artifactId>
<version>2.29</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
<version>2.15.2-350.v0c2f3f8fc595</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>okhttp-api</artifactId>
<version>4.11.0-157.v6852a_a_fa_ec11</version>
</dependency>
Copy link
Member

@jtnord jtnord Sep 4, 2023

Choose a reason for hiding this comment

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

The plugin does not depend on these and so they should not be needed. What is the rationale for the the creep in dependencies?

Due to the Jenkins bump I have also bumped Kotlin and included three new dependencies (bouncycastle-api, jackson2-api, okhttp-api) as they were creating RequireUpperBoundDeps errors.

perhaps you just need to pickup a newer bom version, at any rate - they are not plugin dependencies so should not be added to the dependencies section, rather dependencyManagement if they are not available in a newer bom

@jtnord jtnord merged commit f3013b3 into jenkinsci:master Sep 4, 2023
@jtnord jtnord added the enhancement New feature or request label Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants