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

Fix "Test Connection" button when used with Jackson 2.16.1 or later #1606

Merged

Conversation

bruderol
Copy link
Contributor

@bruderol bruderol commented Jan 2, 2024

Here is a pull request for the proposed solution as proposed and discussed on the issue #1605 - would be great if you could release that soon please.

Testing done?

When the most recent Jackson 2 API plugin (2.16.1.x) is used, compilation fails without this change and succeeds with this change. Interactive testing of the "Test connection" button confirms that the new code is well behaved

Submitter checklist

…WITH_UNDERSCORES by new SNAKE_CASE constant to work with newer Jersey plugin (jenkinsci#1605)
@bruderol bruderol requested a review from a team as a code owner January 2, 2024 21:46
@MarkEWaite MarkEWaite changed the title Fix #1605: Replace CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES by new SNAKE_CASE constant Fix error displayed by "Test Connection" button Jan 2, 2024
@MarkEWaite MarkEWaite added the bug For changelog: Minor bug. Will be listed after features label Jan 2, 2024
@MarkEWaite MarkEWaite mentioned this pull request Jan 2, 2024
6 tasks
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Passed my interactive testing of the "Test connection" button. I was able to see the problem without this change and was able to confirm the problem is fixed with this change.

@MarkEWaite
Copy link
Contributor

MarkEWaite commented Jan 2, 2024

@krisstern and @harsh-ps-2003 I think that we should merge the pull requests and deliver the 1.8.0 release of the GitLab plugin. The pull requests are:

Does that seem reasonable for the two of you?

@MarkEWaite MarkEWaite changed the title Fix error displayed by "Test Connection" button Fix "Test Connection" button when used with Jackson 2.16.1 or later Jan 3, 2024
@krisstern
Copy link
Member

@krisstern and @harsh-ps-2003 I think that we should merge the pull requests and deliver the 1.8.0 release of the GitLab plugin. The pull requests are:

Does that seem reasonable for the two of you?

Sure, this makes sense to me

@MarkEWaite MarkEWaite merged commit 317807f into jenkinsci:master Jan 3, 2024
17 checks passed
@MarkEWaite
Copy link
Contributor

Sure, this makes sense to me

Thanks. I'll plan to generate a release in a few hours.

MarkEWaite added a commit to MarkEWaite/gitee-plugin that referenced this pull request Jan 3, 2024
Upgrades from Jackson 2 API 2.15.2 to Jackson 2 API 2.16.1 so that the
API deletion is visible.  A Jenkins controller with the Jackson 2 API
plugin 2.16.1-373.ve709c6871598 installed may already make this change
visible to a gitee plugin without any change to the plugin source code.

FasterXML/jackson-databind#4162 removed the
constants from the Jackson 2 API after a long period of deprecation.

Similar change was needed in the GitLab plugin and is implemented in
jenkinsci/gitlab-plugin#1606

The gitee plugin and the GitLab plugin appear to be the only two Jenkins
plugins using this constant, per a GitHub search.
MarkEWaite added a commit to MarkEWaite/repository-permissions-updater that referenced this pull request Jan 3, 2024
jenkinsci/gitee-plugin#4 is the pull request
that I want to merge and release.

The Jackson 2 API plugin 2.16.1 has removed two constants that were
deprecated long ago. The removal of those constants will break
compilation of the gitee plugin and are expected to break runtime of
the gitee plugin as well.

The targeted pull request upgrades from Jackson 2 API 2.15.2 to Jackson
2 API 2.16.1 so that the API deletion of the constants is visible
at compile time.  A Jenkins controller with the Jackson 2 API plugin
2.16.1-373.ve709c6871598 installed may already make this change visible to
a gitee plugin at run time without any change to the plugin source code.

FasterXML/jackson-databind#4162 removed the
constants from the Jackson 2 API after a long period of deprecation.
The changes were released in Jackson databind 2.16.0 and first
included in the matching Jenkins API plugin 2.16.1-373.ve709c6871598.

A similar change was needed in the GitLab plugin and is implemented in
jenkinsci/gitlab-plugin#1606.

If @yashin-luo merges that pull request and releases the gitee plugin,
then I don't need to be added as a maintainer.  I've started this pull
request just in case @yashin-luo is not available and I need to wait
two weeks for plugin adoption.

https://issues.jenkins.io/browse/JENKINS-72482 is the bug report.
MarkEWaite added a commit to jenkinsci/gitee-plugin that referenced this pull request Jan 4, 2024
* [JENKINS-72482] Replace the deleted Jackson 2 API constants

Upgrades from Jackson 2 API 2.15.2 to Jackson 2 API 2.16.1 so that the
API deletion is visible.  A Jenkins controller with the Jackson 2 API
plugin 2.16.1-373.ve709c6871598 installed may already make this change
visible to a gitee plugin without any change to the plugin source code.

FasterXML/jackson-databind#4162 removed the
constants from the Jackson 2 API after a long period of deprecation.

Similar change was needed in the GitLab plugin and is implemented in
jenkinsci/gitlab-plugin#1606

The gitee plugin and the GitLab plugin appear to be the only two Jenkins
plugins using this constant, per a GitHub search.

* Add more findbugs/spotbugs exclusions
* Fail if new findbugs/spotbugs errors are introduced
@bruderol
Copy link
Contributor Author

bruderol commented Jan 5, 2024

@MarkEWaite wow, I am impresed - thank you for testing and releasing it so fast. That was a great experience :-) Will immediately test the new release. Thanks so much.

And I can allready confirm, that the new release does not have that issue anymore. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features
Projects
None yet
3 participants