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

CloudMonitoring: Fix query type selection issue #87990

Merged
merged 6 commits into from
May 17, 2024

Conversation

aangelisc
Copy link
Contributor

@aangelisc aangelisc commented May 16, 2024

#86069 introduced a bug which would prevent the query type from being changed.

This fixes that by running a deepEqual check against the saved migratedQuery value and the new query.

I've tested that the original migration fix still works and that the query is correctly maintained across re-renders.

@aangelisc aangelisc added this to the 11.1.x milestone May 16, 2024
@aangelisc aangelisc self-assigned this May 16, 2024
@aangelisc aangelisc requested a review from a team as a code owner May 16, 2024 14:50
@aangelisc aangelisc requested review from asimpson, bossinc, adamyeats and alyssabull and removed request for a team May 16, 2024 14:50
Copy link
Contributor

This PR must be merged before a backport PR will be created.

2 similar comments
Copy link
Contributor

This PR must be merged before a backport PR will be created.

Copy link
Contributor

This PR must be merged before a backport PR will be created.

@aangelisc aangelisc enabled auto-merge (squash) May 16, 2024 20:04
Copy link
Contributor

@asimpson asimpson left a comment

Choose a reason for hiding this comment

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

Love this cleaned up version!

@aangelisc aangelisc merged commit 58d382e into main May 17, 2024
15 checks passed
@aangelisc aangelisc deleted the andreas/fix-cloudmonitoring-select branch May 17, 2024 18:06
grafana-delivery-bot bot pushed a commit that referenced this pull request May 17, 2024
* Use deepEqual to ensure migratedQuery is only returned when query is unchanged

* Add selectors for query editors

* Add more tests for query editor component

* Clarifying comments

* Fix how state is set

* Simplify query editor loading and migration

(cherry picked from commit 58d382e)
grafana-delivery-bot bot pushed a commit that referenced this pull request May 17, 2024
* Use deepEqual to ensure migratedQuery is only returned when query is unchanged

* Add selectors for query editors

* Add more tests for query editor component

* Clarifying comments

* Fix how state is set

* Simplify query editor loading and migration

(cherry picked from commit 58d382e)
aangelisc added a commit that referenced this pull request May 17, 2024
CloudMonitoring: Fix query type selection issue (#87990)

* Use deepEqual to ensure migratedQuery is only returned when query is unchanged

* Add selectors for query editors

* Add more tests for query editor component

* Clarifying comments

* Fix how state is set

* Simplify query editor loading and migration

(cherry picked from commit 58d382e)

Co-authored-by: Andreas Christou <[email protected]>
aangelisc added a commit that referenced this pull request May 17, 2024
CloudMonitoring: Fix query type selection issue (#87990)

* Use deepEqual to ensure migratedQuery is only returned when query is unchanged

* Add selectors for query editors

* Add more tests for query editor component

* Clarifying comments

* Fix how state is set

* Simplify query editor loading and migration

(cherry picked from commit 58d382e)

Co-authored-by: Andreas Christou <[email protected]>
@kevinwcyu kevinwcyu modified the milestones: 11.1.x, 11.1.0 Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants