Fix errors creating project with active Prometheus service template
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 https://gitlab.com/gitlab-org/gitlab/-/issues/212419
Showing
Please register or sign in to comment