Draft: POC - extend zoekt with knowledge graph

What does this MR do and why?

POC which adds knowledge graph models for deploying knowledge graph service on zoekt nodes.

Related to #534843 (closed) and gitlab-com/content-sites/handbook!13104 (merged)

The scope of this POC is limited to to just defining models necessary for knowledge graph and creating a service which schedules indexing of a graph DB on repository replicas.

Complementary zoekt-indexer MR is needed for trying this POC - gitlab-zoekt-indexer!472 (closed)

The schema of models looks like this:


classDiagram
    namespace ZoektModels {
    class Node
    class Index
    class Repository
    class Task
    class EnabledNamespace
    class Replica
    }
    namespace KnowledgeGraphModels {
    class KnowledgeGraphEnabledRepository
    class KnowledgeGraphReplica
    class KnowledgeGraphTask
    }

    Node "1" --> "*" Task : has_many tasks
    Node "1" --> "*" Index : has_many indices

    EnabledNamespace "1" --> "*" Replica : has_many replicas

    Replica "1" --> "*" Index : has_many indices

    Index "1" --> "*" Repository : has_many repositories
    Repository "1" --> "*" Task : has_many tasks

    Node "1" --> "*" KnowledgeGraphTask : has_many graph tasks
    KnowledgeGraphEnabledRepository "1" --> "*" KnowledgeGraphReplica : has_many replicas
    KnowledgeGraphReplica "1" --> "*" KnowledgeGraphTask : has_many tasks
    Node "1" --> "*" KnowledgeGraphReplica : has_many graph replicas

This allows keeping Zoekt and Knowledge graph models separate, except re-use of Zoekt node.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

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

Edited by Jan Provaznik

Merge request reports

Loading