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

5.6.0 includes a breaking change in the API #1155

Closed
MarkEWaite opened this issue Aug 25, 2024 · 2 comments
Closed

5.6.0 includes a breaking change in the API #1155

MarkEWaite opened this issue Aug 25, 2024 · 2 comments

Comments

@MarkEWaite
Copy link

MarkEWaite commented Aug 25, 2024

I believe that the API change of the fourth argument boolean (primitive type, nulls not allowed) to Boolean (object, nulls allowed) is a breaking change in pull request:

The change in the diff went from this:

    public ProjectHook addHook(Object projectIdOrPath, String url, ProjectHook enabledHooks,
            boolean enableSslVerification, String secretToken) throws GitLabApiException {

to this:

    public ProjectHook addHook(Object projectIdOrPath, String url, ProjectHook enabledHooks,
            Boolean enableSslVerification, String secretToken) throws GitLabApiException {

The Jenkins issue tracker received two reports of method not found exceptions in issue JENKINS-73672.

Is there a critical need for the change of type in the argument?

If not, could that change be reverted and a new release provided so that API compatibility is retained?

MarkEWaite added a commit to MarkEWaite/gitlab4j-api that referenced this issue Aug 27, 2024
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
@basil
Copy link

basil commented Aug 27, 2024

Note that as of jenkinsci/gitlab-branch-source-plugin#438 consumers are actually depending on the new signature 😬

@MarkEWaite
Copy link
Author

Closing this issue because the Jenkins plugin has updated to the 5.6.0 API and a revert to the 5.5.0 compatible API would be another breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants