Skip to content

search: add mermaid printer for search job

Administrator requested to merge rvt/mermaid-printer into main

Created by: rvantonder

Figured I'd support mermaid while I was at it. I prefer DOT for configuring layouts, and will add that later. The fun thing about mermaid is that it renders natively in GH issues/PRs: https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/

The plan is also to expose much more info about the query internals (e.g., which backends we hit, various filters, etc.), right now this is just the job nodes without their internal state. I will probably work on exposing internal state tomorrow.

flowchart TB
0([FILTER])
  0---1
  1[SubRepoPermissions]
  0---2
  2([LIMIT])
    2---3
    3[100]
    2---4
    4([TIMEOUT])
      4---5
      5[50ms]
      4---6
      6([PARALLEL])
        6---7
        7([PRIORITY])
          7---8
          8([REQUIRED])
          8---9
          9([AND])
            9---10
            10([NoopJob])
            9---11
            11([NoopJob])
            7---12
          12([OPTIONAL])
          12---13
          13([OR])
            13---14
            14([NoopJob])
            13---15
            15([NoopJob])
            6---16
        16([AND])
          16---17
          17([NoopJob])
          16---18
          18([NoopJob])

Test plan

Unit tests

Merge request reports

Loading