• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins: 2.479.2
      OS: Linux - 6.1.115-126.197.amzn2023.x86_64
      Java: 17.0.13 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
      cloudbees-bitbucket-branch-source:871.v28d74e8b_4226
    • 935.0.0

      Hello,

       

      The following PR introduced a regression: https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/796

      Fetch on pull requests has started to fail with the following error: 

      ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
      ERROR: Maximum checkout retry attempts reached, aborting

      This issue is reproducible on plugin versions from 871.v28d74e8b_4226 to the latest.

      We had to roll back the plugin to 866.vdea_7dcd3008e.

      It seems that in an attempt to fix the checkout flow for Bitbucket Data Center, Bitbucket Cloud was not properly tested, which has become a major issue for us running Bitbucket Data Center v8.19.5.

      As a side note, the Atlassian issue referenced in the comments still hasn't been addressed, so it's unclear why this change was made in the first place.

       

      Your attention to this matter would be greatly appreciated.

       

      Thanks in advance.

          [JENKINS-74980] Pull requests are no longer fetchable

          Dexter added a comment -

          I've encountered same issue, and My team find that if we configure the owner( aka Bitbucket project id ) in lower case, the Pull requests can work.

          however, in Bitbucket the project ids are actually UPPER CASE...  we had to stick with 866 as most of our pipeline jobs are configured with upper case project id and i don't know a way to easily modify them all in batch.

          Dexter added a comment - I've encountered same issue, and My team find that if we configure the owner( aka Bitbucket project id ) in lower case , the Pull requests can work. however, in Bitbucket the project ids are actually UPPER CASE ...  we had to stick with 866 as most of our pipeline jobs are configured with upper case project id and i don't know a way to easily modify them all in batch.

          Nikolas Falco added a comment -

          Thanks to digger into the issue giving to me  an indication where work.

          Time ago I read this comment that could be related to this issue. I had already applied in PR 927. It was not released. Can you try master to verify if the bug has been resolved?

          https://ci.jenkins.io/job/Plugins/job/bitbucket-branch-source-plugin/job/master/548/artifact/org/jenkins-ci/plugins/cloudbees-bitbucket-branch-source/933.2.1972.v6a_0d98751da_d/cloudbees-bitbucket-branch-source-933.2.1972.v6a_0d98751da_d.hpi

          Nikolas Falco added a comment - Thanks to digger into the issue giving to me  an indication where work. Time ago I read this comment that could be related to this issue. I had already applied in PR 927. It was not released. Can you try master to verify if the bug has been resolved? https://ci.jenkins.io/job/Plugins/job/bitbucket-branch-source-plugin/job/master/548/artifact/org/jenkins-ci/plugins/cloudbees-bitbucket-branch-source/933.2.1972.v6a_0d98751da_d/cloudbees-bitbucket-branch-source-933.2.1972.v6a_0d98751da_d.hpi

          Yevhen added a comment -

          nfalco The problem still exists in latest version of plugin. Error is the same as in description of the task.

          Yevhen added a comment - nfalco The problem still exists in latest version of plugin. Error is the same as in description of the task.

          Nikolas Falco added a comment - - edited

          yevhenzamburskyi ok that in latest released plugin version (933.2.x ?) has not been fixed.
          I ask if with the incremental build I post in my previous commit the issue has been resolved or not where I should lookaround to see if other compare to fix.

          This is the plugin to test
          https://ci.jenkins.io/job/Plugins/job/bitbucket-branch-source-plugin/job/master/lastSuccessfulBuild/artifact/org/jenkins-ci/plugins/cloudbees-bitbucket-branch-source/934.4.0985.v1fde179e0f52/cloudbees-bitbucket-branch-source-934.4.0985.v1fde179e0f52.hpi

          Nikolas Falco added a comment - - edited yevhenzamburskyi ok that in latest released plugin version (933.2.x ?) has not been fixed. I ask if with the incremental build I post in my previous commit the issue has been resolved or not where I should lookaround to see if other compare to fix. This is the plugin to test https://ci.jenkins.io/job/Plugins/job/bitbucket-branch-source-plugin/job/master/lastSuccessfulBuild/artifact/org/jenkins-ci/plugins/cloudbees-bitbucket-branch-source/934.4.0985.v1fde179e0f52/cloudbees-bitbucket-branch-source-934.4.0985.v1fde179e0f52.hpi

          Dexter added a comment - - edited

          nfalco , I tried the latest build of master branch,  issue still exists.
            cloudbees-bitbucket-branch-source-934.4.31006.veea_9c6d76f87.hpi

          Dexter added a comment - - edited nfalco , I tried the latest build of master branch,  issue still exists.   cloudbees-bitbucket-branch-source-934.4.31006.veea_9c6d76f87.hpi

          Prankevich added a comment -

           issue still exists, i also tested.

          Prankevich added a comment -  issue still exists, i also tested.

          Yakov added a comment -

          same problem

          Yakov added a comment - same problem

          Kyrylo added a comment -

          I can confirm that the issue is not resolved in the latest available release, 934.4.2.

          Kyrylo added a comment - I can confirm that the issue is not resolved in the latest available release, 934.4.2 .

          Nikolas Falco added a comment - - edited

          Last chance following the unique suggestion about the root cause of the issue.
          This PR replace any exact match of repoOwner (project key i suppose in Bitbucket Data Center) with a match case insensitive.

          https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/cloudbees-bitbucket-branch-source/934.4.31007.v146fc88cef5e/cloudbees-bitbucket-branch-source-934.4.31007.v146fc88cef5e.hpi

           

          Now let's say that also if in the past was supported this (strange) use case does not have much sense as the time Bitbucket Data Center decide use request URL as is (case sensitive) the whole integration will not work. The specification of URL says that only hostname are NOT case sensitive, the other part of the URL is case sensitive.

          If the incremental version of the PR does not work I suggest to create a bash shell script that replace in every job descriptor file (config.xml) project name from MYPROJECTKEY into myproject and than force Jenkins to reload the configuration from disk.

          Nikolas Falco added a comment - - edited Last chance following the unique suggestion about the root cause of the issue. This PR replace any exact match of repoOwner (project key i suppose in Bitbucket Data Center) with a match case insensitive. https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/cloudbees-bitbucket-branch-source/934.4.31007.v146fc88cef5e/cloudbees-bitbucket-branch-source-934.4.31007.v146fc88cef5e.hpi   Now let's say that also if in the past was supported this (strange) use case does not have much sense as the time Bitbucket Data Center decide use request URL as is (case sensitive) the whole integration will not work. The specification of URL says that only hostname are NOT case sensitive, the other part of the URL is case sensitive. If the incremental version of the PR does not work I suggest to create a bash shell script that replace in every job descriptor file ( config.xml) project name from MYPROJECTKEY into myproject and than force Jenkins to reload the configuration from disk.

          Nikolas Falco added a comment - - edited

          I've encountered same issue, and My team find that if we configure the owner( aka Bitbucket project id ) in lower case, the Pull requests can work. however, in Bitbucket the project ids are actually UPPER CASE...

          dexterwoo something strange to hear, which version are you using of Bitbucket server? My expectation is the that {projecyKey} in the URL is exactly how is defined in the Bitbucket, uppercase. The same is for cloud

          Nikolas Falco added a comment - - edited I've encountered same issue, and My team find that if we configure the owner( aka Bitbucket project id ) in lower case , the Pull requests can work. however, in Bitbucket the project ids are actually UPPER CASE ... dexterwoo something strange to hear, which version are you using of Bitbucket server? My expectation is the that {projecyKey} in the URL is exactly how is defined in the Bitbucket, uppercase. The same is for cloud

            nfalco Nikolas Falco
            ksmnv Kyrylo
            Votes:
            7 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: