jenkinsci / gitlab-plugin

A Jenkins plugin for interfacing with GitLab
https://plugins.jenkins.io/gitlab-plugin/
GNU General Public License v2.0
1.44k stars 612 forks source link

The test connection button on Jenkins' configure page throws Client error: CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES #1605

Closed aah9 closed 8 months ago

aah9 commented 8 months ago

Jenkins and plugins versions report

Environment ```text Jenkins: 2.426.2 OS: Linux - 4.14.330-250.540.amzn2.x86_64 Java: 11.0.20 - Red Hat, Inc. (OpenJDK 64-Bit Server VM) --- git:5.2.1 git-client:4.6.0 github:1.37.3.1 github-api:1.318-461.v7a_c09c9fa_d63 github-branch-source:1767.va_7d01ea_c7256 gitlab-plugin:1.7.18 jackson2-api:2.16.1-373.ve709c6871598 ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Amazon Linux 2

Reproduction steps

  1. Install latest version of jackson2-api plugin (2.16.1-373.ve709c6871598) + gitlab-plugin
  2. Navigate to configure page
  3. Setup a gitlab connection
  4. Press Test Connection button

Expected Results

Success message should display.

Expected-GitLab-Connection-Test

Actual Results

Error msg displays: Client error: CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES

Actual-GitLab-Connection-Test

Anything else?

Related to JENKINS-72478 Jackson2 API 2.16.1 removes Java PropertyNamingStrategy aliases

Are you interested in contributing a fix?

No response

aah9 commented 8 months ago

I think the fix is switching from CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES to SNAKE_CASE:

https://github.com/FasterXML/jackson-databind/commit/d7a1efc7f45af4f56c0df4eccb0244418b6428bb

MarkEWaite commented 8 months ago

I think the fix is switching from CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES to SNAKE_CASE:

FasterXML/jackson-databind@d7a1efc

Thanks for reporting that @aah9 ! Would you like to submit the pull request to fix it?

bruderol commented 8 months ago

Same problem here - gitlab plugin is currently not working like this

MarkEWaite commented 8 months ago

Same problem here - gitlab plugin is currently not working like this

Thanks for confirming. Would you like to submit the pull request to fix it? You have an environment where you can test it more rapidly than I can configure a test environment.

bruderol commented 8 months ago

I filed a Pull request - let me know how I can easily test it - i have no clue how to do so (how would I get the fixed plugin on my jenkins ?)

MarkEWaite commented 8 months ago

I filed a Pull request - let me know how I can easily test it - i have no clue how to do so (how would I get the fixed plugin on my jenkins ?)

I've uploaded a zip file of the plugin build. Download it to your local computer, expand the zip file, then use the "Advanced" section of the Jenkins plugin manager page to upload the gitlab-plugin.hpi file. Restart your Jenkins controller and you should see the new SNAPSHOT version displayed in the plugin manager list of installed plugins.

gitlab-plugin.zip