Error 500 when trying to create a tag
Summary
When trying to create a tag, error 500 page is shown occasionally.
Steps to reproduce
Click on the side menu "Repository - Tags"
Click on the "New tag" button on the right top area of the page
Click on "Create tag" button
Example Project
What is the current bug behavior?
Error 500 page is shown
What is the expected correct behavior?
tag created
Relevant logs and/or screenshots
Started POST "/aaa/bbb/tags" for 127.0.0.1 at 2019-10-24 10:40:14 +0900
Processing by Projects::TagsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "tag_name"=>"v3.10.11", "message"=>"", "release_description"=>"description"}
Completed 500 Internal Server Error in 13ms (ActiveRecord: 1.3ms)
ArgumentError (3:empty target revision):
lib/gitlab/git/wraps_gitaly_errors.rb:11:in `rescue in wrapped_gitaly_errors'
lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'
lib/gitlab/git/repository.rb:533:in `add_tag'
app/models/repository.rb:208:in `add_tag'
app/services/tags/create_service.rb:15:in `execute'
app/controllers/projects/tags_controller.rb:46:in `create'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:434:in `set_locale'
lib/gitlab/middleware/multipart.rb:103:in `call'
lib/gitlab/request_profiler/middleware.rb:16: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/correlation_id.rb:15:in `use_id'
lib/gitlab/middleware/correlation_id.rb:15:in `call'
lib/gitlab/middleware/read_only/controller.rb:40: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:13:in `call'
Started GET "/tmax-os/BasicApp/tags/new" for 127.0.0.1 at 2019-10-24 10:40:15 +0900
Processing by Projects::TagsController#new as HTML
Parameters: {"namespace_id"=>"tmax-os", "project_id"=>"BasicApp"}
Completed 200 OK in 62ms (Views: 49.3ms | ActiveRecord: 3.6ms)
Started GET "/uploads/-/system/project/avatar/70/app.png?width=40" for 127.0.0.1 at 2019-10-24 10:40:16 +0900
Started GET "/uploads/-/system/group/avatar/28/1458135084_Html.png?width=15" for 127.0.0.1 at 2019-10-24 10:40:16 +0900
Started GET "/uploads/-/system/project/avatar/70/app.png?width=15" for 127.0.0.1 at 2019-10-24 10:40:16 +0900
Processing by UploadsController#show as HTML
Parameters: {"width"=>"40", "model"=>"project", "mounted_as"=>"avatar", "id"=>"70", "filename"=>"app.png"}
Processing by UploadsController#show as HTML
Processing by UploadsController#show as HTML
Parameters: {"width"=>"15", "model"=>"project", "mounted_as"=>"avatar", "id"=>"70", "filename"=>"app.png"}
Parameters: {"width"=>"15", "model"=>"group", "mounted_as"=>"avatar", "id"=>"28", "filename"=>"1458135084_Html.png"}
Sent file /opt/gitlab/embedded/service/gitlab-rails/public/uploads/-/system/project/avatar/70/app.png (0.1ms)
Completed 200 OK in 13ms (ActiveRecord: 1.9ms)
Sent file /opt/gitlab/embedded/service/gitlab-rails/public/uploads/-/system/project/avatar/70/app.png (0.1ms)
Sent file /opt/gitlab/embedded/service/gitlab-rails/public/uploads/-/system/group/avatar/28/1458135084_Html.png (0.1ms)
Completed 200 OK in 14ms (ActiveRecord: 1.8ms)
Completed 200 OK in 14ms (ActiveRecord: 1.6ms)
Started GET "/-/metrics" for 127.0.0.1 at 2019-10-24 10:40:18 +0900
Processing by MetricsController#index as HTML
Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)


