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

Branch indexing fails for outdated pull requests

    XMLWordPrintable

Details

    Description

      Problem

      Branch indexing aborts when one of the branches or pull requests has an unexpected problem, e.g. when a pull request refers to a deleted branch.

      Proposed solutions

      • Well-known situations (like the one mentioned above) should be handled gracefully and the corresponding branch jobs should be deleted automatically.
      • For unexpected errors, only the current branch should be skipped. Branch indexing should continue with the next branch.

      Attachments

        Issue Links

          Activity

            The problem arises when a PR refers to a deleted branch where the source commit no longer exists. I cannot currently reconstruct how this situation came about in our Bitbucket repo, but this plugin should be able to cope with such situations.

            The point is that `BitbucketCloudApiClient.resolveSourceFullHash()` does not handle API errors, resulting in `BitbucketRequestException`.

            I'll submit a pull request which I've tested with a local build of the plugin.

            hwellmann Harald Wellmann added a comment - The problem arises when a PR refers to a deleted branch where the source commit no longer exists. I cannot currently reconstruct how this situation came about in our Bitbucket repo, but this plugin should be able to cope with such situations. The point is that `BitbucketCloudApiClient.resolveSourceFullHash()` does not handle API errors, resulting in `BitbucketRequestException`. I'll submit a pull request which I've tested with a local build of the plugin.
            hwellmann Harald Wellmann added a comment - PR: https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/30
            jamesdumay James Dumay added a comment -

            Will be released in 2.2

            jamesdumay James Dumay added a comment - Will be released in 2.2

            People

              amuniz Antonio Muñiz
              hwellmann Harald Wellmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: