• Stan Hu's avatar
    Fix errors creating project with active Prometheus service template · d615759b
    Stan Hu authored
    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
    d615759b
sh-fix-create-projects-with-prometheus-service.yml 120 Bytes