Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-12780

Display better error message in the Bitbucket UI while editing/adding reviewers to the Pull Request

    XMLWordPrintable

Details

    • 7
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Problem Statement:
      Facing issues while adding/editing some reviewers to the pull request.

      Error Message:

      2021-03-02 11:46:34,264 DEBUG [https-jsse-nio-8443-exec-25] akaro @9WLXFDx706x5239828x1 6y6hvi 10.1.33.49 "PUT /rest/api/latest/projects/APP/repos/datasetup/pull-requests/1054 HTTP/1.1" c.a.s.i.e.TransactionAwareEventPublisher Deferring publishing for PullRequestActivityEvent until AFTER_COMMIT
      2021-03-02 11:46:34,264 DEBUG [https-jsse-nio-8443-exec-25] akaro @9WLXFDx706x5239828x1 6y6hvi 10.1.33.49 "PUT /rest/api/latest/projects/APP/repos/datasetup/pull-requests/1054 HTTP/1.1" c.a.s.i.e.TransactionAwareEventPublisher Deferring publishing for PullRequestUpdatedEvent until AFTER_COMMIT
      2021-03-02 11:46:34,267 DEBUG [https-jsse-nio-8443-exec-25] akaro @9WLXFDx706x5239828x1 6y6hvi 10.1.33.49 "PUT /rest/api/latest/projects/APP/repos/datasetup/pull-requests/1054 HTTP/1.1" c.a.s.i.r.e.ServiceExceptionMapper Mapping ServiceException to REST response 409
      com.atlassian.bitbucket.pull.InvalidPullRequestReviewersException: Errors encountered while adding some reviewers to this pull request.
              at com.atlassian.stash.internal.pull.InternalPullRequestParticipantHelper.resolveParticipants(InternalPullRequestParticipantHelper.java:614)
              at com.atlassian.stash.internal.pull.InternalPullRequestParticipantHelper.setReviewers(InternalPullRequestParticipantHelper.java:344)
              at com.atlassian.stash.internal.pull.InternalPullRequestParticipantHelper$$FastClassBySpringCGLIB$$c860b272.invoke(<generated>)
              at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
              at com.atlassian.stash.internal.pull.InternalPullRequestParticipantHelper$$EnhancerBySpringCGLIB$$171ab038.setReviewers(<generated>)
              at com.atlassian.stash.internal.pull.DefaultPullRequestService.update(DefaultPullRequestService.java:1403)
              at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
              at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
              at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
              at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
              at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
              at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
              at com.atlassian.stash.internal.rest.pull.PullRequestResource.update(PullRequestResource.java:838)
              at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
              at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
              at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
              at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
              at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
              at com.atlassian.analytics.client.filter.UniversalAnalyticsFilter.doFilter(UniversalAnalyticsFilter.java:75)
              at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:48)
              at com.atlassian.bitbucket.internal.xcode.web.XcodeUserAgentFilter.doFilter(XcodeUserAgentFilter.java:36)
              at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
              at com.atlassian.bitbucket.internal.ratelimit.servlet.filter.RateLimitFilter.doFilter(RateLimitFilter.java:75)
              at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:81)
              at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
              at com.atlassian.stash.internal.web.auth.AuthorizationFailureInterceptor.doFilterInternal(AuthorizationFailureInterceptor.java:39)
              at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:85)
              at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:112)
              at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75)
              at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94)
              at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67)
              at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
              at com.atlassian.plugin.connect.plugin.auth.oauth2.DefaultSalAuthenticationFilter.doFilter(DefaultSalAuthenticationFilter.java:69)
              at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109)
              at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37)
              at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:26)
              at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:48)
              at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
              at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:90)
              at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73)
              at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:84)
              at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.lang.Thread.run(Thread.java:748)
              ... 300 frames trimmed
      

      Explanation:

      The reviewer resolution got failed during the PullRequest call.
      When adding users to a PR, we iterate all existing participants and search by their name attribute and resolve participants by a given role and set of the user name. Successful resolution yields the participant entity to the result set. In case if one or more participants can't be resolved, then it throws InvalidPullRequestReviewersException and throws the below error in the Bitbucket UI.

      The current error message "Errors encountered while adding some reviewers to this pull request" seems misleading and needs a change to include a better error in the UI so that users can better understand what the problem is.

      Support Replication:
      We are able to replicate the issue by adding invalid users to the reviewer's list during PR.
      The error pops up while editing the PR and once we remove the invalid user the operation is successful.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ef8f1dfe3bb9 Dinesh Babu Jeyachandran (Inactive)
              Votes:
              6 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: