-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Enable output marshaling in .NET #8316
Enable output marshaling in .NET #8316
Conversation
propResources.UnionWith(urnDeps); | ||
this.DependentResources.UnionWith(urnDeps); | ||
|
||
var depencdencies = await Deployment.GetAllTransitivelyReferencedResourceUrnsAsync(propResources); |
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.
Do we need the transitive closure here? Is that how the other SDKs do it?
I also wonder if this leads to hangs with cycles, exacerbating https://github.com/pulumi/pulumi/issues/7900
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 how the other SDKs do it:
pulumi/sdk/nodejs/runtime/rpc.ts
Line 386 in e629bc3
const dependencies = await getAllTransitivelyReferencedResourceURNs(propResources); |
GetAllTransitivelyReferencedResourceUrnsAsync
should handle cycles: if (result.Add(resource)) |
$"call:{token}", | ||
argsDict, _ => true, | ||
keepResources: true, | ||
keepOutputValues: true).ConfigureAwait(false); |
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.
So Call assumes the monitor supports output values? If memory serves me correctly this might be reasonable but good to double-check.
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.
That is my understanding. It is how it works in the other SDKs.
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.
LGTM with some questions.
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.
I have some questions about the serialization/deserialization that I'll spend a little time looking into in more detail and report back.
Otherwise, looking good, aside from a bunch of nitpicky suggestions.
Remove the TestValue struct and some other simplification
Plain values set on properties typed as `Input<T>` are eagerly converted to `Output<T>` inside the `Input<T>`. To avoid these from being serialized as output values, when an output is known, not a secret, and has no deps, just return the value itself rather than an output value.
For consistency with the other Serialize* methods.
Ian looked over the commits I added and is happy with them, so I'm going to merge this. I'll open an issue that tracks addressing the issue with |
Description
Fixes #8157
Checklist