The `direct_upload` causes old objects to be not accessible
Problem
It seems that a number of old objects do not have file_store column set (it is null).
This cases the direct_upload to affect the existing objects which do not have that explicitly stored: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18156
The direct_upload worked fine before %10.7. The %10.7 contains extra direct_upload options.
Resolution
We should choose one of the options:
- Migrate all
nullsto have explicit values: in that case to be1: this should affect the following columns:ci_builds.artifacts_file_store,ci_builds.artifacts_metadata_store,lfs_objects.file_store,uploads.store. - Make it behave differently in the code, set it in the model instead of
uploaderon object creation.
Workaround
As a workaround, we should now disable direct_upload for any object that we use until we merge fix.
Impact
- Old LFS objects are not accessible,
- All new objects have the store specification set: so work properly,
- No data is affected,
- It resolves the issue https://gitlab.com/gitlab-com/support-forum/issues/3261.
Edited by Kamil Trzciński