Skip to content

Resolve "Firing prometheus alerts configured by gitlab are not found by environment"

Sean Arnold requested to merge 204908-ensure-correct-prometheus-alert-found into master

What does this MR do?

This prevents the bug raised in the issue #204908 (closed) where we could select the incorrect PrometheusAlert (and by association Environment) as a result of parsing a Prometheus alert payload.

This was caused by the existing gitlab_alert_id erroneously providing a PrometheusMetric ID which can be associated to many environments.

We solve this in two ways:

  • Add a new field gitlab_prometheus_alert_id that we use to expose the PrometheusAlert id
  • If we can't determine which alert to use, we do not associate the PrometheusAlert.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Closes #204908 (closed)

Edited by Sean Arnold

Merge request reports