Skip to content

Hide task request body by default

What does this MR do and why?

I've realized that TaskRequest logging message is going to expose credentials when we start using tasks API (!143 (merged) and gitlab!145796 (merged))

This MR hides it unless the DEBUG env variable is set.

How to set up and validate locally

  1. Ensure that you have GDK_DIR set up (https://gitlab.com/gitlab-org/gitlab-zoekt-indexer#running-indexer-in-gdk-mode)
  2. Execute make gdk
  3. Ensure that you see the response body. For example, 2024/02/28 17:26:07 [DEBUG] TaskRequest [200] Body: {"id":21}
  4. Execute export DEBUG=true and run make gdk again
  5. This time you shouldn't see the response body 2024/02/28 17:29:20 [INFO] TaskRequest [200]

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

Edited by Dmitry Gruzd

Merge request reports

Loading