Opened 3 weeks ago

#32197 new defect

Gitlab throwing 503 when creating a Merge Request from a forked repository

Reported by: hiro Owned by: tor-gitadm
Priority: Medium Milestone:
Component: Internal Services/Service - git Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Gitlab throw a 503 error when creating a merge request from a forked project to the main repository.

How to reproduce:

  • Create a fork of a project.
  • Create a MR from the fork to the main project

Gitlab production.log shows the following:

Started GET "/hiro/bridgedb/merge_requests/new?utf8=%E2%9C%93&merge_request[source_project_id]=261&merge_request[source_branch]=status-check&merge_request[target_project_id]=260&merge_request[target_branch]=master" for 185.220.101.33 at 2019-10-22 17:37:35 +0000
Processing by Projects::MergeRequests::CreationsController#new as HTML
  Parameters: {"utf8"=>"✓", "merge_request"=>{"source_project_id"=>"261", "source_branch"=>"status-check", "target_project_id"=>"260", "target_branch"=>"master"}, "namespace_id"=>"hiro", "project_id"=>"bridgedb"}

Gitlab::Git::CommandError (2:Gitlab::Git::CommandError: ):
  lib/gitlab/git/wraps_gitaly_errors.rb:13:in `rescue in wrapped_gitaly_errors'
  lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'
  lib/gitlab/metrics/instrumentation.rb:161:in `block in wrapped_gitaly_errors'
  lib/gitlab/metrics/method_call.rb:36:in `measure'
  lib/gitlab/metrics/instrumentation.rb:161:in `wrapped_gitaly_errors'
  lib/gitlab/git/repository.rb:722:in `fetch_source_branch!'
  lib/gitlab/git/repository.rb:746:in `compare_source_branch'
  app/models/repository.rb:953:in `compare_source_branch'
  lib/gitlab/metrics/instrumentation.rb:161:in `block in compare_source_branch'
  lib/gitlab/metrics/method_call.rb:36:in `measure'
  lib/gitlab/metrics/instrumentation.rb:161:in `compare_source_branch'
  app/services/compare_service.rb:16:in `execute'
  app/services/merge_requests/build_service.rb:125:in `compare_branches'
  lib/gitlab/metrics/instrumentation.rb:161:in `block in compare_branches'
  lib/gitlab/metrics/method_call.rb:36:in `measure'
  lib/gitlab/metrics/instrumentation.rb:161:in `compare_branches'
  app/services/merge_requests/build_service.rb:43:in `execute'
  lib/gitlab/metrics/instrumentation.rb:161:in `block in execute'
  lib/gitlab/metrics/method_call.rb:36:in `measure'
  lib/gitlab/metrics/instrumentation.rb:161:in `execute'
  app/controllers/projects/merge_requests/creations_controller.rb:97:in `block in build_merge_request'
  lib/gitlab/gitaly_client.rb:284:in `allow_n_plus_1_calls'
  app/controllers/projects/merge_requests/creations_controller.rb:96:in `build_merge_request'
  lib/gitlab/session.rb:11:in `with_session'
  app/controllers/application_controller.rb:450:in `set_session_storage'
  lib/gitlab/i18n.rb:55:in `with_locale'
  lib/gitlab/i18n.rb:61:in `with_user_locale'
  app/controllers/application_controller.rb:444:in `set_locale'
  lib/gitlab/middleware/rails_queue_duration.rb:27:in `call'
  lib/gitlab/metrics/rack_middleware.rb:17:in `block in call'
  lib/gitlab/metrics/transaction.rb:57:in `run'
  lib/gitlab/metrics/rack_middleware.rb:17:in `call'
  lib/gitlab/request_profiler/middleware.rb:17:in `call'
  lib/gitlab/middleware/go.rb:20:in `call'
  lib/gitlab/etag_caching/middleware.rb:13:in `call'
  lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
  lib/gitlab/middleware/correlation_id.rb:15:in `call'
  lib/gitlab/middleware/multipart.rb:117:in `call'
  lib/gitlab/middleware/read_only/controller.rb:42:in `call'
  lib/gitlab/middleware/read_only.rb:18:in `call'
  lib/gitlab/middleware/basic_health_check.rb:25:in `call'
  lib/gitlab/request_context.rb:26:in `call'
  lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call'
  lib/gitlab/middleware/release_env.rb:12:in `call'

Completed 503 Service Unavailable in 267ms (Views: 0.7ms | ActiveRecord: 8.6ms | Elasticsearch: 0.0ms)

Child Tickets

Change History (0)

Note: See TracTickets for help on using tickets.