Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use prometheus v2.9.2, common v0.4.0 & tsdb v0.8.0 #1133

Merged
merged 3 commits into from
May 31, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ ME ?= $(shell whoami)
# Referenced by github.com/improbable-eng/thanos/blob/master/docs/getting_started.md#prometheus

# Limited prom version, because testing was not possible. This should fix it: https://github.com/improbable-eng/thanos/issues/758
PROM_VERSIONS ?=v2.4.3 v2.5.0 v2.8.1
PROM_VERSIONS ?= v2.4.3 v2.5.0 v2.8.1 v2.9.2

ALERTMANAGER_VERSION ?=v0.15.2
MINIO_SERVER_VERSION ?=RELEASE.2018-10-06T00-15-16Z
ALERTMANAGER_VERSION ?= v0.15.2
MINIO_SERVER_VERSION ?= RELEASE.2018-10-06T00-15-16Z

# fetch_go_bin_version downloads (go gets) the binary from specific version and installs it in $(GOBIN)/<bin>-<version>
# arguments:
Expand Down
21 changes: 9 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ require (
github.com/fortytw2/leaktest v1.3.0
github.com/fsnotify/fsnotify v1.4.7
github.com/go-kit/kit v0.8.0
github.com/gogo/protobuf v1.2.0
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db
github.com/gogo/protobuf v1.2.1
github.com/golang/snappy v0.0.1
github.com/google/martian v2.1.0+incompatible // indirect
github.com/googleapis/gax-go v2.0.2+incompatible // indirect
github.com/gophercloud/gophercloud v0.0.0-20181206160319-9d88c34913a9
github.com/gophercloud/gophercloud v0.0.0-20190301152420-fca40860790e
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0
github.com/grpc-ecosystem/go-grpc-prometheus v0.0.0-20181025070259-68e3a13e4117
github.com/hashicorp/golang-lru v0.5.1
github.com/julienschmidt/httprouter v1.1.0 // indirect
github.com/leanovate/gopter v0.2.4
github.com/lovoo/gcloud-opentracing v0.3.0
github.com/miekg/dns v1.1.8
Expand All @@ -32,19 +31,17 @@ require (
github.com/opentracing/basictracer-go v1.0.0
github.com/opentracing/opentracing-go v1.0.2
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v0.9.2
github.com/prometheus/common v0.0.0-20181218105931-67670fe90761
github.com/prometheus/prometheus v0.0.0-20190328180107-4d60eb36dcbe
github.com/prometheus/tsdb v0.6.1
github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304 // indirect
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829
github.com/prometheus/common v0.4.0
github.com/prometheus/prometheus v2.9.2+incompatible
github.com/prometheus/tsdb v0.8.0
golang.org/x/net v0.0.0-20190522155817-f3200d17e092
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2
google.golang.org/api v0.5.0
google.golang.org/grpc v1.19.0
google.golang.org/api v0.3.2
google.golang.org/grpc v1.19.1
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
gopkg.in/yaml.v2 v2.2.2
)
185 changes: 110 additions & 75 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/block/metadata/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func renameFile(logger log.Logger, from, to string) error {
return err
}

if err = fileutil.Fsync(pdir); err != nil {
if err = fileutil.Fdatasync(pdir); err != nil {
runutil.CloseWithLogOnErr(logger, pdir, "close dir")
return err
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/compact/downsample/downsample.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/prometheus/tsdb"
"github.com/prometheus/tsdb/chunkenc"
"github.com/prometheus/tsdb/chunks"
tsdberrors "github.com/prometheus/tsdb/errors"
"github.com/prometheus/tsdb/index"
"github.com/prometheus/tsdb/labels"
)
Expand Down Expand Up @@ -63,7 +64,7 @@ func Downsample(
// Remove blockDir in case of errors.
defer func() {
if err != nil {
var merr tsdb.MultiError
var merr tsdberrors.MultiError
merr.Add(err)
merr.Add(os.RemoveAll(blockDir))
err = merr.Err()
Expand Down
7 changes: 4 additions & 3 deletions pkg/compact/downsample/streamed_block_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/prometheus/tsdb"
"github.com/prometheus/tsdb/chunks"
"github.com/prometheus/tsdb/fileutil"
tsdberrors "github.com/prometheus/tsdb/errors"
"github.com/prometheus/tsdb/index"
"github.com/prometheus/tsdb/labels"
)
Expand Down Expand Up @@ -83,7 +84,7 @@ func NewStreamedBlockWriter(
// We should close any opened Closer up to an error.
defer func() {
if err != nil {
var merr tsdb.MultiError
var merr tsdberrors.MultiError
merr.Add(err)
for _, cl := range closers {
merr.Add(cl.Close())
Expand Down Expand Up @@ -169,7 +170,7 @@ func (w *streamedBlockWriter) Close() error {
}
w.finalized = true

merr := tsdb.MultiError{}
merr := tsdberrors.MultiError{}

if w.ignoreFinalize {
// Close open file descriptors anyway.
Expand Down Expand Up @@ -234,7 +235,7 @@ func (w *streamedBlockWriter) syncDir() (err error) {

defer runutil.CloseWithErrCapture(&err, df, "close temporary block blockDir")

if err := fileutil.Fsync(df); err != nil {
if err := fileutil.Fdatasync(df); err != nil {
return errors.Wrap(err, "sync temporary blockDir")
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/rule/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/rulefmt"
"github.com/prometheus/prometheus/rules"
"github.com/prometheus/tsdb"
tsdberrors "github.com/prometheus/tsdb/errors"
yaml "gopkg.in/yaml.v2"
)

Expand Down Expand Up @@ -112,7 +112,7 @@ func (r RuleGroup) MarshalYAML() (interface{}, error) {
// special field in RuleGroup file.
func (m *Managers) Update(dataDir string, evalInterval time.Duration, files []string) error {
var (
errs tsdb.MultiError
errs tsdberrors.MultiError
filesMap = map[storepb.PartialResponseStrategy][]string{}
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/runutil/runutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import (
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/pkg/errors"
"github.com/prometheus/tsdb"
tsdberrors "github.com/prometheus/tsdb/errors"
)

// Repeat executes f every interval seconds until stopc is closed.
Expand Down Expand Up @@ -111,7 +111,7 @@ func CloseWithLogOnErr(logger log.Logger, closer io.Closer, format string, a ...
// CloseWithErrCapture runs function and on error return error by argument including the given error (usually
// from caller function).
func CloseWithErrCapture(err *error, closer io.Closer, format string, a ...interface{}) {
merr := tsdb.MultiError{}
merr := tsdberrors.MultiError{}

merr.Add(*err)
merr.Add(errors.Wrapf(closer.Close(), format, a...))
Expand Down
2 changes: 1 addition & 1 deletion pkg/shipper/shipper.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ func renameFile(logger log.Logger, from, to string) error {
return err
}

if err = fileutil.Fsync(pdir); err != nil {
if err = fileutil.Fdatasync(pdir); err != nil {
runutil.CloseWithLogOnErr(logger, pdir, "rename file dir close")
return err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/testutil/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

const (
defaultPrometheusVersion = "v2.4.3"
defaultPrometheusVersion = "v2.9.2"
defaultAlertmanagerVersion = "v0.15.2"
defaultMinioVersion = "RELEASE.2018-10-06T00-15-16Z"

Expand Down