7da3b2cdd0
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 |
||
---|---|---|
.. | ||
api | ||
banzai | ||
chunked_io | ||
controllers | ||
cycle_analytics_helpers | ||
features | ||
gitlab-git-test.git | ||
gitlab_stubs | ||
google_api | ||
helpers | ||
http_io | ||
import_export | ||
matchers | ||
migrations_helpers | ||
prometheus | ||
protected_tags | ||
redis | ||
services | ||
shared_contexts | ||
shared_examples | ||
batch_loader.rb | ||
capybara.rb | ||
carrierwave.rb | ||
commit_trailers_spec_helper.rb | ||
db_cleaner.rb | ||
forgery_protection.rb | ||
generate-seed-repo-rb | ||
gitaly.rb | ||
issuables_requiring_filter_shared_examples.rb | ||
json_response.rb | ||
omni_auth.rb | ||
prepare-gitlab-git-test-for-commit | ||
rspec.rb | ||
seed.rb | ||
setup_builds_storage.rb | ||
sidekiq.rb | ||
stored_repositories.rb | ||
unpack-gitlab-git-test | ||
webmock.rb |