Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gRPC and protobuf #668

Merged
merged 13 commits into from
Oct 30, 2024
4 changes: 4 additions & 0 deletions backends/backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"reflect"
"strings"
"sync"
"unicode"

"github.com/nuclio/logger"
"github.com/pkg/errors"
Expand Down Expand Up @@ -107,6 +108,9 @@ func ValidateRequest(backend string, request interface{}, allowedFields map[stri
for i := 0; i < reftype.NumField(); i++ {
field := reftype.Field(i)
fieldName := field.Name
if unicode.IsLower(rune(fieldName[0])) {
continue
}
fieldValue := reflect.ValueOf(request).Elem().FieldByName(fieldName).Interface()
zeroValue := reflect.Zero(field.Type).Interface()
if !globalRequestFieldsByRequestType[reftype][fieldName] && !allowedFields[fieldName] && !reflect.DeepEqual(fieldValue, zeroValue) {
Expand Down
5 changes: 2 additions & 3 deletions clients/py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
googleapis-common-protos>=1.5.3
# grpcio-tools 1.34.0 must not be used as it segfaults (1.34.1 ok).
# grpcio-tools 1.49 raises protobuf version from 3.x to 4.x, which breaks compatibility.
grpcio-tools>=1.30,!=1.34.0,<1.49
grpcio-tools>=1.49
protobuf~=4.0
pandas>=0.23.4
requests>=2.19.1
2 changes: 1 addition & 1 deletion clients/py/tests/test_pbutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_encode_df():
names = [col.name for col in msg.columns]
assert set(names) == set(df.columns), 'columns mismatch'
assert not msg.indices, 'has index'
assert pbutils.pb2py(msg.labels) == labels, 'lables mismatch'
assert pbutils.pb2py(msg.labels) == labels, 'labels mismatch'

# Now with index
index_name = 'DATE'
Expand Down
2,067 changes: 80 additions & 1,987 deletions clients/py/v3io_frames/frames_pb2.py

Large diffs are not rendered by default.

Loading
Loading