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

fix: more than one source types found for dashboard #991

Merged
merged 4 commits into from
Apr 16, 2023

Conversation

weisdd
Copy link
Collaborator

@weisdd weisdd commented Apr 8, 2023

Previously, a dashboard hash would be calculated from cr.Spec.Json. To make sure hash is calculated for dashboards coming from any sources, a simple trick was used: cr.Spec.Json = string(dashboardJson). That wasn't an issue with a single Grafana instance, but seems to be so with multiple instances.

The suggested PR removes that trick and makes sure hash is calculated explicitly. I think it should be either in onDashboardCreated or r.fetchDashboardJson, I can move it around if needed.

Closes: #964

@weisdd weisdd added the bug Something isn't working label Apr 8, 2023
@weisdd weisdd self-assigned this Apr 8, 2023
@weisdd weisdd requested review from pb82, NissesSenap and hubeadmin April 8, 2023 09:19
@NissesSenap
Copy link
Collaborator

@mmd-afegbua could you check if this pr solves #964?

@NissesSenap NissesSenap merged commit 240412e into master Apr 16, 2023
@NissesSenap NissesSenap deleted the fix/more-than-one-source-types branch April 16, 2023 14:15
@NissesSenap
Copy link
Collaborator

Seems like this fixes solved the issue. Thanks @weisdd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Multiple grafana instances with multiple dashboard get more than one source types found for dashboard
3 participants