Skip to content

Preload runner manager in :id/pipelines/:pipeline_id/jobs

Pedro Pombeiro requested to merge pedropombeiro/415444/fix-n+1-flaky-test into master

What does this MR do and why?

This MR preloads :runner_manager for ci_builds in the :id/pipelines/:pipeline_id/jobs endpoint, to fix an N+1 test that was not detected when the !151679 (merged) Community contribution was merged.

Basically, the original MR added runner_manager to the Job entity, which caused one more table join. However, the full pipeline run didn't detect this failure and the MR was merged, causing gitlab-org/quality/engineering-productivity/master-broken-incidents#6277 (closed).

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

n/a

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

n/a

Edited by Pedro Pombeiro

Merge request reports