Compare commits

...

3 Commits

Author SHA1 Message Date
cai.zhang
eb81e6ed01
fix: Fix setting default value for geometry by restful (#46058)
issue: #46056

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-03 23:27:11 +08:00
sre-ci-robot
dd36ffa92d
[automated] Bump milvus version to v2.6.7 (#46059)
Bump milvus version to v2.6.7
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-03 22:15:10 +08:00
congqixia
0171511d42
enhance: Bump go version to 1.24.11 fixing CVE (#46034)
Related to CVE-2025-61729

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-12-03 16:11:11 +08:00
20 changed files with 32 additions and 34 deletions

View File

@ -78,7 +78,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: '1.24.9'
go-version: '1.24.11'
cache: false
- name: Download Caches
uses: ./.github/actions/macos-cache-restore

View File

@ -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.9.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.24.11.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)

View File

@ -27,7 +27,7 @@ RUN dnf -y update && \
RUN pip3 install conan==1.64.1
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.24.9.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.24.11.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain=1.89 -y

View File

@ -33,7 +33,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.9.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.24.11.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)

View File

@ -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.9.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.24.11.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)

View File

@ -44,7 +44,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.9.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.24.11.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 && \
# export GO111MODULE=on && go get github.com/quasilyte/go-ruleguard/cmd/ruleguard@v0.2.1 && \

View File

@ -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.9.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.24.11.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go
# Install conan
RUN pip3 install conan==1.64.1
# Install rust

View File

@ -10,7 +10,7 @@ Go MilvusClient for [Milvus](https://github.com/milvus-io/milvus). To contribute
### Prerequisites
Go 1.24.9 or higher
Go 1.24.11 or higher
### Install Milvus Go SDK

View File

@ -1,6 +1,6 @@
module github.com/milvus-io/milvus/client/v2
go 1.24.9
go 1.24.11
require (
github.com/blang/semver/v4 v4.0.0

View File

@ -30,7 +30,7 @@ $ ./minio server /minio
To start Milvus standalone, you need a Milvus binary file. Currently you can get the latest version of Milvus binary file through the Milvus docker image. (We will upload Milvus binary files in the future)
```shell
$ docker run -d --name milvus milvusdb/milvus:v2.6.6 /bin/bash
$ docker run -d --name milvus milvusdb/milvus:v2.6.7 /bin/bash
$ docker cp milvus:/milvus .
```

View File

@ -33,7 +33,7 @@ dependencies_network= host
nodes_network= host
; Setup varibale to controll what image version of Milvus to use.
image= milvusdb/milvus:v2.6.6
image= milvusdb/milvus:v2.6.7
; Setup static IP addresses of the docker hosts as variable for container environment variable config.
; Before running the playbook, below 4 IP addresses need to be replaced with the IP of your host VM

View File

@ -38,7 +38,7 @@ services:
standalone:
container_name: milvus-standalone
image: milvusdb/milvus:v2.6.6-gpu
image: milvusdb/milvus:v2.6.7-gpu
command: ["milvus", "run", "standalone"]
security_opt:
- seccomp:unconfined

View File

@ -38,7 +38,7 @@ services:
standalone:
container_name: milvus-standalone
image: milvusdb/milvus:v2.6.6
image: milvusdb/milvus:v2.6.7
command: ["milvus", "run", "standalone"]
security_opt:
- seccomp:unconfined

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/milvus-io/milvus
go 1.24.9
go 1.24.11
require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1

View File

@ -1725,6 +1725,18 @@ func convertDefaultValue(value interface{}, dataType schemapb.DataType) (*schema
}
return data, nil
case schemapb.DataType_Geometry:
v, ok := value.(string)
if !ok {
return nil, merr.WrapErrParameterInvalidMsg(`cannot use "%v"(type: %T) as geometry default value`, value, value)
}
data := &schemapb.ValueField{
Data: &schemapb.ValueField_StringData{
StringData: v,
},
}
return data, nil
case schemapb.DataType_String, schemapb.DataType_VarChar:
v, ok := value.(string)
if !ok {

View File

@ -7,7 +7,6 @@ import (
"github.com/samber/lo"
"github.com/twpayne/go-geom/encoding/wkb"
"github.com/twpayne/go-geom/encoding/wkbcommon"
"github.com/twpayne/go-geom/encoding/wkt"
"go.uber.org/zap"
@ -848,16 +847,11 @@ func (v *validateUtil) checkGeometryFieldData(field *schemapb.FieldData, fieldSc
msg := fmt.Sprintf("geometry field '%v' is illegal, array type mismatch", field.GetFieldName())
return merr.WrapErrParameterInvalid("need geometry array", "got nil", msg)
}
var err error
for index, wktdata := range geometryArray {
// ignore parsed geom, the check is during insert task pre execute,so geo data became wkb
// fmt.Println(strings.Trim(string(wktdata), "\""))
geomT, err := wkt.Unmarshal(wktdata)
if err != nil {
log.Warn("insert invalid Geometry data!! The wkt data has errors", zap.Error(err))
return merr.WrapErrIoFailedReason(err.Error())
}
wkbArray[index], err = wkb.Marshal(geomT, wkb.NDR, wkbcommon.WKBOptionEmptyPointHandling(wkbcommon.EmptyPointHandlingNaN))
wkbArray[index], err = common.ConvertWKTToWKB(wktdata)
if err != nil {
log.Warn("insert invalid Geometry data!! Transform to wkb failed, has errors", zap.Error(err))
return merr.WrapErrIoFailedReason(err.Error())

View File

@ -22,8 +22,6 @@ import (
"strconv"
"github.com/cockroachdb/errors"
"github.com/twpayne/go-geom/encoding/wkb"
"github.com/twpayne/go-geom/encoding/wkt"
"go.uber.org/zap"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
@ -140,13 +138,7 @@ func (t *createCollectionTask) checkMaxCollectionsPerDB(ctx context.Context, db2
}
func checkGeometryDefaultValue(value string) error {
geomT, err := wkt.Unmarshal(value)
if err != nil {
log.Warn("invalid default value for geometry field", zap.Error(err))
return merr.WrapErrParameterInvalidMsg("invalid default value for geometry field")
}
_, err = wkb.Marshal(geomT, wkb.NDR)
if err != nil {
if _, err := common.ConvertWKTToWKB(value); err != nil {
log.Warn("invalid default value for geometry field", zap.Error(err))
return merr.WrapErrParameterInvalidMsg("invalid default value for geometry field")
}

View File

@ -1,6 +1,6 @@
module github.com/milvus-io/milvus/pkg/v2
go 1.24.9
go 1.24.11
require (
cloud.google.com/go/storage v1.50.0

View File

@ -1,4 +1,4 @@
FROM golang:1.24.9 as builder
FROM golang:1.24.11 as builder
# Define a build argument with an empty default value
ARG CUSTOM_GOPROXY=""

View File

@ -1,6 +1,6 @@
module github.com/milvus-io/milvus/tests/go_client
go 1.24.9
go 1.24.11
require (
github.com/milvus-io/milvus/client/v2 v2.0.0-20241125024034-0b9edb62a92d