Skip to content

Draft: Automatically create zoekt_indexed_namespace records

What does this MR do and why?

Creates a new task create_zoekt_indexed_namespace which can be used by the self managed customers to index all repositories for zoekt. This task will not run on gitlab.com. If the application setting zoekt_index_all_namespaces is enabled, it will create the zoekt_enabled_namespace records for each top level groups which don't have already zoekt_enabled_namespace

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.

Before After

How to set up and validate locally

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

Query plan

SELECT
    "namespaces"."id"
FROM
    "namespaces"
    LEFT OUTER JOIN "zoekt_enabled_namespaces" "zoekt_enabled_namespace" ON "zoekt_enabled_namespace"."root_namespace_id" = "namespaces"."id"
WHERE
    "namespaces"."type" = 'Group'
    AND "namespaces"."parent_id" IS NULL
    AND "zoekt_enabled_namespace"."root_namespace_id" IS NULL
LIMIT 1000

https://console.postgres.ai/shared/00eaba4f-5367-4fd5-bbee-789af7c0a36d

Related to #455533

https://gitlab.com/gitlab-org/gitlab/-/work_items/463796

Edited by Ravi Kumar

Merge request reports