Update ImportExportUploader cache & work dirs
What does this MR do?
This MR updates cache_dir
& work_dir
as per request in #205717 (closed) for Project Export to not write anything to gitlab-rails/uploads
and write to shared/tmp
instead.
Project export was writing to gitlab-rails/uploads
due to it inheriting cache_dir
and work_dir
paths from GitlabUploader
https://gitlab.com/gitlab-org/gitlab/blob/master/app/uploaders/gitlab_uploader.rb#L56-62
Dir activity during project export with these changes:
gitlab/shared/tmp/gitlab_exports/@hashed/e0/85/e0850a775c17a87060c0cf6efad1020e0cbef5a44ba942bef6add5776598de53/b0878e051e10e4060be19485028c97bb/f7b6ccf6daf9edc2d5120d20cff5c125/snippets
gitlab/shared/tmp/gitlab_exports/@hashed/e0/85/e0850a775c17a87060c0cf6efad1020e0cbef5a44ba942bef6add5776598de53/b0878e051e10e4060be19485028c97bb/f7b6ccf6daf9edc2d5120d20cff5c125/GITLAB_VERSION
gitlab/shared/tmp/gitlab_exports/@hashed/e0/85/e0850a775c17a87060c0cf6efad1020e0cbef5a44ba942bef6add5776598de53/b0878e051e10e4060be19485028c97bb/f7b6ccf6daf9edc2d5120d20cff5c125/project.json
gitlab/shared/tmp/gitlab_exports/@hashed/e0/85/e0850a775c17a87060c0cf6efad1020e0cbef5a44ba942bef6add5776598de53/b0878e051e10e4060be19485028c97bb/f7b6ccf6daf9edc2d5120d20cff5c125/lfs-objects.json
gitlab/shared/tmp/gitlab_exports/@hashed/e0/85/e0850a775c17a87060c0cf6efad1020e0cbef5a44ba942bef6add5776598de53/b0878e051e10e4060be19485028c97bb/f7b6ccf6daf9edc2d5120d20cff5c125/VERSION
gitlab/shared/tmp/gitlab_exports/@hashed/e0/85/e0850a775c17a87060c0cf6efad1020e0cbef5a44ba942bef6add5776598de53/b0878e051e10e4060be19485028c97bb/f7b6ccf6daf9edc2d5120d20cff5c125/project.bundle
gitlab/shared/tmp/gitlab_exports/@hashed/e0/85/e0850a775c17a87060c0cf6efad1020e0cbef5a44ba942bef6add5776598de53/b0878e051e10e4060be19485028c97bb/f7b6ccf6daf9edc2d5120d20cff5c125/GITLAB_REVISION
gitlab/shared/tmp/gitlab_exports/@hashed/e0/85/e0850a775c17a87060c0cf6efad1020e0cbef5a44ba942bef6add5776598de53/b0878e051e10e4060be19485028c97bb/f7b6ccf6daf9edc2d5120d20cff5c125
gitlab/shared/tmp/work/gitlab_exports/1586198503-44098-0002-9730/2020-04-06_19-41-444_root_asfdasdfsadfsadfsadfsadf_export.tar.gz
gitlab/shared/tmp/work/gitlab_exports/1586198503-44098-0002-9730
gitlab/shared/tmp/cache/gitlab_exports/1586198503-44098-0002-9730/2020-04-06_19-41-444_root_asfdasdfsadfsadfsadfsadf_export.tar.gz
gitlab/public/uploads/-/system/import_export_upload/export_file/235/2020-04-06_19-41-444_root_asfdasdfsadfsadfsadfsadf_export.tar.gz
gitlab/shared/tmp/cache/gitlab_exports/1586198503-44098-0002-9730
gitlab/public/uploads/-/system/import_export_upload/export_file/235/2020-04-06_19-41-637_root_asfdasdfsadfsadfsadfsadf_export.tar.gz
gitlab/shared/tmp/gitlab_exports/@hashed/e0/85/e0850a775c17a87060c0cf6efad1020e0cbef5a44ba942bef6add5776598de53/b0878e051e10e4060be19485028c97bb/2020-04-06_19-41-444_root_asfdasdfsadfsadfsadfsadf_export.tar.gz
gitlab/shared/tmp/gitlab_exports/@hashed/e0/85/e0850a775c17a87060c0cf6efad1020e0cbef5a44ba942bef6add5776598de53/b0878e051e10e4060be19485028c97bb
gitlab/shared/tmp/gitlab_exports/@hashed/e0/85/e0850a775c17a87060c0cf6efad1020e0cbef5a44ba942bef6add5776598de53/locks/0a2835a54a5d792a6e49b495f570c771
There is occurrence of gitlab/public/uploads/-/system
since that's what Gitlab.config.uploads['base_dir']
returns and object storage is disabled locally. So that is ok for it to be there. But any mentions of tmp/work
and tmp/cache
have correct path.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team