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

Bitbucket client fail to retrieve resource with HTTP 404 for bitbucket server

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 934.3.2

      Running a pipeline cause a FileNotFoundException to be thrown after updating the Bitbucket Branch Source plugin from version 933.2.1 to >=933.3.0.

      The Jenkins instance is integrated with a Bitbucket Data Center instance and not a Cloud one.

      The file not found exception is thrown because the `pipeline_config.groovy` file is not found on the repository. The file is used by the Jenkins template engine (JTE) plugin (https://plugins.jenkins.io/templating-engine/) but it is not present in the repos because a default one is configured/provided.

      The Bitbucket branch source plugin was working correctly along with the Jenkins template engine (JTE) one for over 3 years till version 933.2.1.

      Having a brief look at the diff between 933.2.1 and version 933.3.0 reveals a lot of changes to the `com.cloudbees.jenkins.plugins.bitbucket.impl.client.AbstractBitbucketApi` class.
      The import for `java.io.FileNotFoundException` can be clearly seen along with the FileNotFound exception thrown on line 240 (the one in the logs I have attached).  Maybe, the previous behaviour was to ignore a 404 on that case.

      Attaching screenshots of the exception and the Bitbucket api endpoint called from the browser.

          [JENKINS-75157] Bitbucket client fail to retrieve resource with HTTP 404 for bitbucket server

          Giovanni DS created issue -
          Nikolas Falco made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Nikolas Falco made changes -
          Summary Original: Bitbucket Branch Source plugin file not found exception since version 933.3.0 New: Bitbucket client fail to retrieve resource with HTTP 404 for bitbucket server
          Nikolas Falco made changes -
          Remote Link New: This issue links to "PR (Web Link)" [ 30495 ]
          Giovanni DS made changes -
          Nikolas Falco made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Fixed but Unreleased [ 10203 ]
          Nikolas Falco made changes -
          Released As New: 934.3.2
          Status Original: Fixed but Unreleased [ 10203 ] New: Closed [ 6 ]

            nfalco Nikolas Falco
            giovannids Giovanni DS
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: