New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix regression: Returning "null" for empty matrix results in some cases. #13993
Conversation
c4a5e4e
to
1943b89
Compare
Signed-off-by: alanprot <alanprot@gmail.com>
1943b89
to
b1979db
Compare
I assume you mean we are now returning null on the serialized response? |
👋 Is this something we want to include in the 2.52 release? If yes, could you change the base branch to 'release-0.52'? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks sensible to me at least, but maybe we should get @bboreham's input also?
I don’t think this change was included in the release .. I may be wrong .
Yeah… I will update the description :) |
Isn't Bryan's commit part of the release-2.52 branch? @ArthurSens WDYT? |
Wow nice git-fu there @ArthurSens, I didn't know it. |
I discovered this 5mins ago after asking google 😝 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for finding this and submitting a fix.
I have no complaints about the code, but I think it should be commented to note that it does this specific thing in order to avoid null
in JSON. Also the test should note that client libraries cannot parse null
in the response. Otherwise some future change will recreate the problem and not have the context.
ref #13744 |
I have proposed an alternative fix in #13997, which I think is a more general approach. |
Np... Should i close this one? |
Closing this in favor of #13997 |
Seems like 2f03acb introduced a regression where we before returned
[]
form empty results and we are returningnull
on the serialized response:To reproduce we can run a simple range query with bottomK and a metric that does no exists (ex:
bottomk(2, doNotExists)
:Before:
After the change:
This is problematic as the prometheus client cannot deserialize this result (screenshot attached). we found the issue when updating prometheus on cortex and the fuzzy tests started to fail.
https://github.com/cortexproject/cortex/actions/runs/8826947786/job/24233899882
Im not sure if this is the right fix but im creating the issue anyway to highlight the issue.
cc @bboreham