mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-21 03:16:00 -08:00
Merge pull request #4285 from prometheus/release-2.3
Merge release-2.3 back to master
This commit is contained in:
commit
fb695fb435
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,3 +1,13 @@
|
||||||
|
## 2.3.1 / 2018-06-19
|
||||||
|
|
||||||
|
* [BUGFIX] Avoid infinite loop on duplicate NaN values. #4275
|
||||||
|
* [BUGFIX] Fix nil pointer deference when using various API endpoints #4282
|
||||||
|
* [BUGFIX] config: set target group source index during unmarshalling #4245
|
||||||
|
* [BUGFIX] discovery/file: fix logging #4178
|
||||||
|
* [BUGFIX] kubernetes_sd: fix namespace filtering #4285
|
||||||
|
* [BUGFIX] web: restore old path prefix behavior #4273
|
||||||
|
* [BUGFIX] web: remove security headers added in 2.3.0 #4259
|
||||||
|
|
||||||
## 2.3.0 / 2018-06-05
|
## 2.3.0 / 2018-06-05
|
||||||
|
|
||||||
* [CHANGE] `marathon_sd`: use `auth_token` and `auth_token_file` for token-based authentication instead of `bearer_token` and `bearer_token_file` respectively.
|
* [CHANGE] `marathon_sd`: use `auth_token` and `auth_token_file` for token-based authentication instead of `bearer_token` and `bearer_token_file` respectively.
|
||||||
|
|
|
@ -450,10 +450,10 @@ func (c *mergeIterator) Next() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
currt, currv := c.At()
|
currt, _ := c.At()
|
||||||
for len(c.h) > 0 {
|
for len(c.h) > 0 {
|
||||||
nextt, nextv := c.h[0].At()
|
nextt, _ := c.h[0].At()
|
||||||
if nextt != currt || nextv != currv {
|
if nextt != currt {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ package storage
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
@ -97,6 +98,16 @@ func TestMergeSeriesSet(t *testing.T) {
|
||||||
newMockSeries(labels.FromStrings("foo", "bar"), []sample{{0, 0}, {1, 1}, {2, 2}, {3, 3}}),
|
newMockSeries(labels.FromStrings("foo", "bar"), []sample{{0, 0}, {1, 1}, {2, 2}, {3, 3}}),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
input: []SeriesSet{newMockSeriesSet(
|
||||||
|
newMockSeries(labels.FromStrings("foo", "bar"), []sample{{0, math.NaN()}}),
|
||||||
|
), newMockSeriesSet(
|
||||||
|
newMockSeries(labels.FromStrings("foo", "bar"), []sample{{0, math.NaN()}}),
|
||||||
|
)},
|
||||||
|
expected: newMockSeriesSet(
|
||||||
|
newMockSeries(labels.FromStrings("foo", "bar"), []sample{{0, math.NaN()}}),
|
||||||
|
),
|
||||||
|
},
|
||||||
} {
|
} {
|
||||||
merged := NewMergeSeriesSet(tc.input)
|
merged := NewMergeSeriesSet(tc.input)
|
||||||
for merged.Next() {
|
for merged.Next() {
|
||||||
|
@ -197,6 +208,10 @@ func drainSamples(iter SeriesIterator) []sample {
|
||||||
result := []sample{}
|
result := []sample{}
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
t, v := iter.At()
|
t, v := iter.At()
|
||||||
|
// NaNs can't be compared normally, so substitute for another value.
|
||||||
|
if math.IsNaN(v) {
|
||||||
|
v = -42
|
||||||
|
}
|
||||||
result = append(result, sample{t, v})
|
result = append(result, sample{t, v})
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Reference in a new issue