-
Notifications
You must be signed in to change notification settings - Fork 1.7k
BigTable Policy.etag is bytes (should be base64 str) #7369
Copy link
Copy link
Closed
Labels
api: bigtableIssues related to the Bigtable API.Issues related to the Bigtable API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Metadata
Metadata
Assignees
Labels
api: bigtableIssues related to the Bigtable API.Issues related to the Bigtable API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
Steps to reproduce
to_api_repr()of agoogle.cloud.bigtable.policy.Policyto json.Code example
Stack trace
Unlike other policies (such as the one returned from
google.cloud.storage),etagis not astr(contrary to doc), andto_api_reprcannot be converted to json (contrary to doc), apparently because bigtable’sPolicypasses_to_bytes(etag)to the superclass constructor.The
to_api_repr()of a bigtablePolicyis a dict containing binary bytes like{'etag': b'\x00 \x01', 'version': 0}, whereas theto_api_repr()of aPolicyfrom google cloud storage is a dict whose etag is base64-encoded such as{'etag': 'CAU=', 'bindings': […]}