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

Scan Organization Folder fails when a repository is deleted but configured to redirect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • bitbucket-branch-source-plugin 2.2.14
      Jenkins ver. 2.138.2

      I have a reporsitory in my Bitbucket account that was deleted but it's configured to redirect to an other URL, hence not 100% deleted and can still be accessed through https://bitbucket.org/geniousphp/soam

      When I run my scan, it fails because of that and throw the error

      ERROR: [Wed Nov 14 14:59:11 UTC 2018] Could not fetch sources from navigator com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMNavigator@2e752b5f java.io.FileNotFoundException: URL:
      https://api.bitbucket.org/2.0/repositories/geniousphp/soam
      at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequestAsInputStream(BitbucketCloudApiClient.java:765) at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequest(BitbucketCloudApiClient.java:785) at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRepository(BitbucketCloudApiClient.java:330) at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.getRepositoryType(BitbucketSCMSource.java:504) at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:548) at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:374) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:328) at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:263) at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1346) at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1361) at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:256) at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:206) at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMNavigator.visitSources(BitbucketSCMNavigator.java:487) at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:458) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165) at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:910) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)
      

       

      I think that this issue can be similar to JENKINS-47900

      The thing is that I can't workaround this and hence it's definitely a blocker. I would love to delete completely that repo but it's not possible from Bitbucket UI, not API. The only way to remove it is by contacting Bitbucket (https://confluence.atlassian.com/bitbucket/how-do-i-remove-a-redirect-url-i-supplied-when-i-deleted-my-repo-282173855.html)

            Unassigned Unassigned
            geniousphp Ahmed Elghazal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: