Support environment for generic alerts in new alert payload class
What does this MR do?
!38971 (merged) added new classes to manage alert payloads, but they're not 100% utilized yet. While migrating onto these new classes, subclasses in Gitlab::AlertManagement::Payload
should stay in sync with Gitlab::Alerting::Alert
, AlertManagement::AlertPresenter
, Gitlab::Alerting::NotificationPayloadParser
, AlertManagement::PrometheusAlertPresenter
, etc.
!39785 (merged) added support for looking up an environment for alerts generated through our generic alert endpoint. That update was merged just before !38971 (merged), so !38971 (merged) didn't include the changes.
This MR adds environment support for generic alerts to the new payload classes.
Refs #239029 (closed)
Screenshots
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
Edited by Peter Leitzen