Alerting: Don't record annotations for mapped NoData transitions, when NoData is mapped to OK (#77164)

* Exclude mapped nodata transitions when nodata mapped to OK

* Fix processEvalResults test

* Don't check NoDataState when filtering transition

* Add comment to explain purpose of separate function

---------

Co-authored-by: William Wernert <william.wernert@grafana.com>
This commit is contained in:
Alexander Weaver
2023-12-18 15:59:32 -06:00
committed by GitHub
parent 3fc7aa97d6
commit 65ecde6eed
4 changed files with 72 additions and 2 deletions

View File

@@ -852,7 +852,7 @@ func TestProcessEvalResults(t *testing.T) {
newResult(eval.WithState(eval.NoData), eval.WithLabels(labels1)), // TODO fix it because NoData does not have same labels
},
},
expectedAnnotations: 1,
expectedAnnotations: 0,
expectedStates: []*state.State{
{
Labels: labels["system + rule + labels1"],