Releases are not automatically deleted when deleting corresponding tag
Summary
Releases always refer to a tag. When you delete a tag, the corresponding release is not deleted. Then, if you try to delete the release (making an API call), it fails, saying that it's not posible to delete the release because the tag does not exist.
Steps to reproduce
Create a tag, then a release that points to previous tag, finally delete the tag. The release is not deleted.
What is the expected correct behavior?
The release should be deleted along with the tag.
Results of GitLab environment info
System information
System:
Proxy: no
Current User: git
Using RVM: no
Ruby Version: 2.5.3p105
Gem Version: 2.7.6
Bundler Version:1.16.6
Rake Version: 12.3.2
Redis Version: 3.2.12
Git Version: 2.18.1
Sidekiq Version:5.2.3
Go Version: unknown
GitLab information
Version: 11.7.0-ee
Revision: c02f0d4
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
DB Version: 9.6.11
URL: https://gitlab.rnd.saltosystems.com
HTTP Clone URL: https://gitlab.rnd.saltosystems.com/some-group/some-project.git
SSH Clone URL: git@gitlab.rnd.saltosystems.com:some-group/some-project.git
Elasticsearch: no
Geo: no
Using LDAP: yes
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 8.4.4
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks
Git: /opt/gitlab/embedded/bin/git