Skip to content

Resolve "Bug calculating artifacts size for project statistics"

Nick Thomas requested to merge (removed):42154-fix-artifact-size-calc into master

What does this MR do?

Fixes a bug in the artifact size calculation logic for project statistics

Are there points in the code the reviewer needs to double check?

The tests are green when the bug is present because ci_artifacts.id == projects.id. I discovered the bug while working on !16516 (merged), which happens to break this behaviour, causing the tests to fail.

I couldn't think of a natural way to exercise this failure in specs - setting the ids explicitly is artificial, as is creating a superfluous project or artifact to the same effect - so I suggest we just leave the specs untouched and rely on !16516 (merged) to prevent regressions in future.

I'm trying to keep genuine bugfixes in separate issues and MRs to that one, for better auditing.

Why was this MR needed?

Genuine bug. Needed to make https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16516 green, which is needed to make https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15681 green.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #42154 (closed)

Edited by Nick Thomas

Merge request reports