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

[v11.0.x] CloudMonitoring: Improve legacy query migrations #87648

Merged
merged 1 commit into from
May 10, 2024

Conversation

grafana-delivery-bot[bot]
Copy link
Contributor

Backport 95667f6 from #86069


There were various issues with the query migrations that take place for Cloud Monitoring (particularly legacy queries).

This PR addresses those by ensuring the backend and frontend migrations are more closely aligned.

  • If a project is not defined in the frontend when the migration code is hit, the default project is used to ensure a query is not filtered unexpectedly. This matches the backend logic.
  • If a project is defined in a frontend legacy query it will be correctly migrated.
  • If the metricType property is defined in a legacy query it will be correctly migrated to the filters property.

I've also cleaned up the migration effect as I found an edge case where a query would be migrated but then not actually used because another effect being called would wipe out the migrated query.

Also, updated the tests for these cases.

Fixes #70734 (there were two distinct issues in there but they've been bundled into one).

* Match backend and correctly migrate metricType

Update tests

* Ensure project is migrated or set if not defined

* Improve migrations logic

(cherry picked from commit 95667f6)
@aangelisc aangelisc merged commit 47f85d8 into v11.0.x May 10, 2024
22 checks passed
@aangelisc aangelisc deleted the backport-86069-to-v11.0.x branch May 10, 2024 16:45
@fabrizio-grafana fabrizio-grafana modified the milestones: 11.0.x, 11.0.0 May 14, 2024
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

2 participants