ruler: add more details to failures for TestRulerEvaluationDelay #7217
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #4857
This test is flaky and it's always flaky with the same failure - the first sample's value is 4 instead of 2 here:
mimir/integration/ruler_test.go
Line 314 in 9313dfc
My hypothesis is that when
now.Add(-evaluationDelay)
is done the time range[now.Add(-evaluationDelay), now]
may becomes so very slightly smaller thanevaluationDelay
(5m
) when taken with the1s
step. This results in sending a query which doesn't quite include the5m
of samples, but4.99999(9)m
of samples, which excludes the first sample with value2
and returns4
instead.I couldn't get the test to fail locally, so I'm changing the assertion type to not abort the test on the first mismatch so that we can investigate the all returned samples. Also some debug logs to verify this hypothesis with the step alignment.