-
Notifications
You must be signed in to change notification settings - Fork 638
Document proto bytes field decoding with a test #1509
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
Document proto bytes field decoding with a test #1509
Conversation
⚪
|
⚪
|
Changelog category
Additional information
When invoking
CopyFrom
method on protobufs in Python, fields with abytes
type are automatically and implicitly base64-encoded. I've added a test to document that YDBD binary, when reading theconfig.yaml
file, DOES NOT do the decoding automatically. In other words, in the business logic after reading the config, the base64-encoded string is used.A real-world example to understand the case
This is related to
cfg
utility that is used to generate configs + proto txt files from a "cluster template yaml" file. Whencfg
is called with a template like this:The result in generated
config.yaml
looks like this, notice the DOUBLE base-64 encoding: