I’m getting the following error: ``` The Pulum...
# general
I’m getting the following error:
Copy code
The Pulumi runtime detected that 114 promises were still active
    at the time that the process exited. There are a few ways that this can occur:
      * Not using `await` or `.then` on a Promise returned from a Pulumi API
      * Introducing a cyclic dependency between two Pulumi Resources
      * A bug in the Pulumi Runtime
It definitely is the second case: a cyclic dependency, but I’m not sure how to break the cycle. I’ve got a lambda that closes over a function that constructs a config/context object sort of thing, but another lambda that needs the arn of that first lambda - is there some general trick to break the cycle in this sort of situation?
actually, i think the cycle is even simpler than that - i’ve got some lambda f that calls newContext and newContext is defined as
let newContext;
and then at the bottom fo the file
newContext = ...
where … includes some code that needs the arn of the lambda f
hmm, cc @bitter-oil-46081?
I am not really sure how to make that work. If I am understanding correctly, logically you want to end up with the source code for a lambda to end up capturing the arn that lambda is created with? Do you expect when you capture
you see the value that you end up defining later in the file? I think that the pattern of doing a let to initialize a variable, capturing that, and then latter assigning to it in the deployment program is going to lead to racy behavior since you don't have control over when the lambda which captured newContext is serialized.