grafana/pkg/tests/api/alerting
Yuri Tseretyan f6a46744a6
Alerting: Support hysteresis command expression (#75189)
Backend: 

* Update the Grafana Alerting engine to provide feedback to HysteresisCommand. The feedback information is stored in state.Manager as a fingerprint of each state. The fingerprint is persisted to the database. Only fingerprints that belong to Pending and Alerting states are considered as "loaded" and provided back to the command.
   - add ResultFingerprint to state.State. It's different from other fingerprints we store in the state because it is calculated from the result labels.
  -  add rule_fingerprint column to alert_instance
   - update alerting evaluator to accept AlertingResultsReader via context, and update scheduler to provide it.
   - add AlertingResultsFromRuleState that implements the new interface in eval package
   - update getExprRequest to patch the hysteresis command.

* Only one "Recovery Threshold" query is allowed to be used in the alert rule and it must be the Condition.


Frontend:

* Add hysteresis option to Threshold in UI. It's called "Recovery Threshold"
* Add test for getUnloadEvaluatorTypeFromCondition
* Hide hysteresis in panel expressions

* Refactor isInvalid and add test for it
* Remove unnecesary React.memo
* Add tests for updateEvaluatorConditions

---------

Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
2024-01-04 11:47:13 -05:00
..
test-data Alerting: Support hysteresis command expression (#75189) 2024-01-04 11:47:13 -05:00
api_admin_configuration_test.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
api_alertmanager_configuration_test.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
api_alertmanager_test.go Alerting: Drop NamespaceID from responses on unstable ngalert API endpoints in favor of NamespaceUID (#79359) 2023-12-15 11:06:53 -06:00
api_available_channel_test.go Chore: All tests under pkg/tests should be integration tests (#59521) 2022-12-09 08:11:56 +01:00
api_backtesting_data.json Expressions: Fixes the issue showing expressions editor (#62510) 2023-01-31 18:50:10 +01:00
api_backtesting_test.go Alerting: Fix fine-grained rule access control to use 403 for authorization error (#79239) 2023-12-07 13:43:58 -05:00
api_notification_channel_test.go Update grafana/alerting to 0025eb4 (#73808) 2023-08-25 15:20:17 +03:00
api_prometheus_test.go Alerting: Add UID of rules to response that were affected by update group request (#75985) 2023-10-07 01:11:24 +03:00
api_provisioning_test.go Alerting: Add integration tests for mute timings provisioning API (#79810) 2023-12-21 21:38:38 +02:00
api_ruler_test.go Alerting: Support hysteresis command expression (#75189) 2024-01-04 11:47:13 -05:00
api_testing_test.go RBAC: Split non-empty scopes into kind, attribute and identifier fields for better search performance (#71933) 2023-07-21 15:23:01 +01:00
testing.go Alerting: Support hysteresis command expression (#75189) 2024-01-04 11:47:13 -05:00