Skip to content
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

InfluxDB: variables migration to backend #45512

Merged
merged 21 commits into from
Feb 28, 2022

Conversation

joey-grafana
Copy link
Contributor

@joey-grafana joey-grafana commented Feb 17, 2022

What this PR does / why we need it:
Part of #43076

This PR contains the changes needed to applyTemplateVariables() to InfluxQL queries (which are run through the backend).

Test scenarios:

  1. Run make devenv sources=influxdb,influxdb1,grafana grafana_version=8.2.4 (or other version before changes)
  2. Open up http://localhost:3000/explore && http://127.0.0.1:3001/explore (to test older 8.2.4 version)
  3. Select gdev-influxdb-influxql
    • applyTemplateVariables() should apply all template variables in explore queries that are run through the backend via api/ds/query
  4. Select gdev-influxdb1-influxql
    • Should behave like gdev-influxdb-influxql

PS: make sure
[feature_toggles]
enable = influxdbBackendMigration

@joey-grafana joey-grafana changed the title InfluxDB: variables and annotations migration to backend InfluxDB: variables migration to backend Feb 18, 2022
@joey-grafana joey-grafana marked this pull request as ready for review February 18, 2022 09:35
@joey-grafana joey-grafana requested a review from a team as a code owner February 18, 2022 09:35
Copy link
Contributor

@yesoreyeram yesoreyeram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am ok to approve. But prefer to use @gabor's expertise as well.

@joey-grafana joey-grafana merged commit f4658b7 into main Feb 28, 2022
@joey-grafana joey-grafana deleted the joey/influxdb_variables_and_annotations branch February 28, 2022 10:15
alexweav pushed a commit that referenced this pull request Mar 3, 2022
* Remove check for explore

* Remove core app import

* applyVariables for select

* applyVariables for tags

* applyVariables for other query props

* applyTemplateVariables for flux

* applyTemplateVariables for influx

* Backwards compatibility

* interpolateVariablesInQueries

* Update InfluxQL mode and alias in test

* Should interpolate all variables with Flux mode

* Variables should be interpolated correctly

* Removed unused import

* explore in if check

* Removing backwards compat copy from classicQuery

* Return expandedQuery

* Const
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants