Skip to content

Commit 911ea51

Browse files
authored
Fix dependabot and CodeQL warnings (#576)
* Fix dependabot and CodeQL warnings [IG-24260](https://iguazio.atlassian.net/browse/IG-24260) Fixes the following High severity issues: * https://github.com/v3io/v3io-tsdb/security/dependabot/9 * https://github.com/v3io/v3io-tsdb/security/dependabot/11 * https://github.com/v3io/v3io-tsdb/security/code-scanning/1 * https://github.com/v3io/v3io-tsdb/security/code-scanning/2 * https://github.com/v3io/v3io-tsdb/security/code-scanning/3 as well as 6 other Moderate severity dependabot warnings. * Fix lint * Raise golang version to latest * go fmt * Delete impi * Delete linter, fix go mod * Fix build errors * Delete outdated test tag
1 parent 671f907 commit 911ea51

28 files changed

+116
-169
lines changed

Makefile

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -85,32 +85,7 @@ bin:
8585

8686
PHONY: gofmt
8787
gofmt:
88-
if [ "$(gofmt -l .)" != "" ]; then echo 'Please run `go fmt ./...` to format the code'; fi
89-
90-
.PHONY: impi
91-
impi:
92-
@echo Installing impi...
93-
GO111MODULE=off go get -u github.com/pavius/impi/cmd/impi
94-
@echo Verifying imports...
95-
$(GOPATH)/bin/impi \
96-
--local github.com/iguazio/provazio \
97-
--skip pkg/controller/apis \
98-
--skip pkg/controller/client \
99-
--ignore-generated \
100-
--scheme stdLocalThirdParty \
101-
./...
102-
103-
$(GOPATH)/bin/golangci-lint:
104-
@echo Installing golangci-lint...
105-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.49.0
106-
cp ./bin/golangci-lint $(GOPATH)/bin/
88+
@if [ "$(gofmt -l .)" != "" ]; then echo 'Please run `go fmt ./...` to format the code'; fi
10789

10890
.PHONY: lint
109-
lint: gofmt impi $(GOPATH)/bin/golangci-lint
110-
@echo Linting...
111-
@$(GOPATH)/bin/golangci-lint run \
112-
--disable-all --enable=deadcode --enable=goconst --enable=golint --enable=ineffassign \
113-
--enable=interfacer --enable=unconvert --enable=varcheck --enable=errcheck --enable=gofmt --enable=misspell \
114-
--enable=staticcheck --enable=gosimple --enable=govet --enable=goconst \
115-
cmd/... pkg/... internal/...
116-
@echo done linting
91+
lint: gofmt

go.mod

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,45 @@
11
module github.com/v3io/v3io-tsdb
22

3-
go 1.19
3+
go 1.24
44

55
require (
66
github.com/cespare/xxhash v1.1.0
77
github.com/ghodss/yaml v1.0.0
88
github.com/imdario/mergo v0.3.7
99
github.com/nuclio/logger v0.0.1
1010
github.com/nuclio/nuclio-sdk-go v0.0.0-20190205170814-3b507fbd0324
11-
github.com/nuclio/zap v0.1.2
11+
github.com/nuclio/zap v0.3.1
1212
github.com/pkg/errors v0.8.1
1313
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a
1414
github.com/spf13/cobra v0.0.3
15-
github.com/stretchr/testify v1.8.1
16-
github.com/v3io/frames v0.10.5
17-
github.com/v3io/v3io-go v0.3.0
15+
github.com/stretchr/testify v1.8.4
16+
github.com/v3io/frames v0.13.9
17+
github.com/v3io/v3io-go v0.3.12
1818
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2
1919
)
2020

2121
require (
2222
github.com/andybalholm/brotli v1.0.4 // indirect
2323
github.com/cpuguy83/go-md2man v1.0.10 // indirect
2424
github.com/davecgh/go-spew v1.1.1 // indirect
25-
github.com/golang/protobuf v1.2.0 // indirect
2625
github.com/inconshreveable/mousetrap v1.0.0 // indirect
2726
github.com/klauspost/compress v1.15.9 // indirect
28-
github.com/liranbg/uberzap v1.20.0-nuclio.1 // indirect
29-
github.com/logrusorgru/aurora/v3 v3.0.0 // indirect
27+
github.com/logrusorgru/aurora/v4 v4.0.0 // indirect
3028
github.com/nuclio/errors v0.0.4 // indirect
3129
github.com/pmezard/go-difflib v1.0.0 // indirect
3230
github.com/russross/blackfriday v1.5.2 // indirect
3331
github.com/spf13/pflag v1.0.5 // indirect
3432
github.com/valyala/bytebufferpool v1.0.0 // indirect
3533
github.com/valyala/fasthttp v1.44.0 // indirect
36-
go.uber.org/atomic v1.7.0 // indirect
37-
go.uber.org/multierr v1.6.0 // indirect
38-
golang.org/x/net v0.7.0 // indirect
39-
golang.org/x/sync v0.1.0 // indirect
40-
golang.org/x/sys v0.5.0 // indirect
41-
golang.org/x/text v0.7.0 // indirect
42-
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 // indirect
43-
google.golang.org/grpc v1.20.0 // indirect
34+
go.uber.org/multierr v1.11.0 // indirect
35+
go.uber.org/zap v1.27.0 // indirect
36+
golang.org/x/net v0.43.0 // indirect
37+
golang.org/x/sync v0.16.0 // indirect
38+
golang.org/x/sys v0.35.0 // indirect
39+
golang.org/x/text v0.28.0 // indirect
40+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250512202823-5a2f75b736a9 // indirect
41+
google.golang.org/grpc v1.72.0 // indirect
42+
google.golang.org/protobuf v1.36.6 // indirect
4443
gopkg.in/yaml.v2 v2.2.8 // indirect
4544
gopkg.in/yaml.v3 v3.0.1 // indirect
4645
zombiezen.com/go/capnproto2 v2.17.0+incompatible // indirect

go.sum

Lines changed: 61 additions & 87 deletions
Large diffs are not rendered by default.

pkg/aggregate/aggregate_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build unit
1+
//go:build unit
22

33
/*
44
Copyright 2018 Iguazio Systems Ltd.

pkg/appender/appender.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func (mc *MetricsCache) AddFast(ref uint64, t int64, v interface{}) error {
271271
metric, ok := mc.getMetric(ref)
272272
if !ok {
273273
// do not change error msg, it's parsed by prom
274-
return fmt.Errorf(fmt.Sprintf("metric not found. ref=%v", ref))
274+
return fmt.Errorf("metric not found. ref=%v", ref)
275275
}
276276

277277
err = metric.error()

pkg/chunkenc/chunkenc_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build unit
1+
//go:build unit
22

33
/*
44
Copyright 2018 Iguazio Systems Ltd.

pkg/chunkenc/vartype_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build unit
1+
//go:build unit
22

33
/*
44
Copyright 2018 Iguazio Systems Ltd.

pkg/config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build unit
1+
//go:build unit
22

33
/*
44
Copyright 2018 Iguazio Systems Ltd.

pkg/partmgr/partmgr_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build unit
1+
//go:build unit
22

33
/*
44
Copyright 2018 Iguazio Systems Ltd.

pkg/pquerier/chunkIterator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build integration
1+
//go:build integration
22

33
/*
44
Copyright 2018 Iguazio Systems Ltd.

0 commit comments

Comments
 (0)