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

Multibranch pipeline don't work with BitBucket branch names containing slashes

      After Bitbucket Server Integration Version update from 4.0.0 to 4.1.0 Multibranch Pipelines cannot run on branches containing slashes (such as feature branches e.g. "feature/new-feature-name")

      Output when run on branch with slash in its name:

       Branch event
       com.atlassian.bitbucket.jenkins.internal.client.exception.BadRequestException: - response: 400
       	at PluginClassLoader for atlassian-bitbucket-server-integration//com.atlassian.bitbucket.jenkins.internal.http.HttpRequestExecutorImpl.handleError(HttpRequestExecutorImpl.java:161)
       	at PluginClassLoader for atlassian-bitbucket-server-integration//com.atlassian.bitbucket.jenkins.internal.http.HttpRequestExecutorImpl.makeRequest(HttpRequestExecutorImpl.java:108)
       	at PluginClassLoader for atlassian-bitbucket-server-integration//com.atlassian.bitbucket.jenkins.internal.http.HttpRequestExecutorImpl.performRequest(HttpRequestExecutorImpl.java:173)
       	at PluginClassLoader for atlassian-bitbucket-server-integration//com.atlassian.bitbucket.jenkins.internal.http.HttpRequestExecutorImpl.executeRequest(HttpRequestExecutorImpl.java:94)
       	at PluginClassLoader for atlassian-bitbucket-server-integration//com.atlassian.bitbucket.jenkins.internal.http.HttpRequestExecutorImpl.executeGet(HttpRequestExecutorImpl.java:65)
       	at PluginClassLoader for atlassian-bitbucket-server-integration//com.atlassian.bitbucket.jenkins.internal.client.BitbucketRequestExecutor.makeGetRequest(BitbucketRequestExecutor.java:185)
       	at PluginClassLoader for atlassian-bitbucket-server-integration//com.atlassian.bitbucket.jenkins.internal.client.BitbucketRequestExecutor.makeGetRequest(BitbucketRequestExecutor.java:107)
       	at PluginClassLoader for atlassian-bitbucket-server-integration//com.atlassian.bitbucket.jenkins.internal.client.BitbucketCommitClientImpl.getCommit(BitbucketCommitClientImpl.java:31)
       	at PluginClassLoader for atlassian-bitbucket-server-integration//com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource.lambda$fetchBitbucketCommit$11(BitbucketSCMSource.java:495)
       	at java.base/java.util.Optional.map(Unknown Source)
       	at PluginClassLoader for atlassian-bitbucket-server-integration//com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource.fetchBitbucketCommit(BitbucketSCMSource.java:494)
       	at PluginClassLoader for atlassian-bitbucket-server-integration//com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:312)
       	at PluginClassLoader for scm-api//jenkins.scm.api.SCMSource.fetch(SCMSource.java:581)
       	at PluginClassLoader for workflow-multibranch//org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:104)
       	at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
       	at hudson.model.ResourceController.execute(ResourceController.java:101)
       	at hudson.model.Executor.run(Executor.java:446)
       Finished: FAILURE 

      The pipeline works correctly after downgrade to 4.0.0 version

          [JENKINS-73871] Multibranch pipeline don't work with BitBucket branch names containing slashes

          Maciej created issue -

          Brett Alex added a comment -

          don't know if it is related or a separate ticket, but after upgrading to 4.1.0 no multibranch pipeline jobs work anymore. Just fail with the
          HTTP_NOT_FOUND error
          "Bitbucket - Path Not Found"
          ERROR: The requested resource does not exist
          All works again after downgrading to 4.0.0

          Jenkins version 2.462-3.

          Brett Alex added a comment - don't know if it is related or a separate ticket, but after upgrading to 4.1.0 no multibranch pipeline jobs work anymore. Just fail with the HTTP_NOT_FOUND error "Bitbucket - Path Not Found" ERROR: The requested resource does not exist All works again after downgrading to 4.0.0 Jenkins version 2.462-3.

          Lorenz Werner added a comment -

          I can confirm, that I also can't build branches containing a slash when on 4.1.0.

          When the pipeline hits the 'checkout scm' command, it fails with the following error message:
          ERROR: The requested resource does not exist
          Downgrading to 4.0.0 fixed it for now.

          Lorenz Werner added a comment - I can confirm, that I also can't build branches containing a slash when on 4.1.0. When the pipeline hits the 'checkout scm' command, it fails with the following error message: ERROR: The requested resource does not exist Downgrading to 4.0.0 fixed it for now.
          Lorenz Werner made changes -
          Assignee New: Lorenz Werner [ lwerner ]
          Lorenz Werner made changes -
          Assignee Original: Lorenz Werner [ lwerner ]
          Dyon made changes -
          Labels New: triaged
          Dyon made changes -
          Assignee New: Dyon [ dgeorgopoulos ]

          Dyon added a comment -

          Thanks for bringing this up. I have pushed a fix here: https://github.com/jenkinsci/atlassian-bitbucket-server-integration-plugin/pull/447

          We will looking to get this patched as soon as possible.

           

          Thanks,

          Dyon

          Dyon added a comment - Thanks for bringing this up. I have pushed a fix here: https://github.com/jenkinsci/atlassian-bitbucket-server-integration-plugin/pull/447 We will looking to get this patched as soon as possible.   Thanks, Dyon

          Brett Alex added a comment - - edited

          dang, i forgot to lock the version and it auto upgraded back to v4.1.0. Now i can only downgrade from 4.1.0 to 4.1.0.  I don't see any of the packages on the github or jenkins website. Anyone have a link to the installation (hpa) package for 4.0.0 ?

          Nevermind, i found the link, https://updates.jenkins.io/download/plugins/atlassian-bitbucket-server-integration/4.0.0/atlassian-bitbucket-server-integration.hpi.  They really hide that sucker.

          Brett Alex added a comment - - edited dang, i forgot to lock the version and it auto upgraded back to v4.1.0. Now i can only downgrade from 4.1.0 to 4.1.0.  I don't see any of the packages on the github or jenkins website. Anyone have a link to the installation (hpa) package for 4.0.0 ? Nevermind, i found the link, https://updates.jenkins.io/download/plugins/atlassian-bitbucket-server-integration/4.0.0/atlassian-bitbucket-server-integration.hpi.   They really hide that sucker.
          Dyon made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

            dgeorgopoulos Dyon
            maciejb Maciej
            Votes:
            11 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: