victorious-answer-68580
05/31/2024, 5:46 PMawait stack.preview()
, the process exists with an error about leaked promises. Enabling PULUMI_DEBUG_PROMISE_LEAKS
, I see a bunch (570) of of promises that seem to be related to Object.registerResource
in some shape. By hooking into onOutput
for the preview function, I noticed that Pulumi thinks I only have 1 resource to create (which is either the stack or an output string of the program), not including the ~30 I'd expect. Is there some additional awaiting I need to do on my inline program or hints at how to debug this further?victorious-answer-68580
05/31/2024, 6:26 PMvictorious-answer-68580
05/31/2024, 6:38 PMreturn {
ids: [Output.create("Local Deployment")]
};
But after changing it to something like:
return {
ids: [Output.create("Local Deployment")],
ingresses: ingresses.map((ingress) => ingress.urn),
};
where ingresses
is a CustomResource[]
(Kubernetes networking.v1.Ingress
resources), which are a final resource, but not ultimate children (i.e. there are other resources that ingresses
don't depend on), the preview doesn't immediately exit, however it does seem like dependencies are being executed out of ordervictorious-answer-68580
05/31/2024, 6:43 PMvictorious-answer-68580
05/31/2024, 10:23 PMPreviewing update (dev):
+ pulumi:pulumi:Stack template-shooter-dev create
Outputs:
k8sIds: [
[0]: "Local Deployment"
]
Resources:
+ 1 to create
2. The leaked promises issue only happens when a subset of my resources are enabled in my program. I will need to look into this further, but I'm still not sure about the first issuevictorious-answer-68580
06/01/2024, 12:29 AM