Bug calculating artifacts size for project statistics
Summary
When calculating updated project statistics, we add sum(size) where ci_artifacts.project_id = project_statistics.id
. Obviously, that last should be project_statistics.project_id
What is the current bug behavior?
Adds the size of artifacts from an essentially random project
What is the expected correct behavior?
Should add the size of the artifacts from the correct project
Possible fixes
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/models/project_statistics.rb#L40 + https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/models/ci/job_artifact.rb#L18
Edited by Nick Thomas