Job artifact sizes not logged in GET /api/:version/jobs/:id/artifacts endpoint
@grzesiek discovered that that json.meta.artifact_size is not being logged in https://log.gprd.gitlab.net/goto/f4275cd0-0ea0-11ed-b86b-d963a1a6788e.
The artifact is being instrumented in https://gitlab.com/gitlab-org/gitlab/-/blob/41efa3eba31bcdcab59961cf5a76a3293d258852/lib/api/helpers.rb#L587-595, but the logs are not rendering this.
It seems the problem may be that JobArtifactUploader may be assigned instead of Ci::JobArtifact (https://gitlab.com/gitlab-org/gitlab/-/blob/7dfbe472015ab104827c636387fc251313a6af61/lib/gitlab/application_context.rb#L38), so the LazyAttributes in https://gitlab.com/gitlab-org/gitlab/-/blob/72e0329c8d86e804f9ea152b590a73ce591a003e/lib/gitlab/utils/lazy_attributes.rb#L30 may be nulling this out.
Edited by Stan Hu