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

Nested branch naming breaking the dashboard

XMLWordPrintable

      Issue Summary

      Bitbucket doesn't prevent pushes of branches with nested naming in case of deletion before the push of a new one. However, such a push makes the user Dashboard unavailable.

      This is reproducible on the Data Center: yes

      Steps to Reproduce

      1. Clone the local copy of the existing repository
      2. Create a local branch with the name bugfix/ABC/test
      3. Add the commit to the branch and push it to the upstream
      4. Remove the branch locally
      5. Delete the branch on the upstream with Bitbucket UI
      6. Create a new local branch bugfix/ABC
      7. Add a new commit to the new local branch
      8. Push it to the upstream

      Expected Results

      • Push is successful and the user dashboard is shown

      Actual Results

      • Push is going through with the error on a client side:
        error: update_ref failed for ref 'refs/remotes/origin/bugfix/ABC': cannot lock ref 'refs/remotes/origin/bugfix/ABC': 'refs/remotes/origin/bugfix/ABC/test' exists; cannot create 'refs/remotes/origin/bugfix/ABC'
        
      • The branch is present on the upstream
      • No exception thrown in the logs during the push
      • On the opening of the user Dashboard the following error shown:
      • On the opening of the user Dashboard the following exception is shown in atlassian-bitbucket.log file:
        ERROR [http-nio-7990-exec-1] admin @1EVNFPCx824x842x0 1jyakp1 172.29.221.64,10.227.178.6 "GET /dashboard HTTP/1.1" c.a.s.i.w.HandlerExceptionResolverImpl INTERNAL: Error opening/reading [/var/atlassian/application-data/bitbucket/shared/data/repositories/1/refs/heads/bugfix/ABC/test]
        io.grpc.StatusRuntimeException: INTERNAL: Error opening/reading [/var/atlassian/application-data/bitbucket/shared/data/repositories/1/refs/heads/bugfix/ABC/test]
                at io.grpc.Status.asRuntimeException(Status.java:537)
                at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:481)
                at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
                at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
                at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
                at com.atlassian.stash.internal.scm.git.mesh.LastSeenClientInterceptor$LastSeenClientListener.onClose(LastSeenClientInterceptor.java:40)
                at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
                at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
                at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
                at com.atlassian.stash.internal.scm.git.mesh.StatefulClientCallListener.onClose(StatefulClientCallListener.java:34)
                at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
                at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
                at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
                at com.atlassian.stash.internal.scm.git.mesh.DeadlinePropagatingClientInterceptor$DeadlinePropagatingListener.onClose(DeadlinePropagatingClientInterceptor.java:156)
                at com.atlassian.stash.internal.scm.git.mesh.ErrorHandlingClientInterceptor$ErrorHandlingCall$1.onClose(ErrorHandlingClientInterceptor.java:149)
                at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:574)
                at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:72)
                at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:742)
                at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723)
                at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
                at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
                at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
                at java.base/java.lang.Thread.run(Thread.java:840)
                ... 1 frame trimmed
        

      Workaround

      Currently, there is no known workaround for this behavior. A workaround will be added here when available

              cf36c85a7bd3 Charlie Wang
              ashaleev Anton Shaleev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: