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

Explore: Fixed updating time range before running queries #17349

Merged
merged 1 commit into from
May 29, 2019
Merged

Conversation

marefr
Copy link
Contributor

@marefr marefr commented May 29, 2019

What this PR does / why we need it:
This makes sure that refresh/update/run query are parsing a
relative time range to get proper epoch time range before
running queries.

Which issue(s) this PR fixes:
Fixes #17322

Special notes for your reviewer:

  1. Anything loki/live stream related I may have missed?
  2. It feels kind of weird that time range is parsed when initializeExplore and runQueries are dispatched, but TimePicker is currently dependent on a parsed time range. One possible refactor later is to only store the raw time range in state and parse it before providing it to TimePicker and datasource queries.

This makes sure that refresh/update/run query are parsing a
relative time range to get proper epoch time range before
running queries.
Copy link
Contributor

@hugohaggmark hugohaggmark left a comment

Choose a reason for hiding this comment

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

LGTM!

@marefr marefr merged commit e951e71 into master May 29, 2019
@marefr marefr deleted the 17322_fix branch May 29, 2019 11:47
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 29, 2019
* grafana/master:
  LDAP: remove unused function (grafana#17351)
  Enterprise: remove gofakeit dep (grafana#17344)
  Explore: Update time range before running queries (grafana#17349)
  Build(package.json): improve npm commands (grafana#17022)
  Chore: upgrade webpack analyser (grafana#17340)
  NewDataSourcePage: Add Grafana Cloud link (grafana#17324)
  CloudWatch: Avoid exception while accessing results (grafana#17283)
  Build: ignore absence of docker-compose (grafana#17331)
  Build(makefile): improve error handling (grafana#17281)
  adds auth example for the cli cherrypick task (grafana#17307)
  docs: remove my email from docs examples (grafana#17325)
  16365 change clashing variable names (grafana#17140)
  Frontend/SeriesData: Fix for convert SeriesData to Table format (grafana#17314)
  Frontend/utils: Import has only from lodash (grafana#17311)
  Frontend/utils: Add missing type  (grafana#17312)
  update v6.2-beta1 changelog with missing pr (grafana#17308)
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 30, 2019
…-grafanaui

* grafana/master: (92 commits)
  LDAP: remove unused function (grafana#17351)
  Enterprise: remove gofakeit dep (grafana#17344)
  Explore: Update time range before running queries (grafana#17349)
  Build(package.json): improve npm commands (grafana#17022)
  Chore: upgrade webpack analyser (grafana#17340)
  NewDataSourcePage: Add Grafana Cloud link (grafana#17324)
  CloudWatch: Avoid exception while accessing results (grafana#17283)
  Build: ignore absence of docker-compose (grafana#17331)
  Build(makefile): improve error handling (grafana#17281)
  adds auth example for the cli cherrypick task (grafana#17307)
  docs: remove my email from docs examples (grafana#17325)
  16365 change clashing variable names (grafana#17140)
  Frontend/SeriesData: Fix for convert SeriesData to Table format (grafana#17314)
  Frontend/utils: Import has only from lodash (grafana#17311)
  Frontend/utils: Add missing type  (grafana#17312)
  update v6.2-beta1 changelog with missing pr (grafana#17308)
  explore: don't parse log levels if provided by field or label (grafana#17180)
  HTTP Server: Serve Grafana with a custom URL path prefix (grafana#17048)
  update latest.json to latest stable version (grafana#17306)
  release: v6.2.1 changelog update (grafana#17303)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request Jun 3, 2019
* grafana/master: (73 commits)
  docs: configuring custom headers in the dataproxy (grafana#17367)
  Explore: Queries the datasource once per run query and uses DataStreamObserver (grafana#17263)
  Feature: Adds redux action logging toggle from url params (grafana#17368)
  Build: Adds e2e tests back to master workflow with better error messages and with artifacts (grafana#17374)
  Explore: Handle datasources with long names better in ds picker (grafana#17393)
  Annotations: Improve annotation option tooltips (grafana#17384)
  InfluxDB: Fixes single quotes are not escaped (grafana#17398)
  Chore: Bump axios to 0.19.0 (grafana#17403)
  Alerting: golint fixes for alerting (grafana#17246)
  Batch disable users (grafana#17254)
  Chore: Remove unused properties in explore (grafana#17359)
  MySQL/Postgres/MSSQL: Add parsing for day, weeks and year intervals in macros (grafana#13086)
  Security: Prevent csv formula injection attack  (grafana#17363)
  LDAP: remove unused function (grafana#17351)
  Enterprise: remove gofakeit dep (grafana#17344)
  Explore: Update time range before running queries (grafana#17349)
  Build(package.json): improve npm commands (grafana#17022)
  Chore: upgrade webpack analyser (grafana#17340)
  NewDataSourcePage: Add Grafana Cloud link (grafana#17324)
  CloudWatch: Avoid exception while accessing results (grafana#17283)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request Jun 4, 2019
* grafana/master: (49 commits)
  Build: specify build flag for `docker-compose up` (grafana#17411)
  Add a @grafana/runtime package with backendSrv interface (grafana#16533)
  Database: Initialize xorm with an empty schema for postgres (grafana#17357)
  docs: configuring custom headers in the dataproxy (grafana#17367)
  Explore: Queries the datasource once per run query and uses DataStreamObserver (grafana#17263)
  Feature: Adds redux action logging toggle from url params (grafana#17368)
  Build: Adds e2e tests back to master workflow with better error messages and with artifacts (grafana#17374)
  Explore: Handle datasources with long names better in ds picker (grafana#17393)
  Annotations: Improve annotation option tooltips (grafana#17384)
  InfluxDB: Fixes single quotes are not escaped (grafana#17398)
  Chore: Bump axios to 0.19.0 (grafana#17403)
  Alerting: golint fixes for alerting (grafana#17246)
  Batch disable users (grafana#17254)
  Chore: Remove unused properties in explore (grafana#17359)
  MySQL/Postgres/MSSQL: Add parsing for day, weeks and year intervals in macros (grafana#13086)
  Security: Prevent csv formula injection attack  (grafana#17363)
  LDAP: remove unused function (grafana#17351)
  Enterprise: remove gofakeit dep (grafana#17344)
  Explore: Update time range before running queries (grafana#17349)
  Build(package.json): improve npm commands (grafana#17022)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request Jun 4, 2019
* grafana/master: (108 commits)
  Build: specify build flag for `docker-compose up` (grafana#17411)
  Add a @grafana/runtime package with backendSrv interface (grafana#16533)
  Database: Initialize xorm with an empty schema for postgres (grafana#17357)
  docs: configuring custom headers in the dataproxy (grafana#17367)
  Explore: Queries the datasource once per run query and uses DataStreamObserver (grafana#17263)
  Feature: Adds redux action logging toggle from url params (grafana#17368)
  Build: Adds e2e tests back to master workflow with better error messages and with artifacts (grafana#17374)
  Explore: Handle datasources with long names better in ds picker (grafana#17393)
  Annotations: Improve annotation option tooltips (grafana#17384)
  InfluxDB: Fixes single quotes are not escaped (grafana#17398)
  Chore: Bump axios to 0.19.0 (grafana#17403)
  Alerting: golint fixes for alerting (grafana#17246)
  Batch disable users (grafana#17254)
  Chore: Remove unused properties in explore (grafana#17359)
  MySQL/Postgres/MSSQL: Add parsing for day, weeks and year intervals in macros (grafana#13086)
  Security: Prevent csv formula injection attack  (grafana#17363)
  LDAP: remove unused function (grafana#17351)
  Enterprise: remove gofakeit dep (grafana#17344)
  Explore: Update time range before running queries (grafana#17349)
  Build(package.json): improve npm commands (grafana#17022)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request Jun 4, 2019
* grafana/master: (142 commits)
  Build: specify build flag for `docker-compose up` (grafana#17411)
  Add a @grafana/runtime package with backendSrv interface (grafana#16533)
  Database: Initialize xorm with an empty schema for postgres (grafana#17357)
  docs: configuring custom headers in the dataproxy (grafana#17367)
  Explore: Queries the datasource once per run query and uses DataStreamObserver (grafana#17263)
  Feature: Adds redux action logging toggle from url params (grafana#17368)
  Build: Adds e2e tests back to master workflow with better error messages and with artifacts (grafana#17374)
  Explore: Handle datasources with long names better in ds picker (grafana#17393)
  Annotations: Improve annotation option tooltips (grafana#17384)
  InfluxDB: Fixes single quotes are not escaped (grafana#17398)
  Chore: Bump axios to 0.19.0 (grafana#17403)
  Alerting: golint fixes for alerting (grafana#17246)
  Batch disable users (grafana#17254)
  Chore: Remove unused properties in explore (grafana#17359)
  MySQL/Postgres/MSSQL: Add parsing for day, weeks and year intervals in macros (grafana#13086)
  Security: Prevent csv formula injection attack  (grafana#17363)
  LDAP: remove unused function (grafana#17351)
  Enterprise: remove gofakeit dep (grafana#17344)
  Explore: Update time range before running queries (grafana#17349)
  Build(package.json): improve npm commands (grafana#17022)
  ...
@marefr marefr changed the title Explore: Update time range before running queries Explore: Fixed updating time range before running queries Jun 5, 2019
aocenas pushed a commit that referenced this pull request Jun 5, 2019
This makes sure that refresh/update/run query are parsing a
relative time range to get proper epoch time range before
running queries.

Fixes #17322

(cherry picked from commit e951e71)
@aocenas aocenas mentioned this pull request Jun 5, 2019
aocenas pushed a commit that referenced this pull request Jun 5, 2019
This makes sure that refresh/update/run query are parsing a
relative time range to get proper epoch time range before
running queries.

Fixes #17322

(cherry picked from commit e951e71)
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.

Explore: Refresh does not use updated time range when refreshing data
3 participants