Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
49bc5cf
.*: replace linters with golangci-lint
GiedriusS Jun 5, 2019
94fe33a
Makefile: fix binary name
GiedriusS Jun 5, 2019
897faf7
Makefile: fix path
GiedriusS Jun 5, 2019
838bbf1
Add .golangci.yml
Jun 6, 2019
a8844cf
Makefile: convert format to gometalint
Jun 6, 2019
c5d9cdf
.*: fix ineffectual assignment errors
Jun 6, 2019
0e296b9
.*: nuke lots of linter errors
Jun 7, 2019
e33c4b6
.*: fix more linter problems
GiedriusS Jun 9, 2019
96e6e13
.*: fix more linter errors
Jun 11, 2019
e49d0b0
.golangci: ignore InstrumentHandler{,Func} deprecation warnings
Jun 13, 2019
c228ea1
.golangci: fix indentation problems
Jun 13, 2019
dbe2a47
pkg/tracking: run goimports
Jun 13, 2019
9bc0900
.*: more goimports
Jun 13, 2019
6950cf2
.*: more goimports
Jun 13, 2019
06e3147
pkg/pool: fix test
Jun 14, 2019
4ee8313
store/prometheus: cleanup sync.Pool usage
Jun 14, 2019
ab2f1bd
store/bucket: use ptrs consistently
Jun 14, 2019
6c65e7b
store/bucket: return ownership to caller
Jun 14, 2019
c4f709b
Merge remote-tracking branch 'origin/master' into mci
Jul 1, 2019
77451d7
.*: fix rest of errors
Jul 1, 2019
699deee
component: bring back implementsStoreAPI()
GiedriusS Jul 1, 2019
704b97e
thanos/rule: refactor if
GiedriusS Jul 1, 2019
2026ee7
compact: use defer
GiedriusS Jul 1, 2019
c3d27f7
pool: null the slice
GiedriusS Jul 1, 2019
4d435b9
Merge remote-tracking branch 'origin' into gometaci
GiedriusS Jul 1, 2019
8682d6f
store: goimports
GiedriusS Jul 1, 2019
756d8b2
component: bring back the private methods
GiedriusS Jul 1, 2019
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
Prev Previous commit
Next Next commit
.*: fix ineffectual assignment errors
  • Loading branch information
Giedrius Statkevičius committed Jun 6, 2019
commit c5d9cdf4a8ec3fcd364220b4a88be73cd0f241e8
2 changes: 0 additions & 2 deletions cmd/thanos/downsample.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,6 @@ func processDownsampling(ctx context.Context, logger log.Logger, bkt objstore.Bu

level.Info(logger).Log("msg", "uploaded block", "id", id, "duration", time.Since(begin))

begin = time.Now()

// It is not harmful if these fails.
if err := os.RemoveAll(bdir); err != nil {
level.Warn(logger).Log("msg", "failed to clean directory", "dir", bdir, "err", err)
Expand Down
4 changes: 4 additions & 0 deletions cmd/thanos/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ func main() {
var closer io.Closer
var confContentYaml []byte
confContentYaml, err = tracingConfig.Content()
if err != nil {
level.Error(logger).Log("msg", "getting tracing config failed", "err", err)
os.Exit(1)
}

if len(confContentYaml) == 0 {
level.Info(logger).Log("msg", "Tracing will be disabled")
Expand Down
4 changes: 2 additions & 2 deletions pkg/query/api/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func (api *API) query(r *http.Request) (interface{}, []error, *ApiError) {
}

// We are starting promQL tracing span here, because we have no control over promQL code.
span, ctx := tracing.StartSpan(r.Context(), "promql_instant_query")
span, ctx := tracing.StartSpan(ctx, "promql_instant_query")
defer span.Finish()

begin := api.now()
Expand Down Expand Up @@ -387,7 +387,7 @@ func (api *API) queryRange(r *http.Request) (interface{}, []error, *ApiError) {
}

// We are starting promQL tracing span here, because we have no control over promQL code.
span, ctx := tracing.StartSpan(r.Context(), "promql_range_query")
span, ctx := tracing.StartSpan(ctx, "promql_range_query")
defer span.Finish()

begin := api.now()
Expand Down
1 change: 1 addition & 0 deletions pkg/reloader/reloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ config:
}
}()
err = reloader.Watch(ctx)
testutil.Ok(t, err)
cancel()
g.Wait()
testutil.Equals(t, 2, reloads.Load().(int))
Expand Down
7 changes: 0 additions & 7 deletions pkg/store/bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ func TestBucketBlock_Property(t *testing.T) {
return false
} else if len(res) > 1 {
mint := int64(21001)
maxt := int64(0)
for i := 0; i < len(res)-1; i++ {
if res[i].meta.Thanos.Downsample.Resolution > maxResolution {
return false
Expand All @@ -88,16 +87,10 @@ func TestBucketBlock_Property(t *testing.T) {
if res[i].meta.MinTime < mint {
mint = res[i].meta.MinTime
}
if res[i].meta.MaxTime > maxt {
maxt = res[i].meta.MaxTime
}
}
if res[len(res)-1].meta.MinTime < mint {
mint = res[len(res)-1].meta.MinTime
}
if res[len(res)-1].meta.MaxTime > maxt {
maxt = res[len(res)-1].meta.MaxTime
}
if low < mint {
return false
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func (p *PrometheusStore) promSeries(ctx context.Context, q prompb.Query) (*prom
}

var data prompb.ReadResponse
spanUnmarshal, ctx := tracing.StartSpan(ctx, "unmarshal_response")
spanUnmarshal, _ := tracing.StartSpan(ctx, "unmarshal_response")
if err := proto.Unmarshal(decomp, &data); err != nil {
return nil, errors.Wrap(err, "unmarshal response")
}
Expand Down