Grafana fails to load query variables On Dashboard Load, resulting in an empty dropdown variable list and faulty panels

What happened?

We recently upgraded our Grafana version from v6.5.2 to v7.4.0 and it seems like the query variables are no longer resolved on dashboard loads and the preview of the values of these variables are always empty.

What was expected to happen?

The Campaign dropdown list should have not shown an empty list resulting in erroneous panels. The Campaign list should have been correctly shown by resolving the journey variable appropriately, displaying all the existing campaigns in the understudy ES index.

How to reproduce the issue (as minimally and precisely as possible) :

Our variable journey is supposed to show the list of all existing campaigns in the JourneysMapping ES index. Once the refresh setting of this variable is set to the (“on time range change”) option, everything works well and the list of Campaigns becomes available.

journeyVariable

Whereas when the refresh is set to on dashboard load, the variable doesn’t seem to load correctly and thus none of the existing campaigns appear in the list. This bug is the reason behind the erroneous panels!

journeyVariable_OnDashboardLoad

Additional information/details

The error message we are getting:

Object

data:"{ “root_cause”: [ { “type”: “parse_exception”, “reason”: "parse_exception: Encountered "" at line 1, column 15.\nWas expecting one of:\n …\n "(" …\n "*" …\n …\n …\n …\n …\n …\n "[" …\n "{" …\n …\n " },

Environment :

  • Grafana version: v7.4.0
  • User OS & Browser: Windows Chrome/Firefox/Edge