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