Skip to content

Commit f9bef66

Browse files
authored
update to latest Prometheus (#4524)
* update to latest prometheus Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com> * go mod tidy Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com> * add CHANGELOG entry Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
1 parent 2b77803 commit f9bef66

File tree

34 files changed

+1030
-654
lines changed

34 files changed

+1030
-654
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## master / unreleased
44

55
* [ENHANCEMENT] Upgraded Docker base images to `alpine:3.14`. #4514
6+
* [ENHANCEMENT] Updated Prometheus to latest. Includes changes from prometheus#9239, adding 15 new functions. Multiple TSDB bugfixes prometheus#9438 & prometheus#9381. #4524
67

78
## 1.11.0-rc.0 in progress
89

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/Azure/azure-storage-blob-go v0.13.0
1010
github.com/Masterminds/squirrel v0.0.0-20161115235646-20f192218cf5
1111
github.com/NYTimes/gziphandler v1.1.1
12-
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15
12+
github.com/alecthomas/units v0.0.0-20210912230133-d1bdfacee922
1313
github.com/alicebob/miniredis/v2 v2.14.3
1414
github.com/aws/aws-sdk-go v1.40.37
1515
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
@@ -43,8 +43,8 @@ require (
4343
github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a
4444
github.com/prometheus/client_golang v1.11.0
4545
github.com/prometheus/client_model v0.2.0
46-
github.com/prometheus/common v0.30.0
47-
github.com/prometheus/prometheus v1.8.2-0.20210914090109-37468d88dce8
46+
github.com/prometheus/common v0.31.1
47+
github.com/prometheus/prometheus v1.8.2-0.20211011171444-354d8d2ecfac
4848
github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e
4949
github.com/sony/gobreaker v0.4.1
5050
github.com/spf13/afero v1.3.4

go.sum

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,9 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
211211
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
212212
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
213213
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
214-
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 h1:AUNCr9CiJuwrRYS3XieqF+Z9B9gNxo/eANAJCF2eiN4=
215214
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
215+
github.com/alecthomas/units v0.0.0-20210912230133-d1bdfacee922 h1:8ypNbf5sd3Sm3cKJ9waOGoQv6dKAFiFty9L6NP1AqJ4=
216+
github.com/alecthomas/units v0.0.0-20210912230133-d1bdfacee922/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
216217
github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0=
217218
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk=
218219
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
@@ -1606,8 +1607,9 @@ github.com/prometheus/common v0.21.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16
16061607
github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q=
16071608
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
16081609
github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
1609-
github.com/prometheus/common v0.30.0 h1:JEkYlQnpzrzQFxi6gnukFPdQ+ac82oRhzMcIduJu/Ug=
16101610
github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
1611+
github.com/prometheus/common v0.31.1 h1:d18hG4PkHnNAKNMOmFuXFaiY8Us0nird/2m60uS1AMs=
1612+
github.com/prometheus/common v0.31.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
16111613
github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4=
16121614
github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI=
16131615
github.com/prometheus/exporter-toolkit v0.5.0/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg=
@@ -1654,8 +1656,9 @@ github.com/prometheus/prometheus v1.8.2-0.20210315220929-1cba1741828b/go.mod h1:
16541656
github.com/prometheus/prometheus v1.8.2-0.20210324152458-c7a62b95cea0/go.mod h1:sf7j/iAbhZahjeC0s3wwMmp5dksrJ/Za1UKdR+j6Hmw=
16551657
github.com/prometheus/prometheus v1.8.2-0.20210519120135-d95b0972505f/go.mod h1:yUzDYX0hIYu5YVHmpj/JXLOclB6QcLNDgmagD3FUnSU=
16561658
github.com/prometheus/prometheus v1.8.2-0.20210720123808-b1ed4a0a663d/go.mod h1:o6V+A4iPEWjLG0rSEKeev3OzfBZwP+ay+4iS4dkfLI4=
1657-
github.com/prometheus/prometheus v1.8.2-0.20210914090109-37468d88dce8 h1:U8ZpFGP11pZi0ZavWWGeAqck3dVT9AY6zbr4fbBftjA=
16581659
github.com/prometheus/prometheus v1.8.2-0.20210914090109-37468d88dce8/go.mod h1:02eURgmH1YsgJ2TtWNUGMQMCnLxmtHH9nOgvYxIjGAo=
1660+
github.com/prometheus/prometheus v1.8.2-0.20211011171444-354d8d2ecfac h1:emphJoDK6yZ1GxyFbyYa7ByoWkl3dXfOmPvHAy0L0XI=
1661+
github.com/prometheus/prometheus v1.8.2-0.20211011171444-354d8d2ecfac/go.mod h1:wP6L5BiOZ1JZYadRh17u5RujSS19zNSGZfGUi/MZUpM=
16591662
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
16601663
github.com/rafaeljusto/redigomock v0.0.0-20190202135759-257e089e14a1/go.mod h1:JaY6n2sDr+z2WTsXkOmNRUfDy6FN0L6Nk7x06ndm4tY=
16611664
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=

pkg/configs/legacy_promql/test.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,8 @@ func (t *Test) exec(tc testCommand) error {
491491
func (t *Test) clear() {
492492
if t.storage != nil {
493493
if err := t.storage.Close(); err != nil {
494-
t.T.Fatalf("closing test storage: %s", err)
494+
t.T.Errorf("closing test storage: %s", err)
495+
t.T.FailNow()
495496
}
496497
}
497498
if t.cancelCtx != nil {
@@ -508,7 +509,8 @@ func (t *Test) Close() {
508509
t.cancelCtx()
509510

510511
if err := t.storage.Close(); err != nil {
511-
t.T.Fatalf("closing test storage: %s", err)
512+
t.T.Errorf("closing test storage: %s", err)
513+
t.T.FailNow()
512514
}
513515
}
514516

@@ -546,17 +548,13 @@ func parseNumber(s string) (float64, error) {
546548
return f, nil
547549
}
548550

549-
type T interface {
550-
Fatal(args ...interface{})
551-
Fatalf(format string, args ...interface{})
552-
}
553-
554551
// NewStorage returns a new storage for testing purposes
555552
// that removes all associated files on closing.
556-
func NewStorage(t T) storage.Storage {
553+
func NewStorage(t testutil.T) storage.Storage {
557554
dir, err := ioutil.TempDir("", "test_storage")
558555
if err != nil {
559-
t.Fatalf("Opening test dir failed: %s", err)
556+
t.Errorf("Opening test dir failed: %s", err)
557+
t.FailNow()
560558
}
561559

562560
// Tests just load data for a series sequentially. Thus we
@@ -566,7 +564,8 @@ func NewStorage(t T) storage.Storage {
566564
MaxBlockDuration: int64(24 * time.Hour / time.Millisecond),
567565
}, nil)
568566
if err != nil {
569-
t.Fatalf("Opening test storage failed: %s", err)
567+
t.Errorf("Opening test storage failed: %s", err)
568+
t.FailNow()
570569
}
571570
return testStorage{Storage: Adapter(db, int64(0)), dir: dir}
572571
}

vendor/github.com/alecthomas/units/bytes.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/prometheus/common/config/http_config.go

Lines changed: 22 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/prometheus/prometheus/notifier/notifier.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/prometheus/prometheus/pkg/rulefmt/rulefmt.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)