Skip to content

Fix errors creating project with active Prometheus service template

Stan Hu requested to merge sh-fix-create-projects-with-prometheus-service into master

If the Prometheus service template were active, the service would be inserted into the database during project creation. Later, the call to Projects::CreateService#after_create_actions might attempt to NULL out the service if the project didn't have any clusters that needed the service, but this would fail with a foreign key violation since this is enforced by the database constraint.

To fix this, we just assume if the template is present that it should be there and skip the whole active check.

Closes #212419 (closed)

Edited by Yorick Peterse

Merge request reports