This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch vendor
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git

commit 3abb03b15c45c3fdbfc1efcca853edaa0ca060d0
Author: Gao Hongtao <[email protected]>
AuthorDate: Thu Sep 12 02:17:31 2024 +0000

    Bump go
    
    Signed-off-by: Gao Hongtao <[email protected]>
---
 .golangci.yml                    | 2 +-
 CHANGES.md                       | 2 ++
 CONTRIBUTING.md                  | 2 +-
 Makefile                         | 6 ++++++
 docs/installation/binaries.md    | 2 +-
 go.mod                           | 4 ++--
 scripts/build/lint-api.mk        | 2 +-
 scripts/build/lint.mk            | 2 --
 scripts/build/vendor.mk          | 2 +-
 scripts/build/version.mk         | 4 +++-
 scripts/build/vuln.mk            | 5 +++++
 scripts/ci/check/version_test.go | 2 +-
 12 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/.golangci.yml b/.golangci.yml
index 63b372f5..5c6e1433 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -131,7 +131,7 @@ linters-settings:
       - 'cobra\.Command$'
 
 run:
-  go: "1.22"
+  go: "1.23"
 issues:
   exclude-rules:
     - path: ".*\\.pb\\.go"
diff --git a/CHANGES.md b/CHANGES.md
index 19e6f99e..20cd8b38 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -63,6 +63,7 @@ Release Notes.
 - Push "skywalking-banyandb:<tag>-testing" image for e2e and stress test. This 
image contains bydbctl to do a health check.
 - Set etcd-client log level to "error" and etcd-server log level to "warn".
 - Push "skywalking-banyandb:<tag>-slim" image for the production environment. 
This image doesn't contain bydbctl and Web UI.
+- Bump go to 1.23.
 
 ## 0.6.1
 
@@ -122,6 +123,7 @@ Release Notes.
 - Bump all dependencies of Go and Node.
 - Combine banyand and bydbctl Dockerfile.
 - Update readme for bydbctl
+- Introduce the go vulnerability check to "pre-push" task.
 
 ## 0.5.0
 
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d2a0c5df..4a30330f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -41,7 +41,7 @@ Once we've discussed your changes and you've got your code 
ready, make sure that
 
 Users who want to build a binary from sources have to set up:
 
-* Go 1.22
+* Go 1.23
 * Node 20.12
 * Git >= 2.30
 * Linux, macOS or Windows + WSL2
diff --git a/Makefile b/Makefile
index 644e822c..aa5449df 100644
--- a/Makefile
+++ b/Makefile
@@ -103,6 +103,11 @@ check-req: ## Check the requirements
        @$(MAKE) -C scripts/ci/check test
        @$(MAKE) -C ui check-version
 
+include scripts/build/vuln.mk
+
+vuln-check: $(GOVULNCHECK)
+       $(GOVULNCHECK) -show color,verbose ./...        
+
 check: ## Check that the status is consistent with CI
        $(MAKE) license-check
        $(MAKE) format
@@ -123,6 +128,7 @@ pre-push: ## Check source files before pushing to the 
remote repo
        $(MAKE) lint
        $(MAKE) license-dep
        $(MAKE) check
+       $(MAKE) vuln-check
 
 ##@ License targets
 
diff --git a/docs/installation/binaries.md b/docs/installation/binaries.md
index 62610e19..2eeade4e 100644
--- a/docs/installation/binaries.md
+++ b/docs/installation/binaries.md
@@ -56,7 +56,7 @@ The banyand and bydbctl directory structure is as follows.
 
 Users who want to build a binary from sources have to set up:
 
-* Go 1.22
+* Go 1.23
 * Node 20.12
 * Git >= 2.30
 * Linux, macOS or Windows+WSL2
diff --git a/go.mod b/go.mod
index 34ea2bc7..2c79c9aa 100644
--- a/go.mod
+++ b/go.mod
@@ -1,8 +1,8 @@
 module github.com/apache/skywalking-banyandb
 
-go 1.22.0
+go 1.23.0
 
-toolchain go1.22.6
+toolchain go1.23.1
 
 require (
        github.com/RoaringBitmap/roaring v1.9.4
diff --git a/scripts/build/lint-api.mk b/scripts/build/lint-api.mk
index 5bc3bba8..0d9e684c 100644
--- a/scripts/build/lint-api.mk
+++ b/scripts/build/lint-api.mk
@@ -21,7 +21,7 @@ include $(mk_dir)lint-bin.mk
 ##@ Code quality targets
 
 .PHONY: lint
-lint: $(LINTER) $(REVIVE) ## Run all linters
+lint: $(BUF) $(LINTER) $(REVIVE) ## Run all linters
        @PATH=$(tool_bin):$(proto_dir) $(BUF) lint
        $(LINTER) run -v --config $(root_dir)/.golangci.yml ./... && \
          $(REVIVE) -config $(root_dir)/revive.toml -formatter friendly ./...
diff --git a/scripts/build/lint.mk b/scripts/build/lint.mk
index 394161c0..49dd2c98 100644
--- a/scripts/build/lint.mk
+++ b/scripts/build/lint.mk
@@ -20,8 +20,6 @@ include $(mk_dir)lint-bin.mk
 
 ##@ Code quality targets
 
-
-
 .PHONY: lint
 lint: $(LINTER) $(REVIVE) ## Run all linters
        $(LINTER) run -v --config $(root_dir)/.golangci.yml --timeout 10m ./... 
&& \
diff --git a/scripts/build/vendor.mk b/scripts/build/vendor.mk
index 345f69ef..2823aaf8 100644
--- a/scripts/build/vendor.mk
+++ b/scripts/build/vendor.mk
@@ -22,4 +22,4 @@
 .PHONY: vendor-update
 vendor-update: ## Update vendors
        go get -u -d ./...
-       go mod tidy -compat=1.22
+       go mod tidy -compat=1.23
diff --git a/scripts/build/version.mk b/scripts/build/version.mk
index c11a9efa..45fa6122 100644
--- a/scripts/build/version.mk
+++ b/scripts/build/version.mk
@@ -29,4 +29,6 @@ LICENSE_EYE_VERSION := 
3ea9df11bb3a5a85665377d1fd10c02edecf2c40
 
 MOCKGEN_VERSION := v0.4.0
 
-GINKGO_VERSION := v2.20.2
\ No newline at end of file
+GINKGO_VERSION := v2.20.2
+
+GOVULNCHECK_VERSION := v1.1.3
diff --git a/scripts/build/vuln.mk b/scripts/build/vuln.mk
new file mode 100644
index 00000000..3c6dcac7
--- /dev/null
+++ b/scripts/build/vuln.mk
@@ -0,0 +1,5 @@
+GOVULNCHECK := $(tool_bin)/govulncheck
+$(GOVULNCHECK):
+       @echo "Install govulncheck..."
+       @mkdir -p $(tool_bin)
+       @GOBIN=$(tool_bin) go install 
golang.org/x/vuln/cmd/govulncheck@$(GOVULNCHECK_VERSION)
diff --git a/scripts/ci/check/version_test.go b/scripts/ci/check/version_test.go
index da87dc7a..26555a59 100644
--- a/scripts/ci/check/version_test.go
+++ b/scripts/ci/check/version_test.go
@@ -31,7 +31,7 @@ import (
 )
 
 const (
-       GoVersion = "1.22.0"
+       GoVersion = "1.23.0"
        CPUType   = 8
 )
 

Reply via email to