-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: convert listValues to lists in nested structs #102
base: main
Are you sure you want to change the base?
Conversation
7474fc8
to
1d2dcb3
Compare
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
69b1a97
to
25e49cf
Compare
k: (struct_to_dict(v) if isinstance(v, structpb.Struct) else v) | ||
for k, v in s.items() | ||
} | ||
return json_format.MessageToDict(s, preserving_proto_field_name=True) |
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.
Nice. Can you update dict_to_struct
as well per #108?
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.
done!
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.
but CI is failing
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.
fixed
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
8724e2d
to
c632b0c
Compare
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
0250289
to
17d5ddb
Compare
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
17d5ddb
to
36e5600
Compare
Description of your changes
When converting a struct to dict, it is expected for all the fields to be python-bultins. This includes that the resulting nested dict should not contain ListValues but lists.
I have:
Read and followed Crossplane's contribution process.