Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Multiple queries override preview windows #29

Open
davkal opened this issue Feb 26, 2019 · 3 comments
Open

Multiple queries override preview windows #29

davkal opened this issue Feb 26, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@davkal
Copy link
Collaborator

davkal commented Feb 26, 2019

  1. Edit a Flux panel
  2. Add a second query
  3. Run queries

Result: response preview panels override each other's values.

@andig
Copy link

andig commented Aug 10, 2019

I can confirm this.

@briangann briangann added the bug Something isn't working label Oct 4, 2019
@srclosson srclosson removed their assignment Jan 14, 2020
@amotl
Copy link

amotl commented Jan 29, 2020

Hi there,

I've tried to look into the things arriving within the onResponseReceived callback coming from hooking into ds-request-response and would like to report about my findings.

While I thought I might be able to deduce the position of the metrics query (A, B, ...) through looking at things like

const refId = this.$scope.ctrl.target.refId;
console.log('result:', {refId: refId, response: response, scope: this.$scope});
this.dataPreview = response.data;

it turns out it's not possible.

In fact, it looks like onResponseReceived is invoked four(!) times while I've expected just two invocations.

image

When investigating these objects, I found that the response data from refId: A vs. refId: B, it looks like they are not correlated to the metric queries A vs. B at all.

So, the behavior of populating this.dataPreview is not deterministic at all. The last response will be used, no matter what.

Hope this helps.

With kind regards,
Andreas.

@amotl
Copy link

amotl commented Feb 10, 2020

Unsure, but grafana/grafana#20555 might be related to this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants