grafana / timestream-datasource

Amazon Timestream in Grafana
https://grafana.com/grafana/plugins/grafana-timestream-datasource
Apache License 2.0
24 stars 19 forks source link

Unable to create Query type Variable #35

Closed phanect closed 3 years ago

phanect commented 3 years ago

I tried to create a Query type Variable, but I failed to create and the error message is shown as following screen shot.

In the console of the Chrome DevTools, following error message is shown:

TypeError: Cannot read property '__interval_ms' of undefined
    at t.applyTemplateVariables (/public/plugins/grafana-timestream-datasource/module.js:2)
    at app.8aa1bea5238f34f995d5.js:2
    at Array.map (<anonymous>)
    at t.value (app.8aa1bea5238f34f995d5.js:2)
    at Object.query (/public/plugins/grafana-timestream-datasource/module.js:2)
    at eval [as _subscribe] (/public/plugins/grafana-timestream-datasource/module.js:2)
    at e._trySubscribe (vendors~app.8aa1bea5238f34f995d5.js:2)
    at e.subscribe (vendors~app.8aa1bea5238f34f995d5.js:2)
    at e.call (/public/plugins/grafana-timestream-datasource/module.js:2)
    at e.subscribe (vendors~app.8aa1bea5238f34f995d5.js:2)

I didn't experience this issue on the Timestream plugin 1.1.0. This issue happens after I updated the Timestream plugin to 1.1.1. I guess #31 might cause this issue.

My environment:

johnmousa commented 3 years ago

I encountered the same issue, can confirm it does not exist in version 1.0.0 of the plugin Variable query: SELECT distinct $__measure FROM $__database.$__table

ryantxu commented 3 years ago

@phanect @johnmousa -- we merged a change that should fix your issue (although I could not reproduce), here is the dev artifacts you could test:

https://app.circleci.com/pipelines/github/grafana/timestream-datasource/146/workflows/0cadc388-dad9-4db5-8618-3f1befe2a12f/jobs/531/artifacts

Please re-open if the above artifacts do not resolve your issues

phanect commented 3 years ago

@ryantxu Thank you for fixing this issue. Unfortunately, I cannot test the plugin until it is released since I use Grafana Cloud, so I will test after new version is released.

phanect commented 3 years ago

@ryantxu I have confirmed this bug has been fixed on my end. Thank you.