Skip to content

Run praefect tasks only when enabled

Gabriel Mazetto requested to merge brodock/praefect-only-when-enabled into main

What does this merge request do and why?

This ensure Makefile based tasks for praefect execute only when it is enabled.

Whenever praefect is disabled, it shouldn't try to seed its database nor run migrations against it.

How to set up and validate locally

A new GDK instance with the following configuration:

praefect:
  enabled: false

should not fail to bootstrap, nor should it give you any error when running gitaly-update.

Example of an error when praefect tries to seed data even though it is disabled:

make: *** [support/makefiles/Makefile.postgresql.mk:24: _postgresql-seed-praefect] Error 1

Related to #1952 (closed)

(you may need to run gdk reconfigure first, or trigger a rake gdk-config.mk to update the Makefile exposed configurations)

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Gabriel Mazetto

Merge request reports