mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 09:08:43 +08:00
Compare commits
3 Commits
f365025d68
...
eb81e6ed01
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb81e6ed01 | ||
|
|
dd36ffa92d | ||
|
|
0171511d42 |
2
.github/workflows/mac.yaml
vendored
2
.github/workflows/mac.yaml
vendored
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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 && \
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 .
|
||||
```
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
2
go.mod
@ -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
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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())
|
||||
|
||||
@ -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")
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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=""
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user