Alerting: Do not persist noop transition from Normal state. (#61201)

* add feature flag `alertingNoNormalState`
* update instance database to support exclusion of state in list operation
* do not save normal state and delete transitions to normal
* update get methods to filter out normal state
This commit is contained in:
Yuri Tseretyan
2023-01-13 18:29:29 -05:00
committed by GitHub
parent 12d27edb52
commit 9d57b1c72e
14 changed files with 209 additions and 57 deletions
+2 -4
View File
@@ -50,10 +50,8 @@ func (i InstanceStateType) IsValid() bool {
// ListAlertInstancesQuery is the query list alert Instances.
type ListAlertInstancesQuery struct {
RuleOrgID int64 `json:"-"`
RuleUID string
State InstanceStateType
StateReason string
RuleUID string
RuleOrgID int64 `json:"-"`
Result []*AlertInstance
}