Add json output to geo tools rake task cleanup_check

What does this MR do and why?

Add json output to the Geo rake task geo:tools:cleanup_check. Eases the usage of the tool output into other tools.

References

Related to https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/team/-/work_items/13577

How to set up and validate locally

On a geo secondary, running the rake tasks:

  1. Using the master branch bin/rails geo:tools:cleanup_check should present plain text output Using the MR branch:
  2. bin/rails geo:tools:cleanup_check should present plain text output with equivalent output as above.
  3. bin/rails geo:tools:cleanup_check FORMAT=json should present json output, with the same data as above
  4. bin/rails geo:tools:cleanup_check FORMAT=foo should generate an error: Unsupported format: foo

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 Ian Baum

Merge request reports

Loading
Loading