Skip to content

N+1 (cached) issue in merge request cached_widget.json

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

<project path>/-/merge_requests/:id/cached_widget.json endpoint is periodically polled by FE for changes in MR.

We could preload artifact projects - in MergeRequests::PipelineEntity we iterate through all artifacts and call BuildArtifactEntity which uses job.project (we already preload job.artifact) - although currently this SQL query is "cached" (as it's same proejct for all artifacts), it would be better to preload artifact projects.

Edited by 🤖 GitLab Bot 🤖