<@U02J3T6A8LB> The 3.202 TS inputs-to-state change...
# typescript
l
@echoing-dinner-19531 The 3.202 TS inputs-to-state change is getting me again. Pretty sure it's the circular references again. Do you have any hints on how to track down the specific component resource that's causing the crash? I tried setting PULUMI_DEBUG_PROMISE_LEAKS, but with almost 11000 promises leaked, I'm not sure if it's going to be helpful...
If I make a change and the number of leaked promises goes up, does that imply that something ran a bit further than before, which means that my change fixed something?
All the circular references (or whatever they are) are due to parent opt being set. We have a rule that all resources in component resources must set their parent; being stricter about the parent (instead of allowing "this" for most resources) has resolved issues to date. But in the current project, there's just too many resources causing problems, and I can't tell what I've fixed and what I've changed but didn't need to...
e
I'm not sure if you can rely on the promise count so simply. Given your setup I'd probably try and rewind to everything just passing
{}
for component args, and work your way back adding a few at a time till it locks up. I haven't had time to dig into the mocha repro you posted the other day, hopefully get to that this week, but also we should be shipping PULUMI_NODEJS_SKIP_COMPONENT_INPUTS today or tomorrow and that can just reset everything back to empty.
l
I did manage to get things deploying again. This last one was caused by the parent of a component resource being set to "myvpc", when it had a property "myvpc.vpc.vpc.id" (awsx, am I right? 😉 ). So the current state is that everything is deploying. We've changed our code so that all component resource carefully moderate what goes into the args object that gets passed to super().
I hope that other block of code is helpful diagnosing the circular references issue. I thought it interesting that opts were so crucial to causing the problem.
e
opts are an easy way to get more complex dependency sets I suppose