Skip to content

Commit

Permalink
agi fix critical bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Glonek committed Sep 21, 2024
1 parent cf18b3a commit 20735d0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG/7.6.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* FIX: Update java in `vscode` client.
* FIX: AGI: Plugin: Fix critical bug resulting in a panic and a mutex lock.
2 changes: 1 addition & 1 deletion src/plugin/queryStatic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 4 additions & 0 deletions src/plugin/queryTimeseries.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 20735d0

Please sign in to comment.