mirror of
https://github.com/milvus-io/milvus.git
synced 2026-07-21 02:05:41 +00:00
fix: upgrade Go to 1.25.8 for CVE-2025-68121, CVE-2026-27142, CVE-2026-25679 (#48286)
issue: #48574 ## Summary - Upgrade Go from 1.24.12 to 1.25.8 across all go.mod files and Dockerfiles - Fixes CVE-2025-68121 (CRITICAL), CVE-2026-27142 (HIGH), CVE-2026-25679 (HIGH) in Go stdlib - All three CVEs affect the Go standard library and are resolved by upgrading to Go 1.25.8 ## Changes - Updated `go` directive in go.mod files (root, pkg/, client/, tests/go_client/, examples/) - Updated Go download URLs in Dockerfiles (build/docker/builder/) - Updated `toolchain` directives where present issue: https://github.com/milvus-io/milvus/issues/TBD ## Test plan - [x] `make milvus` builds successfully with Go 1.25.8 - [ ] CI passes 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Li Liu <li.liu@zilliz.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
9340e7a5e7
commit
b0ec4a2dd8
@@ -5,11 +5,11 @@ IMAGE_ARCH=amd64
|
||||
OS_NAME=ubuntu22.04
|
||||
|
||||
# for services.builder.image in docker-compose.yml
|
||||
DATE_VERSION=20260205-982c238
|
||||
LATEST_DATE_VERSION=20260205-982c238
|
||||
DATE_VERSION=20260318-39568a2
|
||||
LATEST_DATE_VERSION=20260318-39568a2
|
||||
# for services.gpubuilder.image in docker-compose.yml
|
||||
GPU_DATE_VERSION=20260205-982c238
|
||||
LATEST_GPU_DATE_VERSION=20260205-982c238
|
||||
GPU_DATE_VERSION=20260318-39568a2
|
||||
LATEST_GPU_DATE_VERSION=20260318-39568a2
|
||||
|
||||
# for other services in docker-compose.yml
|
||||
MINIO_ADDRESS=minio:9000
|
||||
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
- name: Setup Go environment
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.24.12'
|
||||
go-version: '1.25.8'
|
||||
cache: false
|
||||
- name: Download Caches
|
||||
uses: ./.github/actions/macos-cache-restore
|
||||
|
||||
+336
-194
@@ -1,209 +1,351 @@
|
||||
version: "2"
|
||||
run:
|
||||
go: "1.22"
|
||||
go: "1.25"
|
||||
build-tags:
|
||||
- dynamic
|
||||
- test
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
default: none
|
||||
enable:
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- staticcheck
|
||||
- decorder
|
||||
- depguard
|
||||
- gofmt
|
||||
- goimports
|
||||
- gosec
|
||||
- revive
|
||||
- unconvert
|
||||
- misspell
|
||||
- typecheck
|
||||
- durationcheck
|
||||
- forbidigo
|
||||
- gci
|
||||
- whitespace
|
||||
- gofumpt
|
||||
- gocritic
|
||||
|
||||
linters-settings:
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/milvus-io)
|
||||
custom-order: true
|
||||
govet:
|
||||
enable: # add extra linters
|
||||
- nilness
|
||||
gofumpt:
|
||||
module-path: github.com/milvus-io
|
||||
goimports:
|
||||
local-prefixes: github.com/milvus-io
|
||||
revive:
|
||||
- gosec
|
||||
- govet
|
||||
- ineffassign
|
||||
- misspell
|
||||
- revive
|
||||
- staticcheck
|
||||
- unconvert
|
||||
- whitespace
|
||||
settings:
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
deny:
|
||||
- pkg: errors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: github.com/pkg/errors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: github.com/pingcap/errors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: golang.org/x/xerrors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: github.com/go-errors/errors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: io/ioutil
|
||||
desc: ioutil is deprecated after 1.16, 1.17, use os and io package instead
|
||||
- pkg: github.com/tikv/client-go/rawkv
|
||||
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
|
||||
- pkg: github.com/tikv/client-go/v2/rawkv
|
||||
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
|
||||
- pkg: github.com/gogo/protobuf
|
||||
desc: not allowed, gogo protobuf is deprecated
|
||||
- pkg: github.com/golang/protobuf/proto
|
||||
desc: not allowed, protobuf v1 is deprecated, use google.golang.org/protobuf/proto instead
|
||||
- pkg: github.com/pingcap/log
|
||||
desc: not allowed, use github.com/milvus-io/milvus/pkg/v2/log
|
||||
forbidigo:
|
||||
forbid:
|
||||
- pattern: ^time\.Tick$
|
||||
- pattern: return merr\.Err[a-zA-Z]+
|
||||
- pattern: merr\.Wrap\w+\(\)\.Error\(\)
|
||||
- pattern: '\.(ErrorCode|Reason) = '
|
||||
- pattern: Reason:\s+\w+\.Error\(\)
|
||||
- pattern: errors.New\((.+)\.GetReason\(\)\)
|
||||
- pattern: commonpb\.Status\{[\s\n]*ErrorCode:[\s\n]*.+[\s\S\n]*?\}
|
||||
- pattern: os\.Open\(.+\)
|
||||
- pattern: os\.ReadFile\(.+\)
|
||||
- pattern: os\.WriteFile\(.+\)
|
||||
- pattern: runtime.NumCPU
|
||||
- pattern: runtime.GOMAXPROCS(0)
|
||||
gocritic:
|
||||
enabled-tags: []
|
||||
enabled-checks:
|
||||
- ruleguard
|
||||
settings:
|
||||
ruleguard:
|
||||
rules: rules.go
|
||||
govet:
|
||||
enable:
|
||||
- nilness
|
||||
disable:
|
||||
# TODO: re-enable printf after investigating false positives with Go 1.25 + golangci-lint v2
|
||||
- printf
|
||||
misspell:
|
||||
locale: US
|
||||
revive:
|
||||
rules:
|
||||
- name: unused-parameter
|
||||
disabled: true
|
||||
- name: var-naming
|
||||
arguments:
|
||||
- - ID
|
||||
- IDS
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: context-as-argument
|
||||
arguments:
|
||||
- allowTypesBefore: '*testing.T'
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: datarace
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: duplicated-imports
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: waitgroup-by-value
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: indent-error-flow
|
||||
arguments:
|
||||
- preserveScope
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: range-val-in-closure
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: range-val-address
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: string-of-int
|
||||
severity: warning
|
||||
disabled: false
|
||||
exclusions:
|
||||
generated: lax
|
||||
rules:
|
||||
- name: unused-parameter
|
||||
disabled: true
|
||||
- name: var-naming
|
||||
severity: warning
|
||||
disabled: false
|
||||
arguments:
|
||||
- ["ID", "IDS"] # Allow list
|
||||
- name: context-as-argument
|
||||
severity: warning
|
||||
disabled: false
|
||||
arguments:
|
||||
- allowTypesBefore: "*testing.T"
|
||||
- name: datarace
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: duplicated-imports
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: waitgroup-by-value
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: indent-error-flow
|
||||
severity: warning
|
||||
disabled: false
|
||||
arguments:
|
||||
- "preserveScope"
|
||||
- name: range-val-in-closure
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: range-val-address
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: string-of-int
|
||||
severity: warning
|
||||
disabled: false
|
||||
misspell:
|
||||
locale: US
|
||||
gocritic:
|
||||
enabled-checks:
|
||||
- ruleguard
|
||||
settings:
|
||||
ruleguard:
|
||||
failOnError: true
|
||||
rules: "rules.go"
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
deny:
|
||||
- pkg: "errors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "github.com/pkg/errors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "github.com/pingcap/errors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "golang.org/x/xerrors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "github.com/go-errors/errors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "io/ioutil"
|
||||
desc: ioutil is deprecated after 1.16, 1.17, use os and io package instead
|
||||
- pkg: "github.com/tikv/client-go/rawkv"
|
||||
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
|
||||
- pkg: "github.com/tikv/client-go/v2/rawkv"
|
||||
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
|
||||
- pkg: "github.com/gogo/protobuf"
|
||||
desc: "not allowed, gogo protobuf is deprecated"
|
||||
- pkg: "github.com/golang/protobuf/proto"
|
||||
desc: "not allowed, protobuf v1 is deprecated, use google.golang.org/protobuf/proto instead"
|
||||
- pkg: "github.com/pingcap/log"
|
||||
desc: "not allowed, use github.com/milvus-io/milvus/pkg/v2/log"
|
||||
forbidigo:
|
||||
forbid:
|
||||
- '^time\.Tick$'
|
||||
- 'return merr\.Err[a-zA-Z]+'
|
||||
- 'merr\.Wrap\w+\(\)\.Error\(\)'
|
||||
- '\.(ErrorCode|Reason) = '
|
||||
- 'Reason:\s+\w+\.Error\(\)'
|
||||
- 'errors.New\((.+)\.GetReason\(\)\)'
|
||||
- 'commonpb\.Status\{[\s\n]*ErrorCode:[\s\n]*.+[\s\S\n]*?\}'
|
||||
- 'os\.Open\(.+\)'
|
||||
- 'os\.ReadFile\(.+\)'
|
||||
- 'os\.WriteFile\(.+\)'
|
||||
- "runtime.NumCPU"
|
||||
- "runtime.GOMAXPROCS(0)"
|
||||
#- 'fmt\.Print.*' WIP
|
||||
|
||||
- linters:
|
||||
- forbidigo
|
||||
path: .+_test\.go
|
||||
- path: mocks\/(.)+mock_(.+)\.go
|
||||
text: don't use an underscore in package name
|
||||
# TODO: cleanup in follow-up PR — v2 linters are stricter than v1 on existing code
|
||||
- linters:
|
||||
- misspell
|
||||
- ineffassign
|
||||
- unconvert
|
||||
- depguard
|
||||
- whitespace
|
||||
- revive
|
||||
- gocritic
|
||||
path: ^internal/(datacoord|datanode)/
|
||||
- linters:
|
||||
- unconvert
|
||||
path: ^(cmd/tools|internal/util|tests/integration)/
|
||||
- path: (.+)\.go$
|
||||
text: should have a package comment
|
||||
- path: (.+)\.go$
|
||||
text: should have comment
|
||||
- path: (.+)\.go$
|
||||
text: should be of the form
|
||||
- path: (.+)\.go$
|
||||
text: should not use dot imports
|
||||
- path: (.+)\.go$
|
||||
text: which can be annoying to use
|
||||
- path: (.+)\.go$
|
||||
text: G102
|
||||
- path: (.+)\.go$
|
||||
text: G103
|
||||
- path: (.+)\.go$
|
||||
text: G104
|
||||
- path: (.+)\.go$
|
||||
text: G301
|
||||
- path: (.+)\.go$
|
||||
text: G302
|
||||
- path: (.+)\.go$
|
||||
text: G304
|
||||
- path: (.+)\.go$
|
||||
text: G307
|
||||
- path: (.+)\.go$
|
||||
text: G402
|
||||
- path: (.+)\.go$
|
||||
text: G404
|
||||
- path: (.+)\.go$
|
||||
text: SA1019
|
||||
- path: (.+)\.go$
|
||||
text: SA5001
|
||||
- path: (.+)\.go$
|
||||
text: sloppyLen
|
||||
- path: (.+)\.go$
|
||||
text: dupSubExpr
|
||||
- path: (.+)\.go$
|
||||
text: assignOp
|
||||
- path: (.+)\.go$
|
||||
text: ifElseChain
|
||||
- path: (.+)\.go$
|
||||
text: elseif
|
||||
- path: (.+)\.go$
|
||||
text: commentFormatting
|
||||
- path: (.+)\.go$
|
||||
text: exitAfterDefer
|
||||
- path: (.+)\.go$
|
||||
text: captLocal
|
||||
- path: (.+)\.go$
|
||||
text: singleCaseSwitch
|
||||
- path: (.+)\.go$
|
||||
text: typeSwitchVar
|
||||
- path: (.+)\.go$
|
||||
text: indent-error-flow
|
||||
- path: (.+)\.go$
|
||||
text: appendAssign
|
||||
- path: (.+)\.go$
|
||||
text: deprecatedComment
|
||||
- path: (.+)\.go$
|
||||
text: SA9009
|
||||
- path: (.+)\.go$
|
||||
text: SA1006
|
||||
- path: (.+)\.go$
|
||||
text: S1009
|
||||
- path: (.+)\.go$
|
||||
text: offBy1
|
||||
- path: (.+)\.go$
|
||||
text: unslice
|
||||
- path: (.+)\.go$
|
||||
text: G115
|
||||
# TODO: cleanup following exclusions, added on golangci-lint v2 upgrade
|
||||
# staticcheck quick-fix suggestions (QF)
|
||||
- path: (.+)\.go$
|
||||
text: QF1001
|
||||
- path: (.+)\.go$
|
||||
text: QF1003
|
||||
- path: (.+)\.go$
|
||||
text: QF1005
|
||||
- path: (.+)\.go$
|
||||
text: QF1006
|
||||
- path: (.+)\.go$
|
||||
text: QF1007
|
||||
- path: (.+)\.go$
|
||||
text: QF1008
|
||||
- path: (.+)\.go$
|
||||
text: QF1011
|
||||
- path: (.+)\.go$
|
||||
text: QF1012
|
||||
# staticcheck style checks (ST)
|
||||
- path: (.+)\.go$
|
||||
text: ST1005
|
||||
- path: (.+)\.go$
|
||||
text: ST1008
|
||||
- path: (.+)\.go$
|
||||
text: ST1011
|
||||
- path: (.+)\.go$
|
||||
text: ST1023
|
||||
# TODO: cleanup v2-stricter-than-v1 exclusions in follow-up PR
|
||||
# staticcheck checks not enforced in v1
|
||||
- path: (.+)\.go$
|
||||
text: S1005
|
||||
- path: (.+)\.go$
|
||||
text: S1008
|
||||
- path: (.+)\.go$
|
||||
text: S1021
|
||||
- path: (.+)\.go$
|
||||
text: S1025
|
||||
- path: (.+)\.go$
|
||||
text: S1031
|
||||
- path: (.+)\.go$
|
||||
text: S1034
|
||||
- path: (.+)\.go$
|
||||
text: S1039
|
||||
- path: (.+)\.go$
|
||||
text: SA3001
|
||||
- path: (.+)\.go$
|
||||
text: SA4003
|
||||
- path: (.+)\.go$
|
||||
text: SA4010
|
||||
- path: (.+)\.go$
|
||||
text: SA4011
|
||||
- path: (.+)\.go$
|
||||
text: ST1019
|
||||
# gosec rules not enforced in v1
|
||||
- path: (.+)\.go$
|
||||
text: G306
|
||||
# gocritic checks not enforced in v1
|
||||
- path: (.+)\.go$
|
||||
text: unlambda
|
||||
- path: (.+)\.go$
|
||||
text: underef
|
||||
# gosec rules not enforced in v1 (G602 slice bounds, G101 hardcoded credentials)
|
||||
- path: (.+)\.go$
|
||||
text: G602
|
||||
- path: (.+)\.go$
|
||||
text: G101
|
||||
# staticcheck SA4006 (assigned value never used) — not enforced in v1
|
||||
- path: (.+)\.go$
|
||||
text: SA4006
|
||||
# whitespace trailing newline — not enforced strictly in v1
|
||||
- path: (.+)\.go$
|
||||
linters:
|
||||
- whitespace
|
||||
text: unnecessary trailing newline
|
||||
# gosec new rules (introduced in gosec v2.23+, not present in golangci-lint v1)
|
||||
- path: (.+)\.go$
|
||||
text: G117
|
||||
- path: (.+)\.go$
|
||||
text: G118
|
||||
- path: (.+)\.go$
|
||||
text: G120
|
||||
- path: (.+)\.go$
|
||||
text: G702
|
||||
- path: (.+)\.go$
|
||||
text: G703
|
||||
- path: (.+)\.go$
|
||||
text: G705
|
||||
- path: (.+)\.go$
|
||||
text: G704
|
||||
- path: (.+)\.go$
|
||||
text: G706
|
||||
paths:
|
||||
- (^|/)partial_search_test\.go$
|
||||
- ^build/
|
||||
- ^configs/
|
||||
- ^deployments/
|
||||
- ^docs/
|
||||
- ^scripts/
|
||||
- ^internal/core/
|
||||
- ^cmake_build/
|
||||
- ^mmap/
|
||||
- ^data/
|
||||
- ^ci/
|
||||
- ^third_party/
|
||||
- ^builtin/
|
||||
- ^examples/
|
||||
issues:
|
||||
exclude-dirs:
|
||||
- build
|
||||
- configs
|
||||
- deployments
|
||||
- docs
|
||||
- scripts
|
||||
- internal/core
|
||||
- cmake_build
|
||||
- mmap
|
||||
- data
|
||||
- ci
|
||||
exclude-files:
|
||||
- partial_search_test.go
|
||||
exclude-use-default: false
|
||||
exclude-rules:
|
||||
- path: .+_test\.go
|
||||
linters:
|
||||
- forbidigo
|
||||
- path: mocks\/(.)+mock_(.+)\.go
|
||||
text: "don't use an underscore in package name"
|
||||
exclude:
|
||||
- should have a package comment
|
||||
- should have comment
|
||||
- should be of the form
|
||||
- should not use dot imports
|
||||
- which can be annoying to use
|
||||
# Binds to all network interfaces
|
||||
- G102
|
||||
# Use of unsafe calls should be audited
|
||||
- G103
|
||||
# Errors unhandled
|
||||
- G104
|
||||
# file/folder Permission
|
||||
- G301
|
||||
- G302
|
||||
# Potential file inclusion via variable
|
||||
- G304
|
||||
# Deferring unsafe method like *os.File Close
|
||||
- G307
|
||||
# TLS MinVersion too low
|
||||
- G402
|
||||
# Use of weak random number generator math/rand
|
||||
- G404
|
||||
# Unused parameters
|
||||
- SA1019
|
||||
# defer return errors
|
||||
- SA5001
|
||||
# TODO: cleanup following exclusions, added on golangci-lint upgrade
|
||||
- sloppyLen
|
||||
- dupSubExpr
|
||||
- assignOp
|
||||
- ifElseChain
|
||||
- elseif
|
||||
- commentFormatting
|
||||
- exitAfterDefer
|
||||
- captLocal
|
||||
- singleCaseSwitch
|
||||
- typeSwitchVar
|
||||
- indent-error-flow
|
||||
- appendAssign
|
||||
- deprecatedComment
|
||||
- SA9009
|
||||
- SA1006
|
||||
- S1009
|
||||
- offBy1
|
||||
- unslice
|
||||
# Integer overflow conversion
|
||||
- G115
|
||||
|
||||
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
|
||||
max-issues-per-linter: 0
|
||||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
|
||||
max-same-issues: 0
|
||||
|
||||
service:
|
||||
# use the fixed version to not introduce new linters unexpectedly
|
||||
golangci-lint-version: 1.55.2
|
||||
formatters:
|
||||
enable:
|
||||
- gci
|
||||
- gofmt
|
||||
- gofumpt
|
||||
- goimports
|
||||
settings:
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/milvus-io)
|
||||
custom-order: true
|
||||
gofumpt:
|
||||
module-path: github.com/milvus-io
|
||||
goimports:
|
||||
local-prefixes:
|
||||
- github.com/milvus-io
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- (^|/)partial_search_test\.go$
|
||||
- ^build/
|
||||
- ^configs/
|
||||
- ^deployments/
|
||||
- ^docs/
|
||||
- ^scripts/
|
||||
- ^internal/core/
|
||||
- ^cmake_build/
|
||||
- ^mmap/
|
||||
- ^data/
|
||||
- ^ci/
|
||||
- ^third_party/
|
||||
- ^builtin/
|
||||
- ^examples/
|
||||
|
||||
@@ -64,7 +64,7 @@ ifeq ($(MILVUS_FIPS_ENABLED),ON)
|
||||
GOEXPERIMENT_FLAG := GOEXPERIMENT=boringcrypto
|
||||
endif
|
||||
# golangci-lint
|
||||
GOLANGCI_LINT_VERSION := 1.64.7
|
||||
GOLANGCI_LINT_VERSION := 2.11.3
|
||||
GOLANGCI_LINT_OUTPUT := $(shell $(INSTALL_PATH)/golangci-lint --version 2>/dev/null)
|
||||
INSTALL_GOLANGCI_LINT := $(findstring $(GOLANGCI_LINT_VERSION), $(GOLANGCI_LINT_OUTPUT))
|
||||
# mockery
|
||||
@@ -80,7 +80,7 @@ GOFUMPT_VERSION := 0.5.0
|
||||
GOFUMPT_OUTPUT := $(shell $(INSTALL_PATH)/gofumpt --version 2>/dev/null)
|
||||
INSTALL_GOFUMPT := $(findstring $(GOFUMPT_VERSION),$(GOFUMPT_OUTPUT))
|
||||
# gotestsum
|
||||
GOTESTSUM_VERSION := 1.11.0
|
||||
GOTESTSUM_VERSION := 1.13.0
|
||||
GOTESTSUM_OUTPUT := $(shell $(INSTALL_PATH)/gotestsum --version 2>/dev/null)
|
||||
INSTALL_GOTESTSUM := $(findstring $(GOTESTSUM_VERSION),$(GOTESTSUM_OUTPUT))
|
||||
# protoc-gen-go
|
||||
|
||||
@@ -22,7 +22,7 @@ ENV GOPATH /go
|
||||
ENV GOROOT /usr/local/go
|
||||
ENV GO111MODULE on
|
||||
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.24.12.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.25.8.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
|
||||
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
|
||||
go clean --modcache && \
|
||||
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
|
||||
|
||||
@@ -29,7 +29,7 @@ ENV GOPATH /go
|
||||
ENV GOROOT /usr/local/go
|
||||
ENV GO111MODULE on
|
||||
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.24.12.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.25.8.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
|
||||
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
|
||||
go clean --modcache && \
|
||||
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
|
||||
|
||||
@@ -42,7 +42,7 @@ ENV GOPATH /go
|
||||
ENV GOROOT /usr/local/go
|
||||
ENV GO111MODULE on
|
||||
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.24.12.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.25.8.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
|
||||
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
|
||||
go clean --modcache && \
|
||||
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
|
||||
|
||||
@@ -39,7 +39,7 @@ ENV GOPATH /go
|
||||
ENV GOROOT /usr/local/go
|
||||
ENV GO111MODULE on
|
||||
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.24.12.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.25.8.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
|
||||
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
|
||||
go clean --modcache && \
|
||||
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
|
||||
|
||||
@@ -35,7 +35,7 @@ ENV GOPATH /go
|
||||
ENV GOROOT /usr/local/go
|
||||
ENV GO111MODULE on
|
||||
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.24.12.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.25.8.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
|
||||
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
|
||||
go clean --modcache && \
|
||||
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
|
||||
|
||||
@@ -44,9 +44,9 @@ ENV GOPATH /go
|
||||
ENV GOROOT /usr/local/go
|
||||
ENV GO111MODULE on
|
||||
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.24.12.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.25.8.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
|
||||
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOROOT}/bin v1.46.2 && \
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOROOT}/bin v2.11.3 && \
|
||||
# export GO111MODULE=on && go get github.com/quasilyte/go-ruleguard/cmd/ruleguard@v0.2.1 && \
|
||||
go install github.com/ramya-rao-a/go-outline@latest && \
|
||||
go install golang.org/x/tools/gopls@latest && \
|
||||
|
||||
@@ -16,7 +16,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-ce
|
||||
|
||||
|
||||
# Install go
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.24.12.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go
|
||||
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.25.8.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go
|
||||
# Install conan
|
||||
RUN pip3 install conan==1.66.0
|
||||
# Install rust
|
||||
|
||||
+271
-180
@@ -1,192 +1,283 @@
|
||||
version: "2"
|
||||
run:
|
||||
go: "1.22"
|
||||
|
||||
go: "1.25"
|
||||
linters:
|
||||
disable-all: true
|
||||
default: none
|
||||
enable:
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- staticcheck
|
||||
- decorder
|
||||
- depguard
|
||||
- gofmt
|
||||
- goimports
|
||||
- gosec
|
||||
- revive
|
||||
- unconvert
|
||||
- misspell
|
||||
- typecheck
|
||||
- durationcheck
|
||||
- forbidigo
|
||||
- gci
|
||||
- whitespace
|
||||
- gofumpt
|
||||
- gocritic
|
||||
|
||||
linters-settings:
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/milvus-io)
|
||||
custom-order: true
|
||||
gofumpt:
|
||||
module-path: github.com/milvus-io
|
||||
goimports:
|
||||
local-prefixes: github.com/milvus-io
|
||||
revive:
|
||||
- gosec
|
||||
- govet
|
||||
- ineffassign
|
||||
- misspell
|
||||
- revive
|
||||
- staticcheck
|
||||
- unconvert
|
||||
- whitespace
|
||||
settings:
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
deny:
|
||||
- pkg: errors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: github.com/pkg/errors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: github.com/pingcap/errors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: golang.org/x/xerrors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: github.com/go-errors/errors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: io/ioutil
|
||||
desc: ioutil is deprecated after 1.16, 1.17, use os and io package instead
|
||||
- pkg: github.com/tikv/client-go/rawkv
|
||||
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
|
||||
- pkg: github.com/tikv/client-go/v2/rawkv
|
||||
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
|
||||
forbidigo:
|
||||
forbid:
|
||||
- pattern: ^time\.Tick$
|
||||
- pattern: return merr\.Err[a-zA-Z]+
|
||||
- pattern: merr\.Wrap\w+\(\)\.Error\(\)
|
||||
- pattern: '\.(ErrorCode|Reason) = '
|
||||
- pattern: Reason:\s+\w+\.Error\(\)
|
||||
- pattern: errors.New\((.+)\.GetReason\(\)\)
|
||||
- pattern: commonpb\.Status\{[\s\n]*ErrorCode:[\s\n]*.+[\s\S\n]*?\}
|
||||
- pattern: os\.Open\(.+\)
|
||||
- pattern: os\.ReadFile\(.+\)
|
||||
- pattern: os\.WriteFile\(.+\)
|
||||
- pattern: runtime.NumCPU
|
||||
- pattern: runtime.GOMAXPROCS(0)
|
||||
gocritic:
|
||||
enabled-tags: []
|
||||
enabled-checks:
|
||||
- ruleguard
|
||||
settings:
|
||||
ruleguard:
|
||||
rules: ruleguard/rules.go
|
||||
govet:
|
||||
disable:
|
||||
- printf
|
||||
misspell:
|
||||
locale: US
|
||||
revive:
|
||||
rules:
|
||||
- name: unused-parameter
|
||||
disabled: true
|
||||
- name: var-naming
|
||||
arguments:
|
||||
- - ID
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: context-as-argument
|
||||
arguments:
|
||||
- allowTypesBefore: '*testing.T'
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: datarace
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: duplicated-imports
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: waitgroup-by-value
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: indent-error-flow
|
||||
arguments:
|
||||
- preserveScope
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: range-val-in-closure
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: range-val-address
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: string-of-int
|
||||
severity: warning
|
||||
disabled: false
|
||||
exclusions:
|
||||
generated: lax
|
||||
rules:
|
||||
- name: unused-parameter
|
||||
disabled: true
|
||||
- name: var-naming
|
||||
severity: warning
|
||||
disabled: false
|
||||
arguments:
|
||||
- ["ID"] # Allow list
|
||||
- name: context-as-argument
|
||||
severity: warning
|
||||
disabled: false
|
||||
arguments:
|
||||
- allowTypesBefore: "*testing.T"
|
||||
- name: datarace
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: duplicated-imports
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: waitgroup-by-value
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: indent-error-flow
|
||||
severity: warning
|
||||
disabled: false
|
||||
arguments:
|
||||
- "preserveScope"
|
||||
- name: range-val-in-closure
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: range-val-address
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: string-of-int
|
||||
severity: warning
|
||||
disabled: false
|
||||
misspell:
|
||||
locale: US
|
||||
gocritic:
|
||||
enabled-checks:
|
||||
- ruleguard
|
||||
settings:
|
||||
ruleguard:
|
||||
failOnError: true
|
||||
rules: "ruleguard/rules.go"
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
deny:
|
||||
- pkg: "errors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "github.com/pkg/errors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "github.com/pingcap/errors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "golang.org/x/xerrors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "github.com/go-errors/errors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "io/ioutil"
|
||||
desc: ioutil is deprecated after 1.16, 1.17, use os and io package instead
|
||||
- pkg: "github.com/tikv/client-go/rawkv"
|
||||
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
|
||||
- pkg: "github.com/tikv/client-go/v2/rawkv"
|
||||
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
|
||||
forbidigo:
|
||||
forbid:
|
||||
- '^time\.Tick$'
|
||||
- 'return merr\.Err[a-zA-Z]+'
|
||||
- 'merr\.Wrap\w+\(\)\.Error\(\)'
|
||||
- '\.(ErrorCode|Reason) = '
|
||||
- 'Reason:\s+\w+\.Error\(\)'
|
||||
- 'errors.New\((.+)\.GetReason\(\)\)'
|
||||
- 'commonpb\.Status\{[\s\n]*ErrorCode:[\s\n]*.+[\s\S\n]*?\}'
|
||||
- 'os\.Open\(.+\)'
|
||||
- 'os\.ReadFile\(.+\)'
|
||||
- 'os\.WriteFile\(.+\)'
|
||||
- "runtime.NumCPU"
|
||||
- "runtime.GOMAXPROCS(0)"
|
||||
#- 'fmt\.Print.*' WIP
|
||||
|
||||
- linters:
|
||||
- forbidigo
|
||||
path: .+_test\.go
|
||||
- path: (.+)\.go$
|
||||
text: should have a package comment
|
||||
- path: (.+)\.go$
|
||||
text: should have comment
|
||||
- path: (.+)\.go$
|
||||
text: should be of the form
|
||||
- path: (.+)\.go$
|
||||
text: should not use dot imports
|
||||
- path: (.+)\.go$
|
||||
text: which can be annoying to use
|
||||
- path: (.+)\.go$
|
||||
text: G102
|
||||
- path: (.+)\.go$
|
||||
text: G103
|
||||
- path: (.+)\.go$
|
||||
text: G104
|
||||
- path: (.+)\.go$
|
||||
text: G301
|
||||
- path: (.+)\.go$
|
||||
text: G302
|
||||
- path: (.+)\.go$
|
||||
text: G304
|
||||
- path: (.+)\.go$
|
||||
text: G307
|
||||
- path: (.+)\.go$
|
||||
text: G402
|
||||
- path: (.+)\.go$
|
||||
text: G404
|
||||
- path: (.+)\.go$
|
||||
text: SA1019
|
||||
- path: (.+)\.go$
|
||||
text: SA5001
|
||||
- path: (.+)\.go$
|
||||
text: sloppyLen
|
||||
- path: (.+)\.go$
|
||||
text: dupSubExpr
|
||||
- path: (.+)\.go$
|
||||
text: assignOp
|
||||
- path: (.+)\.go$
|
||||
text: ifElseChain
|
||||
- path: (.+)\.go$
|
||||
text: elseif
|
||||
- path: (.+)\.go$
|
||||
text: commentFormatting
|
||||
- path: (.+)\.go$
|
||||
text: exitAfterDefer
|
||||
- path: (.+)\.go$
|
||||
text: captLocal
|
||||
- path: (.+)\.go$
|
||||
text: singleCaseSwitch
|
||||
- path: (.+)\.go$
|
||||
text: typeSwitchVar
|
||||
- path: (.+)\.go$
|
||||
text: indent-error-flow
|
||||
- path: (.+)\.go$
|
||||
text: appendAssign
|
||||
- path: (.+)\.go$
|
||||
text: deprecatedComment
|
||||
- path: (.+)\.go$
|
||||
text: SA9009
|
||||
- path: (.+)\.go$
|
||||
text: SA1006
|
||||
- path: (.+)\.go$
|
||||
text: S1009
|
||||
- path: (.+)\.go$
|
||||
text: offBy1
|
||||
- path: (.+)\.go$
|
||||
text: unslice
|
||||
- path: (.+)\.go$
|
||||
text: G115
|
||||
# TODO: cleanup following exclusions, added on golangci-lint v2 upgrade
|
||||
# staticcheck quick-fix suggestions (QF)
|
||||
- path: (.+)\.go$
|
||||
text: QF1001
|
||||
- path: (.+)\.go$
|
||||
text: QF1003
|
||||
- path: (.+)\.go$
|
||||
text: QF1005
|
||||
- path: (.+)\.go$
|
||||
text: QF1006
|
||||
- path: (.+)\.go$
|
||||
text: QF1007
|
||||
- path: (.+)\.go$
|
||||
text: QF1008
|
||||
- path: (.+)\.go$
|
||||
text: QF1011
|
||||
- path: (.+)\.go$
|
||||
text: QF1012
|
||||
# staticcheck style checks (ST)
|
||||
- path: (.+)\.go$
|
||||
text: ST1005
|
||||
- path: (.+)\.go$
|
||||
text: ST1008
|
||||
- path: (.+)\.go$
|
||||
text: ST1011
|
||||
- path: (.+)\.go$
|
||||
text: ST1023
|
||||
# gosec rules not enforced in v1 (G602 slice bounds, G101 hardcoded credentials)
|
||||
- path: (.+)\.go$
|
||||
text: G602
|
||||
- path: (.+)\.go$
|
||||
text: G101
|
||||
# staticcheck SA4006 (assigned value never used) — not enforced in v1
|
||||
- path: (.+)\.go$
|
||||
text: SA4006
|
||||
# whitespace trailing newline — not enforced strictly in v1
|
||||
- path: (.+)\.go$
|
||||
linters:
|
||||
- whitespace
|
||||
text: unnecessary trailing newline
|
||||
# gosec new rules (introduced in gosec v2.23+, not present in golangci-lint v1)
|
||||
- path: (.+)\.go$
|
||||
text: G117
|
||||
- path: (.+)\.go$
|
||||
text: G118
|
||||
- path: (.+)\.go$
|
||||
text: G120
|
||||
- path: (.+)\.go$
|
||||
text: G702
|
||||
- path: (.+)\.go$
|
||||
text: G703
|
||||
- path: (.+)\.go$
|
||||
text: G705
|
||||
- path: (.+)\.go$
|
||||
text: G704
|
||||
- path: (.+)\.go$
|
||||
text: G706
|
||||
paths:
|
||||
- (^|/)partial_search_test\.go$
|
||||
- ^build/
|
||||
- ^configs/
|
||||
- ^deployments/
|
||||
- ^docs/
|
||||
- ^scripts/
|
||||
- ^internal/core/
|
||||
- ^cmake_build/
|
||||
- ^third_party/
|
||||
- ^builtin/
|
||||
- ^examples/
|
||||
issues:
|
||||
exclude-dirs:
|
||||
- build
|
||||
- configs
|
||||
- deployments
|
||||
- docs
|
||||
- scripts
|
||||
- internal/core
|
||||
- cmake_build
|
||||
exclude-files:
|
||||
- partial_search_test.go
|
||||
exclude-use-default: false
|
||||
exclude-rules:
|
||||
- path: .+_test\.go
|
||||
linters:
|
||||
- forbidigo
|
||||
exclude:
|
||||
- should have a package comment
|
||||
- should have comment
|
||||
- should be of the form
|
||||
- should not use dot imports
|
||||
- which can be annoying to use
|
||||
# Binds to all network interfaces
|
||||
- G102
|
||||
# Use of unsafe calls should be audited
|
||||
- G103
|
||||
# Errors unhandled
|
||||
- G104
|
||||
# file/folder Permission
|
||||
- G301
|
||||
- G302
|
||||
# Potential file inclusion via variable
|
||||
- G304
|
||||
# Deferring unsafe method like *os.File Close
|
||||
- G307
|
||||
# TLS MinVersion too low
|
||||
- G402
|
||||
# Use of weak random number generator math/rand
|
||||
- G404
|
||||
# Unused parameters
|
||||
- SA1019
|
||||
# defer return errors
|
||||
- SA5001
|
||||
# TODO: cleanup following exclusions, added on golangci-lint upgrade
|
||||
- sloppyLen
|
||||
- dupSubExpr
|
||||
- assignOp
|
||||
- ifElseChain
|
||||
- elseif
|
||||
- commentFormatting
|
||||
- exitAfterDefer
|
||||
- captLocal
|
||||
- singleCaseSwitch
|
||||
- typeSwitchVar
|
||||
- indent-error-flow
|
||||
- appendAssign
|
||||
- deprecatedComment
|
||||
- SA9009
|
||||
- SA1006
|
||||
- S1009
|
||||
- offBy1
|
||||
- unslice
|
||||
# Integer overflow conversion
|
||||
- G115
|
||||
|
||||
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
|
||||
max-issues-per-linter: 0
|
||||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
|
||||
max-same-issues: 0
|
||||
|
||||
service:
|
||||
# use the fixed version to not introduce new linters unexpectedly
|
||||
golangci-lint-version: 1.55.2
|
||||
formatters:
|
||||
enable:
|
||||
- gci
|
||||
- gofmt
|
||||
- gofumpt
|
||||
- goimports
|
||||
settings:
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/milvus-io)
|
||||
custom-order: true
|
||||
gofumpt:
|
||||
module-path: github.com/milvus-io
|
||||
goimports:
|
||||
local-prefixes:
|
||||
- github.com/milvus-io
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- (^|/)partial_search_test\.go$
|
||||
- ^build/
|
||||
- ^configs/
|
||||
- ^deployments/
|
||||
- ^docs/
|
||||
- ^scripts/
|
||||
- ^internal/core/
|
||||
- ^cmake_build/
|
||||
- ^third_party/
|
||||
- ^builtin/
|
||||
- ^examples/
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
module github.com/milvus-io/milvus/client/v2
|
||||
|
||||
go 1.24.12
|
||||
go 1.25.8
|
||||
|
||||
require (
|
||||
github.com/blang/semver/v4 v4.0.0
|
||||
|
||||
+1
-1
@@ -164,7 +164,7 @@ minio:
|
||||
useVirtualHost: false # Whether use virtual host mode for bucket. WARNING: For Aliyun OSS and Tencent COS, this parameter is useless and is set to true by default
|
||||
requestTimeoutMs: 10000 # minio timeout for request time in milliseconds
|
||||
# The maximum number of objects requested per batch in minio ListObjects rpc,
|
||||
# 0 means using oss client by default, decrease these configration if ListObjects timeout
|
||||
# 0 means using oss client by default, decrease these configuration if ListObjects timeout
|
||||
listObjectsMaxKeys: 0
|
||||
|
||||
# Milvus supports four message queues (MQ): rocksmq (based on RocksDB), Pulsar, Kafka, and Woodpecker.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module github.com/milvus-io/milvus/examples/telemetry_demo
|
||||
|
||||
go 1.24.11
|
||||
go 1.25.8
|
||||
|
||||
toolchain go1.24.12
|
||||
toolchain go1.25.8
|
||||
|
||||
require github.com/milvus-io/milvus/client/v2 v2.6.4-0.20251104142533-a2ce70d25256
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
module github.com/milvus-io/milvus/examples/telemetry_e2e_test
|
||||
|
||||
go 1.24.12
|
||||
go 1.25.8
|
||||
|
||||
require (
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20260304062516-e7e54d966ef2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module github.com/milvus-io/milvus
|
||||
|
||||
go 1.24.12
|
||||
go 1.25.8
|
||||
|
||||
require (
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
module github.com/milvus-io/milvus/pkg/v2
|
||||
|
||||
go 1.24.12
|
||||
go 1.25.8
|
||||
|
||||
require (
|
||||
cloud.google.com/go/storage v1.50.0
|
||||
|
||||
@@ -6853,7 +6853,7 @@ type streamingConfig struct {
|
||||
// Old version message lastConfirmedMessageID window size
|
||||
OldVersionLastConfirmedWindowSize ParamItem `refreshable:"true"`
|
||||
|
||||
// Empty TimeTick Filtering configration
|
||||
// Empty TimeTick Filtering configuration
|
||||
DelegatorEmptyTimeTickMaxFilterInterval ParamItem `refreshable:"true"`
|
||||
FlushEmptyTimeTickMaxFilterInterval ParamItem `refreshable:"true"`
|
||||
|
||||
|
||||
@@ -1709,7 +1709,7 @@ Leave it empty if you want to use AWS default endpoint`,
|
||||
Version: "2.4.1",
|
||||
DefaultValue: "0",
|
||||
Doc: `The maximum number of objects requested per batch in minio ListObjects rpc,
|
||||
0 means using oss client by default, decrease these configration if ListObjects timeout`,
|
||||
0 means using oss client by default, decrease these configuration if ListObjects timeout`,
|
||||
Export: true,
|
||||
}
|
||||
p.ListObjectsMaxKeys.Init(base.mgr)
|
||||
|
||||
@@ -25,10 +25,11 @@ echo "Building plan parser shared library (${OS}, .${EXT}) ..."
|
||||
|
||||
go env -w CGO_ENABLED="1"
|
||||
|
||||
# Build Go c-shared library
|
||||
# Build Go c-shared library using package path (not file path) to ensure
|
||||
# proper module dependency resolution in all build environments.
|
||||
GO111MODULE=on go build -buildmode=c-shared \
|
||||
-o "${OUTPUT_LIB}/libmilvus-planparser.${EXT}" \
|
||||
"${CWRAPPER_DIR}/wrapper.go"
|
||||
./internal/parser/planparserv2/cwrapper
|
||||
|
||||
# Fix install name on macOS so dependent libraries can find it via @loader_path
|
||||
if [[ "${OS}" == "Darwin" ]]; then
|
||||
|
||||
+272
-180
@@ -1,192 +1,284 @@
|
||||
version: "2"
|
||||
run:
|
||||
go: "1.22"
|
||||
|
||||
go: "1.25"
|
||||
linters:
|
||||
disable-all: true
|
||||
default: none
|
||||
enable:
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- staticcheck
|
||||
- decorder
|
||||
- depguard
|
||||
- gofmt
|
||||
- goimports
|
||||
- gosec
|
||||
- revive
|
||||
- unconvert
|
||||
- misspell
|
||||
- typecheck
|
||||
- durationcheck
|
||||
- forbidigo
|
||||
- gci
|
||||
- whitespace
|
||||
- gofumpt
|
||||
- gocritic
|
||||
|
||||
linters-settings:
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/milvus-io)
|
||||
custom-order: true
|
||||
gofumpt:
|
||||
module-path: github.com/milvus-io
|
||||
goimports:
|
||||
local-prefixes: github.com/milvus-io
|
||||
revive:
|
||||
- gosec
|
||||
- govet
|
||||
- ineffassign
|
||||
- misspell
|
||||
- revive
|
||||
- staticcheck
|
||||
- unconvert
|
||||
- whitespace
|
||||
settings:
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
deny:
|
||||
- pkg: errors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: github.com/pkg/errors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: github.com/pingcap/errors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: golang.org/x/xerrors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: github.com/go-errors/errors
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: io/ioutil
|
||||
desc: ioutil is deprecated after 1.16, 1.17, use os and io package instead
|
||||
- pkg: github.com/tikv/client-go/rawkv
|
||||
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
|
||||
- pkg: github.com/tikv/client-go/v2/rawkv
|
||||
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
|
||||
forbidigo:
|
||||
forbid:
|
||||
- pattern: ^time\.Tick$
|
||||
- pattern: return merr\.Err[a-zA-Z]+
|
||||
- pattern: merr\.Wrap\w+\(\)\.Error\(\)
|
||||
- pattern: '\.(ErrorCode|Reason) = '
|
||||
- pattern: Reason:\s+\w+\.Error\(\)
|
||||
- pattern: errors.New\((.+)\.GetReason\(\)\)
|
||||
- pattern: commonpb\.Status\{[\s\n]*ErrorCode:[\s\n]*.+[\s\S\n]*?\}
|
||||
- pattern: os\.Open\(.+\)
|
||||
- pattern: os\.ReadFile\(.+\)
|
||||
- pattern: os\.WriteFile\(.+\)
|
||||
- pattern: runtime.NumCPU
|
||||
- pattern: runtime.GOMAXPROCS(0)
|
||||
gocritic:
|
||||
enabled-tags: []
|
||||
enabled-checks:
|
||||
- ruleguard
|
||||
settings:
|
||||
ruleguard:
|
||||
rules: ruleguard/rules.go
|
||||
govet:
|
||||
disable:
|
||||
# TODO: re-enable printf after investigating false positives with Go 1.25 + golangci-lint v2
|
||||
- printf
|
||||
misspell:
|
||||
locale: US
|
||||
revive:
|
||||
rules:
|
||||
- name: unused-parameter
|
||||
disabled: true
|
||||
- name: var-naming
|
||||
arguments:
|
||||
- - ID
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: context-as-argument
|
||||
arguments:
|
||||
- allowTypesBefore: '*testing.T'
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: datarace
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: duplicated-imports
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: waitgroup-by-value
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: indent-error-flow
|
||||
arguments:
|
||||
- preserveScope
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: range-val-in-closure
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: range-val-address
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: string-of-int
|
||||
severity: warning
|
||||
disabled: false
|
||||
exclusions:
|
||||
generated: lax
|
||||
rules:
|
||||
- name: unused-parameter
|
||||
disabled: true
|
||||
- name: var-naming
|
||||
severity: warning
|
||||
disabled: false
|
||||
arguments:
|
||||
- ["ID"] # Allow list
|
||||
- name: context-as-argument
|
||||
severity: warning
|
||||
disabled: false
|
||||
arguments:
|
||||
- allowTypesBefore: "*testing.T"
|
||||
- name: datarace
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: duplicated-imports
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: waitgroup-by-value
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: indent-error-flow
|
||||
severity: warning
|
||||
disabled: false
|
||||
arguments:
|
||||
- "preserveScope"
|
||||
- name: range-val-in-closure
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: range-val-address
|
||||
severity: warning
|
||||
disabled: false
|
||||
- name: string-of-int
|
||||
severity: warning
|
||||
disabled: false
|
||||
misspell:
|
||||
locale: US
|
||||
gocritic:
|
||||
enabled-checks:
|
||||
- ruleguard
|
||||
settings:
|
||||
ruleguard:
|
||||
failOnError: true
|
||||
rules: "ruleguard/rules.go"
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
deny:
|
||||
- pkg: "errors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "github.com/pkg/errors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "github.com/pingcap/errors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "golang.org/x/xerrors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "github.com/go-errors/errors"
|
||||
desc: not allowed, use github.com/cockroachdb/errors
|
||||
- pkg: "io/ioutil"
|
||||
desc: ioutil is deprecated after 1.16, 1.17, use os and io package instead
|
||||
- pkg: "github.com/tikv/client-go/rawkv"
|
||||
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
|
||||
- pkg: "github.com/tikv/client-go/v2/rawkv"
|
||||
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
|
||||
forbidigo:
|
||||
forbid:
|
||||
- '^time\.Tick$'
|
||||
- 'return merr\.Err[a-zA-Z]+'
|
||||
- 'merr\.Wrap\w+\(\)\.Error\(\)'
|
||||
- '\.(ErrorCode|Reason) = '
|
||||
- 'Reason:\s+\w+\.Error\(\)'
|
||||
- 'errors.New\((.+)\.GetReason\(\)\)'
|
||||
- 'commonpb\.Status\{[\s\n]*ErrorCode:[\s\n]*.+[\s\S\n]*?\}'
|
||||
- 'os\.Open\(.+\)'
|
||||
- 'os\.ReadFile\(.+\)'
|
||||
- 'os\.WriteFile\(.+\)'
|
||||
- "runtime.NumCPU"
|
||||
- "runtime.GOMAXPROCS(0)"
|
||||
#- 'fmt\.Print.*' WIP
|
||||
|
||||
- linters:
|
||||
- forbidigo
|
||||
path: .+_test\.go
|
||||
- path: (.+)\.go$
|
||||
text: should have a package comment
|
||||
- path: (.+)\.go$
|
||||
text: should have comment
|
||||
- path: (.+)\.go$
|
||||
text: should be of the form
|
||||
- path: (.+)\.go$
|
||||
text: should not use dot imports
|
||||
- path: (.+)\.go$
|
||||
text: which can be annoying to use
|
||||
- path: (.+)\.go$
|
||||
text: G102
|
||||
- path: (.+)\.go$
|
||||
text: G103
|
||||
- path: (.+)\.go$
|
||||
text: G104
|
||||
- path: (.+)\.go$
|
||||
text: G301
|
||||
- path: (.+)\.go$
|
||||
text: G302
|
||||
- path: (.+)\.go$
|
||||
text: G304
|
||||
- path: (.+)\.go$
|
||||
text: G307
|
||||
- path: (.+)\.go$
|
||||
text: G402
|
||||
- path: (.+)\.go$
|
||||
text: G404
|
||||
- path: (.+)\.go$
|
||||
text: SA1019
|
||||
- path: (.+)\.go$
|
||||
text: SA5001
|
||||
- path: (.+)\.go$
|
||||
text: sloppyLen
|
||||
- path: (.+)\.go$
|
||||
text: dupSubExpr
|
||||
- path: (.+)\.go$
|
||||
text: assignOp
|
||||
- path: (.+)\.go$
|
||||
text: ifElseChain
|
||||
- path: (.+)\.go$
|
||||
text: elseif
|
||||
- path: (.+)\.go$
|
||||
text: commentFormatting
|
||||
- path: (.+)\.go$
|
||||
text: exitAfterDefer
|
||||
- path: (.+)\.go$
|
||||
text: captLocal
|
||||
- path: (.+)\.go$
|
||||
text: singleCaseSwitch
|
||||
- path: (.+)\.go$
|
||||
text: typeSwitchVar
|
||||
- path: (.+)\.go$
|
||||
text: indent-error-flow
|
||||
- path: (.+)\.go$
|
||||
text: appendAssign
|
||||
- path: (.+)\.go$
|
||||
text: deprecatedComment
|
||||
- path: (.+)\.go$
|
||||
text: SA9009
|
||||
- path: (.+)\.go$
|
||||
text: SA1006
|
||||
- path: (.+)\.go$
|
||||
text: S1009
|
||||
- path: (.+)\.go$
|
||||
text: offBy1
|
||||
- path: (.+)\.go$
|
||||
text: unslice
|
||||
- path: (.+)\.go$
|
||||
text: G115
|
||||
# TODO: cleanup following exclusions, added on golangci-lint v2 upgrade
|
||||
# staticcheck quick-fix suggestions (QF)
|
||||
- path: (.+)\.go$
|
||||
text: QF1001
|
||||
- path: (.+)\.go$
|
||||
text: QF1003
|
||||
- path: (.+)\.go$
|
||||
text: QF1005
|
||||
- path: (.+)\.go$
|
||||
text: QF1006
|
||||
- path: (.+)\.go$
|
||||
text: QF1007
|
||||
- path: (.+)\.go$
|
||||
text: QF1008
|
||||
- path: (.+)\.go$
|
||||
text: QF1011
|
||||
- path: (.+)\.go$
|
||||
text: QF1012
|
||||
# staticcheck style checks (ST)
|
||||
- path: (.+)\.go$
|
||||
text: ST1005
|
||||
- path: (.+)\.go$
|
||||
text: ST1008
|
||||
- path: (.+)\.go$
|
||||
text: ST1011
|
||||
- path: (.+)\.go$
|
||||
text: ST1023
|
||||
# gosec rules not enforced in v1 (G602 slice bounds, G101 hardcoded credentials)
|
||||
- path: (.+)\.go$
|
||||
text: G602
|
||||
- path: (.+)\.go$
|
||||
text: G101
|
||||
# staticcheck SA4006 (assigned value never used) — not enforced in v1
|
||||
- path: (.+)\.go$
|
||||
text: SA4006
|
||||
# whitespace trailing newline — not enforced strictly in v1
|
||||
- path: (.+)\.go$
|
||||
linters:
|
||||
- whitespace
|
||||
text: unnecessary trailing newline
|
||||
# gosec new rules (introduced in gosec v2.23+, not present in golangci-lint v1)
|
||||
- path: (.+)\.go$
|
||||
text: G117
|
||||
- path: (.+)\.go$
|
||||
text: G118
|
||||
- path: (.+)\.go$
|
||||
text: G120
|
||||
- path: (.+)\.go$
|
||||
text: G702
|
||||
- path: (.+)\.go$
|
||||
text: G703
|
||||
- path: (.+)\.go$
|
||||
text: G704
|
||||
- path: (.+)\.go$
|
||||
text: G705
|
||||
- path: (.+)\.go$
|
||||
text: G706
|
||||
paths:
|
||||
- (^|/)partial_search_test\.go$
|
||||
- ^build/
|
||||
- ^configs/
|
||||
- ^deployments/
|
||||
- ^docs/
|
||||
- ^scripts/
|
||||
- ^internal/core/
|
||||
- ^cmake_build/
|
||||
- ^third_party/
|
||||
- ^builtin/
|
||||
- ^examples/
|
||||
issues:
|
||||
exclude-dirs:
|
||||
- build
|
||||
- configs
|
||||
- deployments
|
||||
- docs
|
||||
- scripts
|
||||
- internal/core
|
||||
- cmake_build
|
||||
exclude-files:
|
||||
- partial_search_test.go
|
||||
exclude-use-default: false
|
||||
exclude-rules:
|
||||
- path: .+_test\.go
|
||||
linters:
|
||||
- forbidigo
|
||||
exclude:
|
||||
- should have a package comment
|
||||
- should have comment
|
||||
- should be of the form
|
||||
- should not use dot imports
|
||||
- which can be annoying to use
|
||||
# Binds to all network interfaces
|
||||
- G102
|
||||
# Use of unsafe calls should be audited
|
||||
- G103
|
||||
# Errors unhandled
|
||||
- G104
|
||||
# file/folder Permission
|
||||
- G301
|
||||
- G302
|
||||
# Potential file inclusion via variable
|
||||
- G304
|
||||
# Deferring unsafe method like *os.File Close
|
||||
- G307
|
||||
# TLS MinVersion too low
|
||||
- G402
|
||||
# Use of weak random number generator math/rand
|
||||
- G404
|
||||
# Unused parameters
|
||||
- SA1019
|
||||
# defer return errors
|
||||
- SA5001
|
||||
# TODO: cleanup following exclusions, added on golangci-lint upgrade
|
||||
- sloppyLen
|
||||
- dupSubExpr
|
||||
- assignOp
|
||||
- ifElseChain
|
||||
- elseif
|
||||
- commentFormatting
|
||||
- exitAfterDefer
|
||||
- captLocal
|
||||
- singleCaseSwitch
|
||||
- typeSwitchVar
|
||||
- indent-error-flow
|
||||
- appendAssign
|
||||
- deprecatedComment
|
||||
- SA9009
|
||||
- SA1006
|
||||
- S1009
|
||||
- offBy1
|
||||
- unslice
|
||||
# Integer overflow conversion
|
||||
- G115
|
||||
|
||||
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
|
||||
max-issues-per-linter: 0
|
||||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
|
||||
max-same-issues: 0
|
||||
|
||||
service:
|
||||
# use the fixed version to not introduce new linters unexpectedly
|
||||
golangci-lint-version: 1.55.2
|
||||
formatters:
|
||||
enable:
|
||||
- gci
|
||||
- gofmt
|
||||
- gofumpt
|
||||
- goimports
|
||||
settings:
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/milvus-io)
|
||||
custom-order: true
|
||||
gofumpt:
|
||||
module-path: github.com/milvus-io
|
||||
goimports:
|
||||
local-prefixes:
|
||||
- github.com/milvus-io
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- (^|/)partial_search_test\.go$
|
||||
- ^build/
|
||||
- ^configs/
|
||||
- ^deployments/
|
||||
- ^docs/
|
||||
- ^scripts/
|
||||
- ^internal/core/
|
||||
- ^cmake_build/
|
||||
- ^third_party/
|
||||
- ^builtin/
|
||||
- ^examples/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.24.12 as builder
|
||||
FROM golang:1.25.8 as builder
|
||||
|
||||
# Define a build argument with an empty default value
|
||||
ARG CUSTOM_GOPROXY=""
|
||||
@@ -6,7 +6,7 @@ ARG CUSTOM_GOPROXY=""
|
||||
# Set the GOPROXY environment variable, using the specified value if provided, or a default if not
|
||||
ENV GOPROXY=${CUSTOM_GOPROXY:-https://proxy.golang.org}
|
||||
|
||||
RUN go install gotest.tools/gotestsum@v1.12.0
|
||||
RUN go install gotest.tools/gotestsum@v1.13.0
|
||||
|
||||
# Set the Current Working Directory inside the container
|
||||
WORKDIR /milvus
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module github.com/milvus-io/milvus/tests/go_client
|
||||
|
||||
go 1.24.12
|
||||
go 1.25.8
|
||||
|
||||
require (
|
||||
github.com/apache/arrow/go/v17 v17.0.0
|
||||
|
||||
@@ -13,7 +13,7 @@ The framework allows developers to:
|
||||
- Execute end-to-end test scenarios
|
||||
- Execute the method of any component from its client
|
||||
- Simulate component failures and recovery
|
||||
- Modify the milvus configration at runtime or startup
|
||||
- Modify the milvus configuration at runtime or startup
|
||||
|
||||
The test framework is built on top of Go's testing package and the testify/suite framework, making it easy to write structured and maintainable integration tests.
|
||||
|
||||
@@ -119,7 +119,7 @@ Some utility methods are provided in `MiniClusterSuite` to interact with the clu
|
||||
|
||||
#### method of `MiniClusterV3`
|
||||
|
||||
- Use `s.Cluster.MustModifyMilvusConfig` to modify the milvus configuration at runtime, it will return a guard function to restore the modified configuration. It doesn't promise that the configuration will be applied immediately, milvus may not support the dynamic configuration change for some configurations or some configration may be applied slowly.
|
||||
- Use `s.Cluster.MustModifyMilvusConfig` to modify the milvus configuration at runtime, it will return a guard function to restore the modified configuration. It doesn't promise that the configuration will be applied immediately, milvus may not support the dynamic configuration change for some configurations or some configuration may be applied slowly.
|
||||
- Use `s.Cluster.Add*` to add components to the cluster, such as `AddMixCoord`, `AddProxy`, `AddDataNode`, `AddQueryNode`, `AddStreamingNode`. it will return the `MilvusProcess` object to manage the lifetime of new incoming component. It will block until the component is healthy by default, use `WithoutWaitForReady` option to avoid it.
|
||||
- Use `s.Cluster.Default*` to get the default component, such as `DefaultMixCoord`, `DefaultProxy`, `DefaultDataNode`, `DefaultQueryNode`, `DefaultStreamingNode`.
|
||||
- Use `s.*Client` to get the grpc client of the default component that can be got from `s.Cluster.Default*`, such as `s.MixCoordClient`, `s.ProxyClient`, `s.DataNodeClient`, `s.QueryNodeClient`, `s.StreamingNodeClient`.
|
||||
|
||||
@@ -234,7 +234,7 @@ func (c *MiniClusterV3) initInternalClient() {
|
||||
// ModifyMilvusConfig modifies the milvus config.
|
||||
// Meanwhile it will return a guard function to revert the config into default.
|
||||
// It doesn't promise that the configuration will be applied immediately,
|
||||
// milvus may not support the dynamic configuration change for some configurations or some configration may be applied slowly.
|
||||
// milvus may not support the dynamic configuration change for some configurations or some configuration may be applied slowly.
|
||||
// If you want to ensure the config is applied, you should restart the target component or wait it to be ready.
|
||||
func (c *MiniClusterV3) MustModifyMilvusConfig(kvs map[string]string) func() {
|
||||
keys := make([]string, 0, len(kvs))
|
||||
|
||||
Reference in New Issue
Block a user