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

Prometheus: Prevents panel editor crash when switching to Prometheus datasource #18616

Merged
merged 2 commits into from
Aug 19, 2019

Conversation

hugohaggmark
Copy link
Contributor

What this PR does / why we need it:
Prometheus QueryDield tries to lookup any queryhints here but in some cases when the Fields array only has 1 entry then the conversion toLegacyData fails and the query hints fails.

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

Special notes for your reviewer:

Copy link
Contributor

@davkal davkal left a comment

Choose a reason for hiding this comment

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

🥇 LGTM

@hugohaggmark hugohaggmark merged commit d7ccf98 into master Aug 19, 2019
Observability (deprecated, use Observability Squad) automation moved this from Under review to Done Aug 19, 2019
@hugohaggmark hugohaggmark deleted the hugoh/fix-18600 branch August 19, 2019 12:04
@hugohaggmark hugohaggmark changed the title Prometheus: Fixes panel editor crash when switching to Prometheus datasource Prometheus: Prevents panel editor crash when switching to Prometheus datasource Aug 19, 2019
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 19, 2019
…rame

* grafana/master:
  Rewrite user profile edit to react (grafana#17917)
  Docs: remove codecov badge (grafana#18623)
  Prometheus: Prevents panel editor crash when switching to Prometheus datasource (grafana#18616)
  Chore: Rename Popper to Popover (grafana#18543)
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 19, 2019
* grafana/master:
  Rewrite user profile edit to react (grafana#17917)
  Docs: remove codecov badge (grafana#18623)
  Prometheus: Prevents panel editor crash when switching to Prometheus datasource (grafana#18616)
  Chore: Rename Popper to Popover (grafana#18543)
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 19, 2019
* grafana/master: (202 commits)
  Azure Monitor and Log Analytics converted and separated into components (grafana#18259)
  Rewrite user profile edit to react (grafana#17917)
  Docs: remove codecov badge (grafana#18623)
  Prometheus: Prevents panel editor crash when switching to Prometheus datasource (grafana#18616)
  Chore: Rename Popper to Popover (grafana#18543)
  SingleStat: add a gauge migration call to action button in the editor (grafana#18604)
  Build: update revive dependency (grafana#18585)
  LDAP: multildap + ldap integration (grafana#18588)
  Docker: switch docker image to alpine base with phantomjs support (grafana#18468)
  Backend: Adds support for HTTP/2 (grafana#18358)
  Explore: Fixes error when switching from prometheus to loki data sources (grafana#18599)
  TimePicker: Set time to to 23:59:59 when setting To time using calendar (grafana#18595)
  Prometheus: Return labels in query results (grafana#18535)
  Docs: Update changelog and docs for annotation region change (grafana#18593)
  Refactor: move KeyValue and deprecation warning to @grafana/data (grafana#18582)
  Annotations: use a single row to represent a region (grafana#17673)
  Docs: Update upgrading guide (grafana#18547)
  Docs: Adds tests requirement to bugs checklist (grafana#18576)
  DataFrame: convert from row based to a columnar value format (grafana#18391)
  Packages: Temporarily skip canary releases if packages build fail (grafana#18577)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 21, 2019
* grafana/master:
  SingleStat: use DataFrame results rather than TimeSeries/TableData (grafana#18580)
  TestData: attach labels to series results (grafana#18653)
  Singlestat: Disable new singlestat gauge usage (grafana#18610)
  Explore: Fixes query field layout in splitted view for Safari browsers (grafana#18654)
  MSI: new long file names are causing error building MSI (grafana#18646)
  Auth: change the error HTTP status codes (grafana#18584)
  Refactor: EmptyListCTA (grafana#18516)
  Build: Upgrade to go 1.12.9 (grafana#18638)
  Chore: Revert React 16.9.0 bump (grafana#18634)
  Azure Monitor and Log Analytics converted and separated into components (grafana#18259)
  Rewrite user profile edit to react (grafana#17917)
  Docs: remove codecov badge (grafana#18623)
  Prometheus: Prevents panel editor crash when switching to Prometheus datasource (grafana#18616)
  Chore: Rename Popper to Popover (grafana#18543)
  SingleStat: add a gauge migration call to action button in the editor (grafana#18604)
  Build: update revive dependency (grafana#18585)
  LDAP: multildap + ldap integration (grafana#18588)
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 21, 2019
* grafana/master:
  SingleStat: use DataFrame results rather than TimeSeries/TableData (grafana#18580)
  TestData: attach labels to series results (grafana#18653)
  Singlestat: Disable new singlestat gauge usage (grafana#18610)
  Explore: Fixes query field layout in splitted view for Safari browsers (grafana#18654)
  MSI: new long file names are causing error building MSI (grafana#18646)
  Auth: change the error HTTP status codes (grafana#18584)
  Refactor: EmptyListCTA (grafana#18516)
  Build: Upgrade to go 1.12.9 (grafana#18638)
  Chore: Revert React 16.9.0 bump (grafana#18634)
  Azure Monitor and Log Analytics converted and separated into components (grafana#18259)
  Rewrite user profile edit to react (grafana#17917)
  Docs: remove codecov badge (grafana#18623)
  Prometheus: Prevents panel editor crash when switching to Prometheus datasource (grafana#18616)
  Chore: Rename Popper to Popover (grafana#18543)
ryantxu added a commit to ryantxu/grafana that referenced this pull request Aug 23, 2019
* grafana/master:
  SingleStat2: save options to defaults not override (grafana#18666)
  Packages: Fix path import from grafana/data (grafana#18667)
  SingleStat: use DataFrame results rather than TimeSeries/TableData (grafana#18580)
  TestData: attach labels to series results (grafana#18653)
  Singlestat: Disable new singlestat gauge usage (grafana#18610)
  Explore: Fixes query field layout in splitted view for Safari browsers (grafana#18654)
  MSI: new long file names are causing error building MSI (grafana#18646)
  Auth: change the error HTTP status codes (grafana#18584)
  Refactor: EmptyListCTA (grafana#18516)
  Build: Upgrade to go 1.12.9 (grafana#18638)
  Chore: Revert React 16.9.0 bump (grafana#18634)
  Azure Monitor and Log Analytics converted and separated into components (grafana#18259)
  Rewrite user profile edit to react (grafana#17917)
  Docs: remove codecov badge (grafana#18623)
  Prometheus: Prevents panel editor crash when switching to Prometheus datasource (grafana#18616)
  Chore: Rename Popper to Popover (grafana#18543)
  SingleStat: add a gauge migration call to action button in the editor (grafana#18604)
  Build: update revive dependency (grafana#18585)
  LDAP: multildap + ldap integration (grafana#18588)
torkelo pushed a commit that referenced this pull request Aug 30, 2019
…datasource (#18616)

* Fix: Fixes panel editor crash when switching to Promehteus
Fixes: #18600

* Refactor: Adds tests

(cherry picked from commit d7ccf98)
torkelo pushed a commit that referenced this pull request Sep 2, 2019
…datasource (#18616)

* Fix: Fixes panel editor crash when switching to Promehteus
Fixes: #18600

* Refactor: Adds tests

(cherry picked from commit d7ccf98)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Switching form Postgres to Prometheus in panel edit mode causes panel to disappear
3 participants