Skip to content

Commit 0ab4b63

Browse files
authored
Update gRPC and protobuf (#668)
* Update gRPC and protobuf [ML-6341](https://iguazio.atlassian.net/browse/ML-6341) * Revert to Go 1.19 * Get it working * Fix * Regenerate python gRPC code * Update python access to protobuf message to work with protobuf 4 * Specify protobuf requirement explicitly * Remove reference to MessageMapContainer * Fix test message * Revert "Remove reference to MessageMapContainer" * Fix Dockerfile to always build for linux and amd64
1 parent 2aa51e7 commit 0ab4b63

File tree

14 files changed

+2404
-3861
lines changed

14 files changed

+2404
-3861
lines changed

backends/backends.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"reflect"
2626
"strings"
2727
"sync"
28+
"unicode"
2829

2930
"github.com/nuclio/logger"
3031
"github.com/pkg/errors"
@@ -107,6 +108,9 @@ func ValidateRequest(backend string, request interface{}, allowedFields map[stri
107108
for i := 0; i < reftype.NumField(); i++ {
108109
field := reftype.Field(i)
109110
fieldName := field.Name
111+
if unicode.IsLower(rune(fieldName[0])) {
112+
continue
113+
}
110114
fieldValue := reflect.ValueOf(request).Elem().FieldByName(fieldName).Interface()
111115
zeroValue := reflect.Zero(field.Type).Interface()
112116
if !globalRequestFieldsByRequestType[reftype][fieldName] && !allowedFields[fieldName] && !reflect.DeepEqual(fieldValue, zeroValue) {

clients/py/requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
googleapis-common-protos>=1.5.3
2-
# grpcio-tools 1.34.0 must not be used as it segfaults (1.34.1 ok).
3-
# grpcio-tools 1.49 raises protobuf version from 3.x to 4.x, which breaks compatibility.
4-
grpcio-tools>=1.30,!=1.34.0,<1.49
2+
grpcio-tools>=1.49
3+
protobuf~=4.0
54
pandas>=0.23.4
65
requests>=2.19.1

clients/py/tests/test_pbutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_encode_df():
3434
names = [col.name for col in msg.columns]
3535
assert set(names) == set(df.columns), 'columns mismatch'
3636
assert not msg.indices, 'has index'
37-
assert pbutils.pb2py(msg.labels) == labels, 'lables mismatch'
37+
assert pbutils.pb2py(msg.labels) == labels, 'labels mismatch'
3838

3939
# Now with index
4040
index_name = 'DATE'

clients/py/v3io_frames/frames_pb2.py

Lines changed: 80 additions & 1987 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)