Fill `size` values of `ci_job_artifacts` table from object storage
Description
From GitLab %11.3, we migrated legacy artifacts from ci_builds
to ci_job_artfacts
. Legacy artifact rows have values in size
column, whereas legacy artifact metadata rows do not have the values, because it didn't exist in ci_builds
. We should calculate the size and fill it into the legacy artifact metadata rows.
Solution
All artifact files on gitlab.com are stored in object storage, so we need to execute HEAD
command to get the Content-length
of the file. This is cheap that it doesn't actually pull the whole data.
Related
Edited by Shinya Maeda