Hi folks.
I noticed a small difference between the behaviour of OSS Prometheus and the frontend component in the query_range API:
- Given a metric
foo with label values bar="0" and bar="1"
- If I run an aggregate query on a non-existent label-value like
count(foo{bar="2"}),
- The result in OSS Prometheus is:
{"status":"success","data":{"resultType":"matrix","result":[]}}
- The result in prometheus-engine's frontend is:
{"status":"success","data":{"resultType":"matrix","result":null}}
This causes the frontend to break (query ui disappears; screen becomes empty) and causes issues for some prometheus tools like pint.
Is it possible to preserve compatibility and return an empty array in this case instead of null?
Hi folks.
I noticed a small difference between the behaviour of OSS Prometheus and the frontend component in the
query_rangeAPI:foowith label valuesbar="0"andbar="1"count(foo{bar="2"}),{"status":"success","data":{"resultType":"matrix","result":[]}}{"status":"success","data":{"resultType":"matrix","result":null}}This causes the frontend to break (query ui disappears; screen becomes empty) and causes issues for some prometheus tools like pint.
Is it possible to preserve compatibility and return an empty array in this case instead of
null?