-
[OPIK-6620][BE] Implement support on the backend side of AND Logic Option to Alerts (#6804)
发布于
2026-05-21 14:50:05 +00:00 - [OPIK-6620][BE] Add
group_indexsupport for alert trigger configs and grouping logic
- Introduced
group_indexfield inAlertTriggerConfigmodel and database schema for AND/OR grouping of trigger configs. - Implemented
validateGroupIndicesmethod to enforce constraints ongroup_indexvalues and trigger config types. - Updated
MetricsAlertJobto handle grouped evaluation of trigger configs, including AND-group checks. - Enhanced webhook payload structure with grouped condition details and backwards compatibility for scalar fields.
- Added DAO and model-level support for reading and persisting
group_index.
- [OPIK-6620][BE] Add
group_indexcolumn toalert_trigger_configstable for trigger configuration grouping
- Introduced
group_indexas a nullable integer column to enable AND/OR grouping of trigger configurations. - Added rollback SQL to drop the
group_indexcolumn.
-
[OPIK-6620][BE] Rename migration file to properly sequence
group_indexaddition foralert_trigger_configstable -
[OPIK-6620][BE] Add tests for
group_indexvalidation and grouped trigger config behavior
- Introduced unit tests for
group_indexround-tripping, negative value validation, and scope restrictions. - Implemented grouped AND/OR evaluation tests for alert triggers, validating webhook behavior for group-based conditions.
- Enhanced utility methods to simplify grouped alert trigger configuration setup.
-
[OPIK-6620][BE] Rename migration file for correct sequencing of
group_indexchanges inalert_trigger_configstable -
[OPIK-6620][BE] Add unit tests for
MetricsAlertJobgrouped trigger behavior
- Introduced test cases for grouped AND-condition evaluation, ensuring correct webhook behavior under various conditions.
- Validated scenarios including group crossing, failure, metric absence, and payload structure accuracy.
- Enhanced test setup utilities to streamline grouped trigger configuration.
- [OPIK-6620][BE] Add comment to
group_indexmigration for clarification on grouped trigger behavior
- Included an explanation of
group_indexusage for AND/OR configuration grouping in alert triggers.
- [OPIK-6620][BE] Use
flatMapSequentialinMetricsAlertJobto ensure deterministic payload ordering
- Replaced
flatMapwithflatMapSequentialto preserve source order and ensure consistent selection of primary condition in payload scalars. - Added regression test to validate payload ordering when metric fetches complete out of order.
下载附件
- [OPIK-6620][BE] Add