Skip to content
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

Handle None being passed to register_resource_outputs #11226

Merged
merged 1 commit into from Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,4 @@
changes:
- type: fix
scope: sdk/python
description: Handle None being passed to register_resource_outputs.
4 changes: 3 additions & 1 deletion sdk/python/lib/pulumi/runtime/resource.py
Expand Up @@ -682,7 +682,9 @@ def register_resource_outputs(
):
async def do_register_resource_outputs():
urn = await res.urn.future()
serialized_props = await rpc.serialize_properties(outputs, {})
# serialize_properties expects a collection (empty is fine) but not None, but this is called pretty
# much directly by users who could pass None in (although the type hints say they shouldn't).
serialized_props = await rpc.serialize_properties(outputs or {}, {})
log.debug(
f"register resource outputs prepared: urn={urn}, props={serialized_props}"
)
Expand Down