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

CloudWatch: Fix broken queries for users migrating from 8.2.4/8.2.5 to 8.3.0 #42611

Merged
merged 2 commits into from
Dec 2, 2021

Conversation

sunker
Copy link
Contributor

@sunker sunker commented Dec 1, 2021

What this PR does / why we need it:
In 8.2.4, a bug that caused nested panels not to be migrated, was fixed in this PR. While doing so, the migration code was refactored so that the panelUpgrades array was used, locking the migration to a schema version lower than 32 instead of running the migration every time the dashboard migrator is executed. At the same time, we've been working on adding support for CloudWatch Metrics Insights in a private repo. In this private repo, we've added yet more migrations, however these were based on the initial version of the dashboard migrator that was not depending on a certain schema version. Consequently, the migration necessary for Metrics Insights are not being executed, causing all CloudWatch queries to break. Note that this is only a problem for users upgrading from 8.2.4 or 8.2.5 to 8.3.0, since that's the only way to get schema version 32.

This PR simply moves these migrations from schema version 32 to schema version 34.

Which issue(s) this PR fixes:

Fixes #42598

Special notes for your reviewer:

Tested this by exporting a pre-configured cloudwatch dashboards from 8.0.0 and 8.2.4 and importing them in main, and I can confirm it's working fine.

@sunker sunker added type/bug datasource/CloudWatch backport v8.3.x Mark PR for automatic backport to v8.3.x labels Dec 1, 2021
@sunker sunker added this to the 8.3.1 milestone Dec 1, 2021
@sunker sunker requested review from torkelo and andresmgot December 1, 2021 20:30
@sunker sunker requested a review from a team as a code owner December 1, 2021 20:30
@sunker sunker requested review from joshhunt and kaydelaney and removed request for a team December 1, 2021 20:30
@sunker sunker changed the title CloudWatch: Fix broken queries for users migrating from 8.2.4 to 8.3.0 CloudWatch: Fix broken queries for users migrating from 8.2.4/8.2.5 to 8.3.0 Dec 2, 2021
@sunker sunker merged commit ee9ca20 into main Dec 2, 2021
@sunker sunker deleted the cloudwatch/migration-fix branch December 2, 2021 06:36
grafanabot pushed a commit that referenced this pull request Dec 2, 2021
…o 8.3.0 (#42611)

* move migration logic to a higher version number

* bump version in test

(cherry picked from commit ee9ca20)
sunker added a commit that referenced this pull request Dec 2, 2021
…o 8.3.0 (#42611) (#42616)

* move migration logic to a higher version number

* bump version in test

(cherry picked from commit ee9ca20)

Co-authored-by: Erik Sundell <[email protected]>
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.

PanelQueryRunner Error Error: invalid metric editor mode - on all CloudWatch dashboards in Grafana 8.3.0
3 participants