Use arrays in Ci::Pipeline#latest_builds_with_artifacts
What does this MR do?
Ci::Pipeline#latest_builds_with_artifacts so it returns an Array instead of a relation, reducing the number of queries necessary to render the button for downloading CI artifacts. See the commit message for more details.
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Tests added for this feature/bug
- Has been reviewed by Backend
- Has been reviewed by Database
- Conform by the merge request performance guides
- Conform by the style guides
- Squashed related commits together
- Internationalization required/considered