Create new branch in web-ui causes Error 500
Summary
Create new branch from web ui is broken
Steps to reproduce
- Try to create a new branch on
<repo_url>/branches/new
- Click Create branch button
What is the current bug behavior?
Error 500
What is the expected correct behavior?
New branch should be created Redirect to Repository overview (i think this happened in previous GitLab versions)
Relevant logs and/or screenshots
Seems git
command fails as I see following in our Sentry:
in: lib/gitlab/git/operation_service.rb in update_ref at line 155
152 end
153
154 unless status.zero?
155 raise Gitlab::Git::CommitError.new(
156 "Could not update branch #{Gitlab::Git.branch_name(ref)}." \
157 " Please refresh and try again.")
158 end
full Traceback below:
Gitlab::Git::CommitError: Could not update branch daniel. Please refresh and try again.
from lib/gitlab/git/operation_service.rb:155:in `update_ref'
from lib/gitlab/git/operation_service.rb:125:in `block in update_ref_in_hooks'
from lib/gitlab/git/operation_service.rb:137:in `block in with_hooks'
from lib/gitlab/git/hooks_service.rb:23:in `execute'
from lib/gitlab/git/operation_service.rb:130:in `with_hooks'
from lib/gitlab/git/operation_service.rb:124:in `update_ref_in_hooks'
from lib/gitlab/git/operation_service.rb:22:in `add_branch'
from lib/gitlab/git/repository.rb:617:in `add_branch'
from app/models/repository.rb:175:in `add_branch'
from lib/gitlab/metrics/instrumentation.rb:156:in `block in add_branch'
from lib/gitlab/metrics/method_call.rb:23:in `measure'
from lib/gitlab/metrics/instrumentation.rb:156:in `add_branch'
from app/services/create_branch_service.rb:10:in `execute'
from app/controllers/projects/branches_controller.rb:41:in `create'
from action_controller/metal/implicit_render.rb:4:in `send_action'
from abstract_controller/base.rb:198:in `process_action'
from action_controller/metal/rendering.rb:10:in `process_action'
from abstract_controller/callbacks.rb:20:in `block in process_action'
from active_support/callbacks.rb:117:in `call'
from active_support/callbacks.rb:555:in `block (2 levels) in compile'
from active_support/callbacks.rb:505:in `call'
from active_support/callbacks.rb:498:in `block (2 levels) in around'
from active_support/callbacks.rb:313:in `block (2 levels) in halting'
from lib/gitlab/i18n.rb:46:in `with_locale'
from lib/gitlab/i18n.rb:52:in `with_user_locale'
from app/controllers/application_controller.rb:326:in `set_locale'
from active_support/callbacks.rb:432:in `block in make_lambda'
from active_support/callbacks.rb:312:in `block in halting'
from active_support/callbacks.rb:497:in `block in around'
from active_support/callbacks.rb:505:in `call'
from active_support/callbacks.rb:498:in `block (2 levels) in around'
from active_support/callbacks.rb:298:in `block in halting_and_conditional'
from active_support/callbacks.rb:497:in `block in around'
from active_support/callbacks.rb:505:in `call'
from active_support/callbacks.rb:92:in `__run_callbacks__'
from active_support/callbacks.rb:778:in `_run_process_action_callbacks'
from active_support/callbacks.rb:81:in `run_callbacks'
from abstract_controller/callbacks.rb:19:in `process_action'
from action_controller/metal/rescue.rb:29:in `process_action'
from action_controller/metal/instrumentation.rb:32:in `block in process_action'
from active_support/notifications.rb:164:in `block in instrument'
from active_support/notifications/instrumenter.rb:20:in `instrument'
from active_support/notifications.rb:164:in `instrument'
from action_controller/metal/instrumentation.rb:30:in `process_action'
from action_controller/metal/params_wrapper.rb:250:in `process_action'
from active_record/railties/controller_runtime.rb:18:in `process_action'
from abstract_controller/base.rb:137:in `process'
from action_view/rendering.rb:30:in `process'
from action_controller/metal.rb:196:in `dispatch'
from action_controller/metal/rack_delegation.rb:13:in `dispatch'
from action_controller/metal.rb:237:in `block in action'
from action_dispatch/routing/route_set.rb:74:in `dispatch'
from action_dispatch/routing/route_set.rb:43:in `serve'
from action_dispatch/routing/mapper.rb:49:in `serve'
from action_dispatch/journey/router.rb:43:in `block in serve'
from action_dispatch/journey/router.rb:30:in `each'
from action_dispatch/journey/router.rb:30:in `serve'
from action_dispatch/routing/route_set.rb:817:in `call'
from peek/views/performance_bar/process_utilization.rb:120:in `call'
from omniauth/strategy.rb:186:in `call!'
from omniauth/strategy.rb:164:in `call'
from lib/gitlab/middleware/multipart.rb:93:in `call'
from lib/gitlab/request_profiler/middleware.rb:14:in `call'
from lib/gitlab/middleware/go.rb:17:in `call'
from flipper/middleware/memoizer.rb:55:in `call'
from lib/gitlab/etag_caching/middleware.rb:11:in `call'
from lib/gitlab/middleware/rails_queue_duration.rb:20:in `call'
from lib/gitlab/metrics/rack_middleware.rb:29:in `block in call'
from lib/gitlab/metrics/transaction.rb:49:in `run'
from lib/gitlab/metrics/rack_middleware.rb:29:in `call'
from warden/manager.rb:35:in `block in call'
from warden/manager.rb:34:in `catch'
from warden/manager.rb:34:in `call'
from rack/cors.rb:80:in `call'
from rack/attack.rb:107:in `call'
from rack/etag.rb:24:in `call'
from rack/conditionalget.rb:38:in `call'
from rack/head.rb:13:in `call'
from action_dispatch/middleware/params_parser.rb:27:in `call'
from action_dispatch/middleware/flash.rb:260:in `call'
from rack/session/abstract/id.rb:225:in `context'
from rack/session/abstract/id.rb:220:in `call'
from action_dispatch/middleware/cookies.rb:560:in `call'
from active_record/query_cache.rb:36:in `call'
from active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
from action_dispatch/middleware/callbacks.rb:29:in `block in call'
from active_support/callbacks.rb:88:in `__run_callbacks__'
from active_support/callbacks.rb:778:in `_run_call_callbacks'
from active_support/callbacks.rb:81:in `run_callbacks'
from action_dispatch/middleware/callbacks.rb:27:in `call'
from action_dispatch/middleware/remote_ip.rb:78:in `call'
from action_dispatch/middleware/debug_exceptions.rb:17:in `call'
from action_dispatch/middleware/show_exceptions.rb:30:in `call'
from rails/rack/logger.rb:38:in `call_app'
from rails/rack/logger.rb:20:in `block in call'
from active_support/tagged_logging.rb:68:in `block in tagged'
from active_support/tagged_logging.rb:26:in `tagged'
from active_support/tagged_logging.rb:68:in `tagged'
from rails/rack/logger.rb:20:in `call'
from lib/gitlab/request_context.rb:18:in `call'
from request_store/middleware.rb:9:in `call'
from action_dispatch/middleware/request_id.rb:21:in `call'
from rack/methodoverride.rb:22:in `call'
from rack/runtime.rb:18:in `call'
from rack/lock.rb:17:in `call'
from rack/sendfile.rb:113:in `call'
from lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
from raven/integrations/rack.rb:50:in `call'
from rails/engine.rb:518:in `call'
from rails/application.rb:165:in `call'
from rails/railtie.rb:194:in `public_send'
from rails/railtie.rb:194:in `method_missing'
from rack/urlmap.rb:66:in `block in call'
from rack/urlmap.rb:50:in `each'
from rack/urlmap.rb:50:in `call'
from unicorn/http_server.rb:562:in `process_client'
from unicorn/worker_killer.rb:52:in `process_client'
from unicorn/http_server.rb:658:in `worker_loop'
from unicorn/http_server.rb:508:in `spawn_missing_workers'
from unicorn/http_server.rb:519:in `maintain_worker_count'
from unicorn/http_server.rb:283:in `join'
from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>'
from /opt/gitlab/embedded/bin/unicorn:23:in `load'
from /opt/gitlab/embedded/bin/unicorn:23:in `<main>'
Possible fixes
None found so far.