-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Timeseries to table transformation: Update Output Changes #77415
Conversation
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.
Would be good to restore the unit tests changed in #76801
and add additional tests for the new scenarios/cases added in that PR
I do agree that the transform could be improved for queries that return multiple series with same labels (or no labels) but different display names (For value field), the old behavior there was too limited to only look at labels and not also take into account display name for the value field (or frame name).
I put the original tests back in with very slight updates to some of the tests, in particular the order of frames is coming out differently than originally. I don't believe this has an impact beyond the indexes for referencing the results. @domasx2 I did have a question about this test. I'm a bit surprised this is expecting two frames. Seems like it should be one frame since incoming frames are mapped onto fields instead. Feel like I'm missing something here? |
It maps each |
Thanks for the feedback @domasx2. Working through that now |
Worked out the tests and I believe that this should be good to go now Oops: realized I forgot about the time field selection. Looking at that right now |
Hey @codeincarnate ! I don't have the context for reviewing the code but I would like to mention that I did test out your branch w/ the app observability plugin and it seems that the fix is working fine for our cases. |
please merge ASAP, it's currently broken for customers |
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.
LGTM
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.
Tested this out, and it seem to work as expected.
@torkelo would you like to add anything to this or are we good to merge? |
* Break out labels into separate fields * More Updates * Minor test changes * Use 'A' for transformed refId * Make sure tests pass * Add additional test * Prettier * Remove dead comment * Update time field selection options * remove console.log --------- Co-authored-by: Victor Marin <victor.marin@grafana.com>
What is this feature?
When addressing issues with the Time Series to table transformation we accidentally broke backwards compatibility. This PR attempts to address that while still fixing the underlying issue. Namely that multiple series being returned from a single query were not being handled correctly.
This can be seen with the React Table gdev-dashboard which previously would only show one row, even though it should be showing 3 as each query has 3 series returned.
This also returns the functionality of breaking out labels into individual fields.
Why do we need this feature?
To preserve backwards compatability of this transform while still working for cases with multiple series.
Please check that: