-
Notifications
You must be signed in to change notification settings - Fork 191
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
Cannot unmarshal object into Go struct #130
Comments
Thanks for your report! Will try looking into it by using your gist. In the mean time help is welcome 🤗 |
For at least the TemplateVar.templating.list.query issue, I have fixed this in a private fork -- the problem is that prometheus based queries have a different schema, and afaict there is no way to tell what the schema is unless you know the type of the datasource (which you could only do by querying grafana during unmarshalling). I ended up writing something like the following:
Unfortunately there are a lot of places in the grafana json that require this type of approach, e.g. the Target struct which changes form in incompatible ways depending on the type of query. I'd be happy to help with some PRs, but the problem is fixes like above are breaking changes to the sdk, so I would want to get agreement on the general approach. |
Hello. |
@GiedriusS this issue is still present after #151. 2021/08/11 08:36:27 unmarshal board: json: cannot unmarshal object into Go struct field TemplateVar.templating.list.query of type string for db/kubernetes-networking-workload
2021/08/11 08:36:27 unmarshal board: json: cannot unmarshal object into Go struct field TemplateVar.templating.list.query of type string for db/kubernetes-persistent-volumes
2021/08/11 08:36:27 unmarshal board: json: cannot unmarshal object into Go struct field TemplateVar.templating.list.query of type string for db/kubernetes-pods
2021/08/11 08:36:27 unmarshal board: json: cannot unmarshal object into Go struct field TemplateVar.templating.list.query of type string for db/kubernetes-statefulsets
2021/08/11 08:36:27 unmarshal board: json: cannot unmarshal object into Go struct field TemplateVar.templating.list.query of type string for db/loki-quick-search Can it be reopened? |
Isn't it |
Last tried on version v0.0.0-20210621184808-90d328319afc |
Same issue, hard to debug |
Hey everyone! I was wondering what the state on this one is, as it blocks to sync dashboards easily. |
Looks like the cloudwatch datasource also triggers this behavior.
Looks like it's a different root cause. This issue is tracking the datasource can be a string or a map in the JSON exports. My report seems to be a different element on the Panels, unfortunately it's not as obvious as I'd like |
Same here, even try the latest commit 2ff95a7
|
Hello, have an issue on GetDashboardByUID method. On some dashboards getting errors such as
And this
Additional details here
The text was updated successfully, but these errors were encountered: