Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-10674

Invalid cached effective diffs can cause unhandled exceptions

    XMLWordPrintable

    Details

      Description

      If a cached effective diff contains invalid data, it can cause an unhandled exception which can break the pull request list (and other functionality).

      The most common failure looks like this:

      2018-03-06 11:40:22,168 ERROR [http-nio-7990-exec-446] jdoe @1B21JCCx700x26273498x19 1rmp21i 1.1.1.1,2.2.2.2 "GET /rest/api/latest/projects/KEY/repos/slug/pull-requests/1/merge HTTP/1.0" c.a.s.i.r.e.DefaultUnhandledExceptionMapperHelper Unhandled exception while processing REST request: "GET /rest/api/latest/projects/KEY/repos/slug/pull-requests/1/merge HTTP/1.0"
      java.lang.IllegalArgumentException: No enum constant com.atlassian.stash.internal.scm.git.pull.PullRequestMergeType.CLEANICTED
      	at java.lang.Enum.valueOf(Enum.java:238)
      	at com.atlassian.stash.internal.scm.git.pull.PullRequestMergeType.valueOf(PullRequestMergeType.java:14)
      	at com.atlassian.stash.internal.scm.git.pull.CachedEffectiveDiff.<init>(CachedEffectiveDiff.java:39)
      	at com.atlassian.stash.internal.scm.git.pull.CachedEffectiveDiff.load(CachedEffectiveDiff.java:168)
      	at com.atlassian.stash.internal.scm.git.pull.CachedEffectiveDiff.load(CachedEffectiveDiff.java:141)
      

      Invalid cached data should be ignored, rather than causing failures.

        Attachments

          Activity

            People

            Assignee:
            bturner Bryan Turner
            Reporter:
            bturner Bryan Turner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: