mtanda / grafana-sumologic-datasource

Apache License 2.0
10 stars 4 forks source link

Not working in Grafana 7.x #36

Closed michaelfward closed 4 years ago

michaelfward commented 4 years ago

Hi,

I am seeing 202 when creating the job, and then a DELETE request without ever getting any data.

Screen Shot 2020-06-30 at 12 26 11 PM Screen Shot 2020-06-30 at 12 28 19 PM

I'm using grafana-server v7.0.5

mtanda commented 4 years ago

Seems to work in my env. I did test by querying _index=sumologic_volume . Would you provide more information?

michaelfward commented 4 years ago

Hi @mtanda thanks for the quick reply!

I did more investigation. When querying, the plugin does not fetch / page the results, it immediately calls the DELETE method.

These are screenshots from an affected version: Screen Shot 2020-07-01 at 10 43 35 AM Screen Shot 2020-07-01 at 10 43 33 AM

This is correct behavior (note the POST to create the job, GET to fetch results, DELETE to delete): Screen Shot 2020-07-01 at 10 48 14 AM Screen Shot 2020-07-01 at 10 48 00 AM Screen Shot 2020-07-01 at 10 47 56 AM

michaelfward commented 4 years ago

I believe this is related to https://github.com/grafana/grafana/releases/tag/v6.7.0-beta1

michaelfward commented 4 years ago

I just confirmed the change was introduced in 6.70 release of Grafan. Pulling the first image before 6.6.2 does not have the issue.

mtanda commented 4 years ago

Thanks for info. I didn't check how backendSrv change affect my plugin. Need to investigate it. I can't promise but I'll take a time.

michaelfward commented 4 years ago

No problem. I haven't written Angular code in a very long time but I'm going to spend my day today trying to see if I can figure this out.

michaelfward commented 4 years ago

Interesting:

I did grafana-toolkit plugin:dev and it worked, no code change necessary.

mtanda commented 4 years ago

hmm, Prometheus datasource seems to call same API. https://github.com/grafana/grafana/blob/v7.0.5/public/app/plugins/datasource/prometheus/datasource.ts#L156

I should check rxjs too.

mtanda commented 4 years ago

I did quick investigation, and I can't find way to call digest...

mtanda commented 4 years ago

@michaelfward Did you get any error message in Dev tools?

mtanda commented 4 years ago

I use plugin with 7.0.6. It works.