Skip to content

Commit

Permalink
update deps (#2468)
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <kpango@vdaas.org>
  • Loading branch information
kpango committed Apr 10, 2024
1 parent 63b53ea commit 29cd8c8
Show file tree
Hide file tree
Showing 30 changed files with 895 additions and 568 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ assignees: ""
- Go Version: 1.22.2
- Docker Version: 20.10.8
- Kubernetes Version: v1.29.3
- NGT Version: 2.2
- NGT Version: 2.2.0
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/security_issue_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ assignees: ""
- Go Version: 1.22.2
- Docker Version: 20.10.8
- Kubernetes Version: v1.29.3
- NGT Version: 2.2
- NGT Version: 2.2.0
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- Go Version: 1.22.2
- Docker Version: 20.10.8
- Kubernetes Version: v1.29.3
- NGT Version: 2.2
- NGT Version: 2.2.0

### Checklist

Expand Down
23 changes: 12 additions & 11 deletions apis/docs/v1/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -795,17 +795,18 @@ Search related messages.

Represent search configuration.

| Field | Type | Label | Description |
| --------------------- | ---------------------------------------------------------------------- | ----- | ---------------------------------------- |
| request_id | [string](#string) | | Unique request ID. |
| num | [uint32](#uint32) | | Maximum number of result to be returned. |
| radius | [float](#float) | | Search radius. |
| epsilon | [float](#float) | | Search coefficient. |
| timeout | [int64](#int64) | | Search timeout in nanoseconds. |
| ingress_filters | [Filter.Config](#payload-v1-Filter-Config) | | Ingress filter configurations. |
| egress_filters | [Filter.Config](#payload-v1-Filter-Config) | | Egress filter configurations. |
| min_num | [uint32](#uint32) | | Minimum number of result to be returned. |
| aggregation_algorithm | [Search.AggregationAlgorithm](#payload-v1-Search-AggregationAlgorithm) | | Aggregation Algorithm |
| Field | Type | Label | Description |
| --------------------- | ---------------------------------------------------------------------- | ----- | -------------------------------------------- |
| request_id | [string](#string) | | Unique request ID. |
| num | [uint32](#uint32) | | Maximum number of result to be returned. |
| radius | [float](#float) | | Search radius. |
| epsilon | [float](#float) | | Search coefficient. |
| timeout | [int64](#int64) | | Search timeout in nanoseconds. |
| ingress_filters | [Filter.Config](#payload-v1-Filter-Config) | | Ingress filter configurations. |
| egress_filters | [Filter.Config](#payload-v1-Filter-Config) | | Egress filter configurations. |
| min_num | [uint32](#uint32) | | Minimum number of result to be returned. |
| aggregation_algorithm | [Search.AggregationAlgorithm](#payload-v1-Search-AggregationAlgorithm) | | Aggregation Algorithm |
| ratio | [google.protobuf.FloatValue](#google-protobuf-FloatValue) | | Search ratio for agent return result number. |

<a name="payload-v1-Search-IDRequest"></a>

Expand Down
970 changes: 494 additions & 476 deletions apis/grpc/v1/payload/payload.pb.go

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions apis/grpc/v1/payload/payload_vtproto.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ import (
math "math"

protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
wrapperspb1 "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
io "github.com/vdaas/vald/internal/io"
status "google.golang.org/genproto/googleapis/rpc/status"
proto "google.golang.org/protobuf/proto"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)

const (
Expand Down Expand Up @@ -181,6 +183,7 @@ func (m *Search_Config) CloneVT() *Search_Config {
r.EgressFilters = m.EgressFilters.CloneVT()
r.MinNum = m.MinNum
r.AggregationAlgorithm = m.AggregationAlgorithm
r.Ratio = (*wrapperspb.FloatValue)((*wrapperspb1.FloatValue)(m.Ratio).CloneVT())
if len(m.unknownFields) > 0 {
r.unknownFields = make([]byte, len(m.unknownFields))
copy(r.unknownFields, m.unknownFields)
Expand Down Expand Up @@ -2102,6 +2105,9 @@ func (this *Search_Config) EqualVT(that *Search_Config) bool {
if this.AggregationAlgorithm != that.AggregationAlgorithm {
return false
}
if !(*wrapperspb1.FloatValue)(this.Ratio).EqualVT((*wrapperspb1.FloatValue)(that.Ratio)) {
return false
}
return string(this.unknownFields) == string(that.unknownFields)
}

Expand Down Expand Up @@ -4745,6 +4751,16 @@ func (m *Search_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
i -= len(m.unknownFields)
copy(dAtA[i:], m.unknownFields)
}
if m.Ratio != nil {
size, err := (*wrapperspb1.FloatValue)(m.Ratio).MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0x52
}
if m.AggregationAlgorithm != 0 {
i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AggregationAlgorithm))
i--
Expand Down Expand Up @@ -8921,6 +8937,10 @@ func (m *Search_Config) SizeVT() (n int) {
if m.AggregationAlgorithm != 0 {
n += 1 + protohelpers.SizeOfVarint(uint64(m.AggregationAlgorithm))
}
if m.Ratio != nil {
l = (*wrapperspb1.FloatValue)(m.Ratio).SizeVT()
n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
}
n += len(m.unknownFields)
return n
}
Expand Down Expand Up @@ -11293,6 +11313,42 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error {
break
}
}
case 10:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Ratio", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protohelpers.ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return protohelpers.ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return protohelpers.ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Ratio == nil {
m.Ratio = &wrapperspb.FloatValue{}
}
if err := (*wrapperspb1.FloatValue)(m.Ratio).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
Expand Down
3 changes: 3 additions & 0 deletions apis/proto/v1/payload/payload.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ syntax = "proto3";
package payload.v1;

import "buf/validate/validate.proto";
import "google/protobuf/wrappers.proto";
import "google/rpc/status.proto";

option go_package = "github.com/vdaas/vald/apis/grpc/v1/payload";
Expand Down Expand Up @@ -93,6 +94,8 @@ message Search {
uint32 min_num = 8 [(buf.validate.field).uint32.gte = 0];
// Aggregation Algorithm
AggregationAlgorithm aggregation_algorithm = 9;
// Search ratio for agent return result number.
google.protobuf.FloatValue ratio = 10;
}

// AggregationAlgorithm is enum of each aggregation algorithms
Expand Down
5 changes: 5 additions & 0 deletions apis/swagger/v1/vald/filter.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,11 @@
"aggregationAlgorithm": {
"$ref": "#/definitions/SearchAggregationAlgorithm",
"title": "Aggregation Algorithm"
},
"ratio": {
"type": "number",
"format": "float",
"description": "Search ratio for agent return result number."
}
},
"description": "Represent search configuration."
Expand Down
5 changes: 5 additions & 0 deletions apis/swagger/v1/vald/search.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,11 @@
"aggregationAlgorithm": {
"$ref": "#/definitions/SearchAggregationAlgorithm",
"title": "Aggregation Algorithm"
},
"ratio": {
"type": "number",
"format": "float",
"description": "Search ratio for agent return result number."
}
},
"description": "Represent search configuration."
Expand Down
13 changes: 13 additions & 0 deletions example/client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,22 @@ replace (
github.com/golang/protobuf => github.com/golang/protobuf v1.5.4
github.com/kpango/glg => github.com/kpango/glg v1.6.15
github.com/pkg/sftp => github.com/pkg/sftp v1.13.6
<<<<<<< HEAD
golang.org/x/crypto => golang.org/x/crypto v0.21.0
golang.org/x/net => golang.org/x/net v0.23.0
=======
golang.org/x/crypto => golang.org/x/crypto v0.22.0
golang.org/x/net => golang.org/x/net v0.24.0
>>>>>>> feature/gateway-lb/add-efficient-search-for-large-topk-query
golang.org/x/text => golang.org/x/text v0.14.0
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda
google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240401170217-c3f982113cda
google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda
<<<<<<< HEAD
google.golang.org/grpc => google.golang.org/grpc v1.63.0
=======
google.golang.org/grpc => google.golang.org/grpc v1.63.2
>>>>>>> feature/gateway-lb/add-efficient-search-for-large-topk-query
google.golang.org/protobuf => google.golang.org/protobuf v1.33.0
gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1
Expand All @@ -34,7 +43,11 @@ require (
github.com/kpango/fastime v1.1.9 // indirect
github.com/planetscale/vtprotobuf v0.6.0 // indirect
golang.org/x/net v0.21.0 // indirect
<<<<<<< HEAD
golang.org/x/sys v0.18.0 // indirect
=======
golang.org/x/sys v0.19.0 // indirect
>>>>>>> feature/gateway-lb/add-efficient-search-for-large-topk-query
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa // indirect
Expand Down
12 changes: 12 additions & 0 deletions example/client/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
<<<<<<< HEAD
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
=======
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
>>>>>>> feature/gateway-lb/add-efficient-search-for-large-topk-query
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand All @@ -37,7 +44,12 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240401170217-c3f982113cda h1:
google.golang.org/genproto/googleapis/api v0.0.0-20240401170217-c3f982113cda/go.mod h1:AHcE/gZH76Bk/ROZhQphlRoWo5xKDEtz3eVEO1LfA8c=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
<<<<<<< HEAD
google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8=
google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
=======
google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM=
google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
>>>>>>> feature/gateway-lb/add-efficient-search-for-large-topk-query
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
Loading

0 comments on commit 29cd8c8

Please sign in to comment.