Skip to content

Commit

Permalink
Skip non-ready entries when listing instances (grafana#1289)
Browse files Browse the repository at this point in the history
* Skip non-ready instances in LoadInstances()

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Add changelog entry

Co-authored-by: Robert Fratto <robertfratto@gmail.com>
  • Loading branch information
2 people authored and mapno committed Jan 25, 2022
1 parent 6955a00 commit d9e4eaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- [ENHANCEMENT] Go 1.17 is now used for all builds of the Agent. (@tpaschalis)

- [BUGFIX] Fixed issue where Grafana Agent may panic if there is a very large
WAL loading while old WALs are being deleted or the `/agent/api/v1/targets`
endpoint is called. (@tpaschalis)

# v0.22.0 (2022-01-13)

This release has deprecations. Please read [DEPRECATION] entries and consult
Expand Down
3 changes: 3 additions & 0 deletions pkg/metrics/instance/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ func (m *BasicManager) ListInstances() map[string]ManagedInstance {

res := make(map[string]ManagedInstance, len(m.processes))
for name, process := range m.processes {
if process == nil {
continue
}
res[name] = process.inst
}
return res
Expand Down

0 comments on commit d9e4eaf

Please sign in to comment.