Skip to content
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

DEV-48075 - Fix missing warning from NoData in prometheus converter #86

Conversation

yasmin-tr
Copy link

@yasmin-tr yasmin-tr commented Feb 3, 2025

This fix is based on the following:
grafana#93936

It was fixed on a later version on new prometheus client, but relevant for the current one as well.

The Issue
When running queries that return no data , but has warnings attached to it, we will not see the warning.
Even though the resulsts from datasource do contain a warning:
image

We expect to see:
image
But instead not seeing any warning, only No Data.
This is confusing since you don't know if there's an actual problem with missing data or the query is too big.

Root Cause
In the prometheus converter we are adding warnings to response on the response frames.
But in case of no-data there are no frames in response, causing nothing to be added.
Screenshot 2025-02-04 at 12 30 50

Suggested Fix
Fix is pretty simple - just add the case where there are no frames in response and create a new frame for warnings and add it there.
Screenshot 2025-02-04 at 12 33 45

@yasmin-tr
Copy link
Author

run-test

@yasmin-tr yasmin-tr changed the title DEV-48075 - Fix missing warming from NoData in prometheus converter DEV-48075 - Fix missing warning from NoData in prometheus converter Feb 4, 2025
@yasmin-tr
Copy link
Author

run-test

@yasmin-tr yasmin-tr merged commit e46c826 into v10.4.x-logzio Feb 4, 2025
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant