-
Notifications
You must be signed in to change notification settings - Fork 278
Add bigtable authorizedview types, mappers, CRD and fuzzer #4026
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
Add bigtable authorizedview types, mappers, CRD and fuzzer #4026
Conversation
Please fix the presubmit failure |
9adf7cd
to
f85a2a2
Compare
/assign @yuwenma |
f85a2a2
to
6afd3f3
Compare
// Row prefixes to be included in the AuthorizedView. | ||
// To provide access to all rows, include the empty string as a prefix (""). | ||
// +kcc:proto:field=google.bigtable.admin.v2.AuthorizedView.SubsetView.row_prefixes | ||
RowPrefixes [][]byte `json:"rowPrefixes,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you confirm if this should be string or []byte? It seems to be very user unfriendly to use []byte
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is generated and the proto uses [][]byte.
Some thoughts here: 1) we do support []byte type in other resource. I guess it's fine to support a list of []byte as well. 2) the API doc, the field should be a "base64-encoded string of bytes". If change to string I'm afraid user would mistakenly configure this field as regular string, but we can always leverage the underlying API to validate values&process the request.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is very hard to configure [][]byte. This seems to be a bad API design if the purpose is for base64-encryption
@@ -312,6 +319,15 @@ func Visit(msgPath string, msg protoreflect.Message, setter func(v protoreflect. | |||
visitor.VisitPrimitive(path+"[]", el, setter) | |||
} | |||
|
|||
case protoreflect.BytesKind: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defer to the question about if we should change []byte to string, we may not want this type extension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
One question to confirm, otherwise looks good
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yuwenma The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm please fix the merge conflict |
8a711cb
to
00292f5
Compare
/lgtm |
d8c0d86
into
GoogleCloudPlatform:master
Change description
Fixes #
Tests you have done
make ready-pr
to ensure this PR is ready for review.