Skip to content

GitLabConnectionConfig.does not check if Gitlab Connection is unique #1670

Description

@arturrekawek

Jenkins and plugins versions report

Environment
Paste the output here

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

https://javadoc.jenkins.io/plugin/gitlab-plugin/com/dabsquared/gitlabjenkins/connection/GitLabConnectionConfig.html#addConnection(com.dabsquared.gitlabjenkins.connection.GitLabConnection)

Any Jenkins LTS version

Reproduction steps

run few times with Groovy
gitLabConnectionConfig.addConnection(newConnection)
it does not check if newConnection is unique

Expected Results

this function should work as
https://javadoc.jenkins.io/plugin/gitlab-branch-source/io/jenkins/plugins/gitlabserverconfig/servers/GitLabServers.html#addServer(io.jenkins.plugins.gitlabserverconfig.servers.GitLabServer)

Actual Results

Currently you can create multeiple connection with same id (name)
It is not acceptable

Anything else?

No

Are you interested in contributing a fix?

Currently no

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugFor changelog: Minor bug. Will be listed after features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions