Open troibe opened 7 months ago
@dhftah Do you think we could take the Frame related changes from https://github.com/grafana/grafana/compare/main...dhftah:frk.grafana:fix-openapi-specification and already make PR out of them?
@troibe go for it; I couldn't PR grafana itself though as I am not a contributor. I will ask some people
(you'll also need to regenerate this client when it gets merged in)
hey it worked now :laughing: https://github.com/grafana/grafana/pull/86456 will submit it
+1
I'm running into the same problem. Any updates here? I noticed https://github.com/grafana/grafana/pull/86456 was closed. How can we get around this issue?
I'm running into the same problem. Any updates here? I noticed grafana/grafana#86456 was closed. How can we get around this issue?
What worked for me:
replace github.com/grafana/grafana-openapi-client-go => ../grafana-openapi-client-go
Note: I found that the Frame struct field names were different from the standard spec file.
I'm trying to use
client.Ds.QueryMetricsWithExpressions()
to see if my metrics data source can be queried with a custom query from Grafana.Now using
queryResultOK.Payload.Results["A"].Frames[0]
to access the frames results in*models.Frame(&models.Frame{Fields:[]*models.Field(nil), Meta:(*models.FrameMeta)(nil), Name:"", RefID:""})
. Running the same query in the browser or with postman yields valid results for me.As described in https://github.com/grafana/grafana-openapi-client-go/pull/90#issuecomment-2014803007 this seems to be an issue with the go data model and JSON not corresponding.
For now I'm just relying on the health check for that metrics data source.