Skip to content

Commit

Permalink
update prometheus to 2.11.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lomik committed Jul 13, 2019
1 parent 2611ade commit 97597e2
Show file tree
Hide file tree
Showing 406 changed files with 49,419 additions and 2,064 deletions.
4 changes: 2 additions & 2 deletions dep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
cd `dirname $0`
ROOT=`pwd`

PROMETHEUS_VERSION="v2.10.0"
PROMETHEUS_VERSION="v2.11.1"

rm -rf vendor
rm -rf vendor_tmp
Expand Down Expand Up @@ -44,4 +44,4 @@ mkdir -p vendor/github.com/go-graphite/carbonapi/pkg
mv vendor_tmp/carbonapi/pkg/parser vendor/github.com/go-graphite/carbonapi/pkg/parser
mv vendor_tmp/carbonapi/LICENSE vendor/github.com/go-graphite/carbonapi/LICENSE

rm -rf vendor_tmp
rm -rf vendor_tmp
12 changes: 6 additions & 6 deletions prometheus/querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (q *Querier) Close() error {
}

// LabelValues returns all potential values for a label name.
func (q *Querier) LabelValues(label string) ([]string, error) {
func (q *Querier) LabelValues(label string) ([]string, storage.Warnings, error) {
w := where.New()
w.And(where.HasPrefix("Tag1", label+"="))

Expand All @@ -52,19 +52,19 @@ func (q *Querier) LabelValues(label string) ([]string, error) {
body, err := clickhouse.Query(scope.WithTable(q.ctx, q.config.ClickHouse.TaggedTable), q.config.ClickHouse.Url, sql,
clickhouse.Options{Timeout: q.config.ClickHouse.IndexTimeout.Value(), ConnectTimeout: q.config.ClickHouse.ConnectTimeout.Value()})
if err != nil {
return nil, err
return nil, nil, err
}

rows := strings.Split(string(body), "\n")
if len(rows) > 0 && rows[len(rows)-1] == "" {
rows = rows[:len(rows)-1]
}

return rows, nil
return rows, nil, nil
}

// LabelNames returns all the unique label names present in the block in sorted order.
func (q *Querier) LabelNames() ([]string, error) {
func (q *Querier) LabelNames() ([]string, storage.Warnings, error) {
w := where.New()
fromDate := time.Now().AddDate(0, 0, -q.config.ClickHouse.TaggedAutocompleDays)
w.Andf("Date >= '%s'", fromDate.Format("2006-01-02"))
Expand All @@ -77,13 +77,13 @@ func (q *Querier) LabelNames() ([]string, error) {
body, err := clickhouse.Query(scope.WithTable(q.ctx, q.config.ClickHouse.TaggedTable), q.config.ClickHouse.Url, sql,
clickhouse.Options{Timeout: q.config.ClickHouse.IndexTimeout.Value(), ConnectTimeout: q.config.ClickHouse.ConnectTimeout.Value()})
if err != nil {
return nil, err
return nil, nil, err
}

rows := strings.Split(string(body), "\n")
if len(rows) > 0 && rows[len(rows)-1] == "" {
rows = rows[:len(rows)-1]
}

return rows, nil
return rows, nil, nil
}
5 changes: 5 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

187 changes: 187 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 97597e2

Please sign in to comment.