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: Backend parser compatibility with frontend parser #69865

Merged
merged 15 commits into from Jun 26, 2023

Conversation

itsmylife
Copy link
Contributor

@itsmylife itsmylife commented Jun 9, 2023

What is this feature?

InfluxDB backend parser returns fields Time and Value instead of time and value to be compatible with its predecessor frontend parser.

Epic: #65045

Why do we need this feature?

Being compatible with InfluxDB frontend parser https://github.com/grafana/grafana/blob/main/public/app/plugins/datasource/influxdb/response_parser.ts#L185-L188

Who is this feature for?

InfluxDB users with the feature flag influxdbBackendMigration enabled.

Which issue(s) does this PR fix?:

Special notes for your reviewer:

How to test (for users who did not enable influxdbBackendMigration feature toggle before)

  • Create and InfluxDB dashboard using InfluxQL
  • Add transformation Join By Field and use Time field.
  • Save the dashboard.
  • Enable feature flag influxdbBackendMigration
  • Refresh the dashboard. Obser you have No Data
  • Switch to this branch and test again

How to test (for users who enabled influxdbBackendMigration feature toggle before)

  • Create and InfluxDB dashboard using InfluxQL
  • Add transformation Join By Field and use time field.
  • Save the dashboard.
  • Switch to this branch and test again. You will see No Data
  • Update your transformations and select Time

Release notice breaking change

InfluxDB backend parser returns incompatible data with frontend. The data was being parsed by frontend and we moving towards migrating InfluxDB fully backend. One caveat is Frontend is generating data frames with fields Time and Value. The backend parser, however, generates time and value. This is causing issues and inconsistencies for the features (i.e. transformations) relying on those. In order to have a unique approach we choose to support what most of the users already have. Existing Transformations that depend on time fields have to be updated to use Time fields.

@itsmylife itsmylife added datasource/InfluxDB add to changelog breaking change Relevant for changelog generation no-backport Skip backport of PR labels Jun 9, 2023
@itsmylife itsmylife added this to the 10.1.x milestone Jun 9, 2023
@itsmylife itsmylife requested a review from a team as a code owner June 9, 2023 18:23
Base automatically changed from ismail/influxdb-refactoring-5 to main June 17, 2023 12:20
# Conflicts:
#	pkg/tsdb/influxdb/response_parser_test.go
@itsmylife itsmylife requested review from gabor, a team and osg-grafana and removed request for a team June 19, 2023 12:14
@itsmylife itsmylife requested a review from lwandz13 June 20, 2023 10:14
@LudoVio LudoVio merged commit 903af7e into main Jun 26, 2023
13 checks passed
@LudoVio LudoVio deleted the ismail/influxdb-refactoring-6 branch June 26, 2023 12:03
LudoVio pushed a commit that referenced this pull request Jun 26, 2023
* Reformatting and restructuring

* Update unit test

* Always send the default retention policy as first element

* Fix typo

* Update test

* Update test once more

* Field names start with capital letters

* Simplify the condition

* Case-insensitive checks

* Fix typo

* Update response_parser test

* Update imports
harisrozajac pushed a commit that referenced this pull request Jun 29, 2023
* Reformatting and restructuring

* Update unit test

* Always send the default retention policy as first element

* Fix typo

* Update test

* Update test once more

* Field names start with capital letters

* Simplify the condition

* Case-insensitive checks

* Fix typo

* Update response_parser test

* Update imports
harisrozajac pushed a commit that referenced this pull request Jun 30, 2023
* Reformatting and restructuring

* Update unit test

* Always send the default retention policy as first element

* Fix typo

* Update test

* Update test once more

* Field names start with capital letters

* Simplify the condition

* Case-insensitive checks

* Fix typo

* Update response_parser test

* Update imports
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
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