Resolve "Firing prometheus alerts configured by gitlab are not found by environment"
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 thePrometheusAlert
id - If we can't determine which alert to use, we do not associate the PrometheusAlert.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Closes #204908 (closed)
Edited by Sean Arnold