diff --git a/CHANGELOG/7.6.1.md b/CHANGELOG/7.6.1.md index 0f1b9295..b0d082dc 100644 --- a/CHANGELOG/7.6.1.md +++ b/CHANGELOG/7.6.1.md @@ -9,4 +9,5 @@ _Release Date: Month Day, Year_ * Improvement: AGI: Update `simpod-json-datasource` version to `0.6.5`. * FIX: AGI Monitor preserve owner when sizing instances. * FIX: Rest API: crashes. -* FIX: Update java in `vscode` client. \ No newline at end of file +* FIX: Update java in `vscode` client. +* FIX: AGI: Plugin: Fix critical bug resulting in a panic and a mutex lock. diff --git a/src/plugin/queryStatic.go b/src/plugin/queryStatic.go index 857e787b..f2e6c202 100644 --- a/src/plugin/queryStatic.go +++ b/src/plugin/queryStatic.go @@ -46,5 +46,5 @@ func (p *Plugin) handleQueryStatic(req *queryRequest, i int, remote string) (*st responseRows = append(responseRows, dataValue) } response.Rows = append(response.Rows, responseRows) - return nil, nil + return response, nil } diff --git a/src/plugin/queryTimeseries.go b/src/plugin/queryTimeseries.go index 74800ee0..64695e29 100644 --- a/src/plugin/queryTimeseries.go +++ b/src/plugin/queryTimeseries.go @@ -87,6 +87,10 @@ func (p *Plugin) handleQueryTimeseries(req *queryRequest, i int, remote string, vals = nil p.cache.lock.RLock() for _, v := range req.selectedVars[filter.Name] { + if n, ok := p.cache.metadata[filter.Name]; !ok || n == nil { + logger.Detail("Grafana requsted a filter which results in nil dereference, skipping (ok:%t filter.Name:%s v:%s)", ok, filter.Name, v) + continue + } idxval := inslice.StringMatch(p.cache.metadata[filter.Name].Entries, v) if idxval == -1 { continue