Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45360

creating a pipeline with a duplicate name does not fail gracefully with custom Org

    Details

    • Similar Issues:
    • Epic Link:
    • Sprint:
      Blue Ocean 1.2-beta3, Blue Ocean 1.2-beta4

      Description

      If you have a custom organisation folder and try to create a pipeline with a duplicate name then the UI does not fail gracefully (the backend returns a HTTP 500 error as an IllegalArgumentException or Failure is thrown.

      I tried to look through the code to see where the duplicate check was done with stock Blue Ocean but could not see any check - and the Jenkins instance will throws the same result.

      Caused by: java.lang.IllegalArgumentException: team1/maven-test-project already exists
              at hudson.model.Items.verifyItemDoesNotAlreadyExist(Items.java:640)
              at hudson.model.ItemGroupMixIn.createProject(ItemGroupMixIn.java:317)
              at com.cloudbees.opscenter.bluesteel.folder.BlueSteelTeamFolder.createProject(BlueSteelTeamFolder.java:135)
              at io.jenkins.blueocean.scm.api.AbstractPipelineCreateRequest.createProject(AbstractPipelineCreateRequest.java:63)
              at io.jenkins.blueocean.scm.api.AbstractMultiBranchCreateRequest.createMultiBranchProject(AbstractMultiBranchCreateRequest.java:80)
              at io.jenkins.blueocean.scm.api.AbstractMultiBranchCreateRequest.create(AbstractMultiBranchCreateRequest.java:54)
              at io.jenkins.blueocean.rest.model.BluePipelineContainer.create(BluePipelineContainer.java:48)
              at io.jenkins.blueocean.rest.model.BluePipelineContainer.create(BluePipelineContainer.java:44)
              at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
              at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
      

        Attachments

          Issue Links

            Activity

            teilo James Nord created issue -
            teilo James Nord made changes -
            Field Original Value New Value
            Environment Jenkins 2.60.1
            Blue Ocean 1.1.2 or Blue Ocean 1.1.4
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.2-beta3 [ 346 ]
            teilo James Nord made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            teilo James Nord made changes -
            Assignee James Nord [ teilo ]
            teilo James Nord made changes -
            Link This issue relates to JENKINS-45482 [ JENKINS-45482 ]
            teilo James Nord made changes -
            Link This issue relates to JENKINS-45442 [ JENKINS-45442 ]
            jamesdumay James Dumay made changes -
            Epic Link JENKINS-35759 [ 171771 ]
            teilo James Nord made changes -
            Description If you have a cusomter organisation folder and try to create a pipeline with a duplicate name then the UI does not fail gracefully (the backend returns a HTTP 500 error as an {{IllegalArgumentException}} or {{Failure}} is thrown.

            I tried to look through the code to see where the duplicate check was done with stock Blue Ocean but could not see any check - and the Jenkins instance will throws the same result.

            {code}
            Caused by: java.lang.IllegalArgumentException: team1/maven-test-project already exists
                    at hudson.model.Items.verifyItemDoesNotAlreadyExist(Items.java:640)
                    at hudson.model.ItemGroupMixIn.createProject(ItemGroupMixIn.java:317)
                    at com.cloudbees.opscenter.bluesteel.folder.BlueSteelTeamFolder.createProject(BlueSteelTeamFolder.java:135)
                    at io.jenkins.blueocean.scm.api.AbstractPipelineCreateRequest.createProject(AbstractPipelineCreateRequest.java:63)
                    at io.jenkins.blueocean.scm.api.AbstractMultiBranchCreateRequest.createMultiBranchProject(AbstractMultiBranchCreateRequest.java:80)
                    at io.jenkins.blueocean.scm.api.AbstractMultiBranchCreateRequest.create(AbstractMultiBranchCreateRequest.java:54)
                    at io.jenkins.blueocean.rest.model.BluePipelineContainer.create(BluePipelineContainer.java:48)
                    at io.jenkins.blueocean.rest.model.BluePipelineContainer.create(BluePipelineContainer.java:44)
                    at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
            {code}
            If you have a custom organisation folder and try to create a pipeline with a duplicate name then the UI does not fail gracefully (the backend returns a HTTP 500 error as an {{IllegalArgumentException}} or {{Failure}} is thrown.

            I tried to look through the code to see where the duplicate check was done with stock Blue Ocean but could not see any check - and the Jenkins instance will throws the same result.
            {code:java}
            Caused by: java.lang.IllegalArgumentException: team1/maven-test-project already exists
                    at hudson.model.Items.verifyItemDoesNotAlreadyExist(Items.java:640)
                    at hudson.model.ItemGroupMixIn.createProject(ItemGroupMixIn.java:317)
                    at com.cloudbees.opscenter.bluesteel.folder.BlueSteelTeamFolder.createProject(BlueSteelTeamFolder.java:135)
                    at io.jenkins.blueocean.scm.api.AbstractPipelineCreateRequest.createProject(AbstractPipelineCreateRequest.java:63)
                    at io.jenkins.blueocean.scm.api.AbstractMultiBranchCreateRequest.createMultiBranchProject(AbstractMultiBranchCreateRequest.java:80)
                    at io.jenkins.blueocean.scm.api.AbstractMultiBranchCreateRequest.create(AbstractMultiBranchCreateRequest.java:54)
                    at io.jenkins.blueocean.rest.model.BluePipelineContainer.create(BluePipelineContainer.java:48)
                    at io.jenkins.blueocean.rest.model.BluePipelineContainer.create(BluePipelineContainer.java:44)
                    at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
                    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
            {code}
            jamesdumay James Dumay made changes -
            Sprint Blue Ocean 1.2-beta3 [ 346 ] Blue Ocean 1.2-beta3, Blue Ocean 1.2-beta4 [ 346, 361 ]
            michaelneale Michael Neale made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            michaelneale Michael Neale made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal CJP-7266 (Web Link)" [ 19076 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal CJP-7244 (Web Link)" [ 19106 ]
            jbriden Jenn Briden made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                teilo James Nord
                Reporter:
                teilo James Nord
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: