gitlab-org--gitlab-foss/spec
Jan Provaznik 7da3b2cdd0 Delete remote uploads
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
2018-05-16 08:58:07 +02:00
..
bin
config
controllers Fix cross-origin errors when attempting to download JavaScript attachments 2018-05-13 21:49:51 -07:00
db/production Enable prometheus metrics by default 2018-05-07 08:46:23 +00:00
factories Backport cluster factory changes from EE 2018-05-13 12:36:51 +02:00
features Merge branch '45584-add-nip-io-domain-suggestion-in-auto-devops' into 'master' 2018-05-15 16:33:06 +00:00
finders show only groups an admin is a member of in dashboards/grops 2018-05-01 09:24:21 +00:00
fixtures Merge branch '43557-osw-present-merge-sha-commit' into 'master' 2018-05-07 22:17:55 +00:00
helpers Adjust spec to build correct path when storage path ends in slash 2018-05-09 12:56:03 +02:00
initializers Remove method call to deprecated method 2018-05-11 08:57:06 +02:00
javascripts Merge branch '45462-sha-object' into 'master' 2018-05-14 09:54:28 +00:00
lib Merge branch 'zj-ref-contains-sha-mandatory' into 'master' 2018-05-16 03:44:08 +00:00
mailers Backport 5480-epic-notifications from EE 2018-05-07 12:58:47 -06:00
migrations Add a unique and not null constraint on the project_features.project_id column 2018-05-15 14:20:14 +02:00
models Delete remote uploads 2018-05-16 08:58:07 +02:00
policies Enable update_(build|pipeline) for maintainers 2018-05-15 08:18:22 +00:00
presenters Only show push-to-master authorized users 2018-04-24 13:59:41 +02:00
requests Merge branch 'feature/add-open-id-discovery-tests' into 'master' 2018-05-15 15:58:13 +00:00
routing Add new repository archive route 2018-04-06 08:45:17 -04:00
rubocop/cop Revert the addition of goldiloader 2018-04-18 15:51:39 +02:00
serializers Enable update_(build|pipeline) for maintainers 2018-05-15 08:18:22 +00:00
services Merge branch 'ce-5968-extract-ee-specific-files-lines-for-clusters-related-files' into 'master' 2018-05-15 08:59:09 +00:00
sidekiq/cron
support Delete remote uploads 2018-05-16 08:58:07 +02:00
tasks Gitlab::Shell works on shard name, not path 2018-04-25 13:36:22 +02:00
unicorn
uploaders apply feedback 2018-05-09 19:57:08 +00:00
validators
views Backports every CE related change from ee-44542 to CE 2018-05-04 17:33:26 +02:00
workers Merge branch '42099-port-push-mirroring-to-ce-ce-port-v-2' into 'master' 2018-05-07 15:15:57 +00:00
factories_spec.rb
fast_spec_helper.rb Improve fast specs helper to autoload the library 2018-05-11 13:33:10 +02:00
rails_helper.rb
rake_helper.rb
simplecov_env.rb
spec_helper.rb Support resetting of Prometheus metrics between test runs 2018-05-09 14:33:42 -07:00