Open yeya24 opened 3 weeks ago
@yeya24
In my local test,
query: bottomk by (job) (pi(), days_in_month(-{__name__="test_series_a"} offset 1m17s))
: fail
query: topk by (job) (pi(), days_in_month(-{__name__="test_series_a"} offset 1m17s))
: fail (topk
case)
query: bottomk by (job) (pi(), -{__name__=\"test_series_a\"} offset 1m17s)
: ok (not include days_in_month
)
The result series values of days_in_month(-{__name__="test_series_a"} offset 1m17s)
are all of the same (31).
From my understanding, the bottomk
and topk
seem non-deterministic when the target input samples (2nd argument) values are the same.
Describe the bug TestPrometheusCompatibilityQueryFuzz test failed.
See https://github.com/cortexproject/cortex/actions/runs/11732101325/job/32683790091?pr=6311#step:10:409
More Context
It might be related to https://github.com/prometheus/prometheus/pull/14083 as Prometheus starts to always sort matrix response by labels.