incalculable-soccer-9728412/09/2018, 9:19 PM
be made Awaitable, roughly:
This allows me to manage my resources in async more conveniently, including I/O packaging my series of lambda src code. Wdyt?
Obviously we need an async version of
and externalizing loop may feel icky.
. Our goal is that you rarely would want/need to be exposed to the asynchrony directly, though it’s always interesting to understand use cases where it may be helpful.
There’s also an additional subtlety that we track dependency information through this same data flow, so offering ways to peak behind the abstraction can lead to loss of accurate dependency tracking, which we’re trying to make sure is something you just get for free from writing Pulumi programs naturally.
incalculable-soccer-9728412/10/2018, 7:51 PM
and the code should show you why.
RE lossy dependency metadata: I've been thinking about this as well and understand the need to support the synchronous programming model. I see
as an additional hook to augment the pre-existing dependency metadata captured as
dependencies. I believe it should enable both sync and async programming model. I'm sure the devil's in the details. The code I'm sending you would clarify what I meant.
incalculable-sundown-8251412/10/2018, 7:53 PM
including I/O packaging my series of lambda src codeYou should be able to pass anything awaitable as an input to a
- is that what you’d like to do here? Do some sort of I/O asynchronously and then use the data from I/O for a resource?
incalculable-soccer-9728412/10/2018, 7:59 PM
to be limiting when building the SFN definition that depends on multiple instances of
incalculable-sundown-8251412/10/2018, 8:01 PM
which accepts a list of outputs and produces an output of a list. It makes it way easier to compose multiple outputs like that.
We should probably include a combinator like that in Python, too, since it’s super useful.
pulumi.all(arn1, arn2, arn3).apply(lambda arns: do_something_with_arns(arns))
incalculable-soccer-9728412/10/2018, 8:05 PM
for pulumi `Resource`s. Perhaps instead of ended with
we swap it with pulumi's coro registration api. This way I'm not limited to
incalculable-sundown-8251412/10/2018, 8:06 PM
and the asynchronous resolution of output properties to do this. If you were able to
a Resource and get its properties directly, you’d be able to defeat our dependency tracking.
incalculable-soccer-9728412/10/2018, 8:09 PM
can be used as a hook to augment the pre-existing dependency graph.
Possibly with the help of custom executor, pulumi decorators or perhaps stacktrace (hopefully not). I'm brainstorming, but am just curious if you have plans to bring full async programming to the hands of the clients.
will make it into the SDK?
incalculable-sundown-8251412/10/2018, 11:00 PM
incalculable-soccer-9728412/11/2018, 8:57 PM
incalculable-sundown-8251412/12/2018, 5:52 AM