Commit graph

2 commits

Author SHA1 Message Date
Stan Hu
a1912ccc89 Delete container repository tags outside of transaction
When there are many tags in a container repository, deleting them
can exceed the default 60 second idle-in-transaction timeout in
Sidekiq. We now explicitly delete them in the DestroyService
before destroying the model.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51380
2018-09-19 05:03:18 -07:00
Stan Hu
5830d1143d Delete a container registry asynchronously
When a container registry has many tags, it's easy for the DELETE call to take more
than 60 seconds and fail. This can also leave the registry in a bad state with
null bytes since some of the images have been deleted with tags still pointing to them.
In addition, we have to prevent users from accidentally initiating the delete multiple
times or this could leave the registry with orphaned tags.

This commit also adds a flash message to notify the user the registry is scheduled
for deletion.

Closes #49926, #51063
2018-09-07 12:42:59 -07:00