Skip to content

Include ProjectNamespace in VSA stage loader logic

Adam Hegyi requested to merge 382495-update-vsa-stage-loader-logic into master

What does this MR do and why?

This MR updates the DistinctStageLoader query to also include the Namespaces::ProjectNamespace based value stream stages into the background aggregation.

A Stage object can be associated with a Group or Namespaces::ProjectNamespace. The previous implementation only took the Group based stages into account when collecting the records for aggregation.

This change queries the whole group hierarchy including the Namespace::ProjectNamespace rows.

Database

The lookup query is here: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/15003/commands/52182

The performance is similar to the projects lookup within the group hierarchy (namespace.all_projects).

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 #382495 (closed)

Edited by Adam Hegyi

Merge request reports

Loading