Skip to content

Commit 8bf161c

Browse files
Merge branch 'main' into remove-trailing-space-labels
2 parents a758779 + ac333d1 commit 8bf161c

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ log is based on the [Keep a CHANGELOG](http://keepachangelog.com/) project.
66

77
## Unreleased
88

9+
## Fixed
10+
11+
- nil pointer dereference during a scrape [#97](https://github.com/Comcast/fishymetrics/issues/97)
12+
13+
## [0.12.0]
14+
915
## Added
1016

1117
- Add ability to reference different vault paths for credential retrieval [#25](https://github.com/Comcast/fishymetrics/issues/25)

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This app can support any chassis that has the redfish API available. If one need
99

1010
To run it:
1111

12-
```
12+
```console
1313
$ ./fishymetrics --help
1414
usage: fishymetrics [<flags>]
1515

@@ -209,13 +209,13 @@ make build
209209

210210
#### docker image
211211

212-
```
212+
```bash
213213
make docker
214214
```
215215

216216
### Testing
217217

218-
```
218+
```bash
219219
make test
220220
```
221221

common/util.go

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ func Fetch(uri, host, profile string, client *retryablehttp.Client) func() ([]by
5656
for retryCount < 3 && resp.StatusCode == http.StatusNotFound {
5757
time.Sleep(client.RetryWaitMin)
5858
resp, err = DoRequest(client, req)
59+
if err != nil {
60+
return nil, err
61+
}
5962
retryCount = retryCount + 1
6063
}
6164
if err != nil {

exporter/moonshot/exporter.go

+3
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ func fetch(uri, device, metricType, host, profile string, client *retryablehttp.
212212
for retryCount < 3 && resp.StatusCode == http.StatusNotFound {
213213
time.Sleep(client.RetryWaitMin)
214214
resp, err = common.DoRequest(client, req)
215+
if err != nil {
216+
return nil, device, metricType, err
217+
}
215218
retryCount = retryCount + 1
216219
}
217220
if err != nil {

0 commit comments

Comments
 (0)