Skip to content

Display CI status on group details page

What does this MR do and why?

Reinstated the CI checkmark on the group details page.

Resolves the issue #20450

Screenshots or screen recordings

Screenshot_2022-08-23_at_10.50.18_PM

Query Generated (for database review)

SELECT
  COUNT("latest_ci_pipelines".*)
FROM (
  VALUES (278964),
    (443787),
    (250833)) project_ids (id)
  CROSS JOIN LATERAL (
    SELECT
      "ci_pipelines".*
    FROM
      "ci_pipelines"
    WHERE
      "ci_pipelines"."project_id" = "project_ids"."id"
      AND ("ci_pipelines"."source" IN (1, 2, 3, 4, 5, 6, 7, 8, 10, 11)
          OR "ci_pipelines"."source" IS NULL)
    ORDER BY
      "ci_pipelines"."project_id" ASC,
      "ci_pipelines"."id" DESC
    LIMIT 1) AS latest_ci_pipelines

Query Analyses: https://console.postgres.ai/gitlab/gitlab-production-ci/sessions/18058/commands/59914

Note: Discussions on query iterations can be found here.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #20450

Edited by Prabakaran Murugesan

Merge request reports