-
Notifications
You must be signed in to change notification settings - Fork 97
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
NoSuchMethodError: org.gitlab4j.api.ProjectApi.addHook(Object, String, ProjectHook, boolean, String) #435
Comments
…1123) --------- Co-authored-by: Jeremie Bresson <[email protected]>
Same here. It worked again after manually downloading and installing version 5.3 of the Gitlab API Plugin from https://updates.jenkins.io/download/plugins/gitlab-api/ |
Thanks @waeller ; we'll give that a try. Our less-than-ideal workaround was to disable web hook management on the plugin (which is the code path in which it tries to call |
Same problem, this solution works. |
same here, rollback helped. |
We have also hit this problem in our environment. Updating the version of the BOM for the plugin worked for us. The version changes are listed in PR #438. |
Awesome @nathan-objective ! |
We also hat that issue in our environment and downgraded to fix it. Thanks for the PR @nathan-objective ! |
I guess no one is around to merge nathan's change? |
gitlab4j@224f4c5#commitcomment-145297850 notes that the change from boolean to Boolean is a breaking change in the API. It seems easiest and safest to restore API compatibility rather than requiring lock-step upgrades from consumers of the API. Jenkins (as an example) allows users to upgrade the GitLab API plugin without requiring that they upgrade the GitLab branch source plugin. When that happens, the breaking change in the API causes runtime failures for Jenkins users. jenkinsci/gitlab-branch-source-plugin#435 reports some of those runtime failures. https://issues.jenkins.io/browse/JENKINS-73672 reports more runtime failures due to the breaking change in the API. Fixes gitlab4j#1155
Fixed in #438. Released in 710.v6f19df32544b_. |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
docker.io/jenkins/jenkins:2.452.2-jdk17
Reproduction steps
We manage our Jenkins job definitions with Terraform and the Jenkins API. Whenever we try to push up new configuration, it fails. Please find further details below.
Expected Results
Job definition updates without error. : ]
Actual Results
Exception!
Anything else?
We recently updated our Jenkins plugins, notably
gitlab4j
→5.6.0-97.v6603a_83f8690
andgitlabbranchsource
→704.vc7f1202d7e14
.Specifically, I believe the
gitlab4j
authors made a backwards-incompatible change in 224f4c5 in which the signature oforg.gitlab4j.api.ProjectApi.addHook
changed its boolean argument fromboolean
toBoolean
. I believe theGitLabHookCreator
is still trying to use the old/gone signature here:gitlab-branch-source-plugin/src/main/java/io/jenkins/plugins/gitlabbranchsource/GitLabHookCreator.java
Line 231 in 67b7169
Obviously, it's not great that
addHook
got changed in a backwards-incompatible way. But it seems like it would be useful for the hook creator in this plugin to enjoy an update that allows it to use the new method.Are you interested in contributing a fix?
Would that it were.
The text was updated successfully, but these errors were encountered: