summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/models/with_uploads_shared_examples.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@13-4-stable-eeGitLab Bot2020-09-191-5/+5
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-211-3/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-231-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-031-1/+2
|
* Add frozen_string_literal to spec/supportThong Kuah2019-07-251-0/+2
| | | | | Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
* Remove fast_destroy_uploads feature flagJan Provaznik2019-02-121-20/+0
| | | | Fast destroy of uploads was successfully enabled and test.
* Enabled feature flag for fast deletionsJan Provaznik2018-12-061-0/+20
| | | | | Fast destroy is used only if the feature flag is enabled, otherwise uploads are still deleted using carrier wave. It's disabled by default.
* Use FastDestroy for deleting uploadsJan Provaznik2018-12-061-7/+33
| | | | | | | | | | It gathers list of file paths to delete before destroying the parent object. Then after the parent_object is destroyed these paths are scheduled for deletion asynchronously. Carrierwave needed associated model for deleting upload file. To avoid this requirement, simple Fog/File layer is used directly for file deletion, this allows us to use just a simple list of paths.
* Delete remote uploadsJan Provaznik2018-05-161-0/+23
ObjectStore uploader requires presence of associated `uploads` record when deleting the upload file (through the carrierwave's after_commit hook) because we keep info whether file is LOCAL or REMOTE in `upload` object. For this reason we can not destroy uploads as "dependent: :destroy" hook because these would be deleted too soon. Instead we rely on carrierwave's hook to destroy `uploads` in after_commit hook. But in before_destroy hook we still have to delete not-mounted uploads (which don't use carrierwave's destroy hook). This has to be done in before_Destroy instead of after_commit because `FileUpload` requires existence of model's object on destroy action. This is not ideal state of things, in a next step we should investigate how to unify model dependencies so we can use same workflow for all uploads. Related to #45425