Skip to content

Add /debug/ls endpoint

Dmitry Gruzd requested to merge add-debug-ls into main

What does this MR do and why?

During gitlab-com/gl-infra/production#18383 (closed) we needed help from an SRE. With this endpoint, we could've self-served it.

The new endpoint lists all the files in the index directory with their sizes. For example:

❯ curl -s "http://localhost:6080/indexer/debug/ls" | jq .
[
  {
    "path": "/Users/dgruzd/gitlab-development-kit/zoekt-data/development/index/7_v16.00000.zoekt",
    "size": 582790
  },
  {
    "path": "/Users/dgruzd/gitlab-development-kit/zoekt-data/development/index/node.uuid",
    "size": 36
  }
]

gitlab#478737 (closed)

How to set up and validate locally

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

Edited by Dmitry Gruzd

Merge request reports