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

          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.

          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.

          Magne added a comment - - edited

          What's the status for this bug?

          It says it was part of the 4.1.1 Bitbucket Server Integration plugin here:
          https://plugins.jenkins.io/atlassian-bitbucket-server-integration/

          But the status here is "In progress".

          We installed the 4.1.1 version of the plugin and it still doesn't work as expected. The build starts now, but it fails to download the repo to the correct folder.

          We run the 2.46.3 version of Jenkins

          Magne added a comment - - edited What's the status for this bug? It says it was part of the 4.1.1 Bitbucket Server Integration plugin here: https://plugins.jenkins.io/atlassian-bitbucket-server-integration/ But the status here is "In progress". We installed the 4.1.1 version of the plugin and it still doesn't work as expected. The build starts now, but it fails to download the repo to the correct folder. We run the 2.46.3 version of Jenkins

          Austin added a comment -

          Can confirm regression still exists in 4.1.1 with a nondescript error during checkout.
          ERROR: The requested resource does not exist

          Austin added a comment - Can confirm regression still exists in 4.1.1 with a nondescript error during checkout. ERROR: The requested resource does not exist

          Dyon added a comment -

          Hi all, 

          Sorry about the issues with this one. A PR is up now to change to a supported API for slashed branch and tag names. This will release in 4.1.2 as soon as possible. 

          Dyon added a comment - Hi all,  Sorry about the issues with this one. A PR is up now to change to a supported API for slashed branch and tag names. This will release in 4.1.2 as soon as possible. 

          mesa added a comment -

          Also getting
          ERROR: The requested resource does not exist

          May I suggest that the error message also gets fixed to be more helpful? Like for example (at least) naming the resource?

          mesa added a comment - Also getting ERROR: The requested resource does not exist May I suggest that the error message also gets fixed to be more helpful? Like for example (at least) naming the resource?

          could anyone please release 4.1.2?

          Erich Mauerböck added a comment - could anyone please release 4.1.2?

          Dyon added a comment -

          4.1.2 has been released. Thank you for your patience on this one. 

          Dyon added a comment - 4.1.2 has been released. Thank you for your patience on this one. 

          mesa added a comment -

          I confirm it works. Thank you!

          mesa added a comment - I confirm it works. Thank you!

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

              Created:
              Updated:
              Resolved: