pulumi/sdk/python/lib/test
Sean Gillespie a30dcec9b1
Abnormally resolve all outputs on failed resources (#2350)
When is resource is waiting for its dependencies to resolve, it first
informs the RPC_MANAGER that it intends to do an RPC - this is to
prevent premature termination of the program while RPCs are still in
flight or queued to execute.

However, this is a problem whenever a resource fails to create for
whatever reason. The most common ways for this to happen are for invokes
to fail, resource creation itself to fail, or throwing in an apply.
Today, this causes a deadlock, since all consumers of the failed
resources block forever while never decrementing the RPC count.

This commit addresses the issue by deliberately (abnormally) resolving
all futures that are created in the process of preparing a resource.
This solves the problem by immediately terminating all resources that
are waiting for the failed resource's outputs to resolve - they resolve
immediately, and exceptionally.

The end result is now that, instead of deadlocking, a doomed program now
terminates as expected with a single exception message.
2019-01-14 11:27:21 -08:00
..
langhost Abnormally resolve all outputs on failed resources (#2350) 2019-01-14 11:27:21 -08:00
__init__.py Fix a couple of issues when projecting Protobuf and UNKNOWN in Python (#1468) 2018-06-06 16:09:07 -07:00
test_next_serialize.py Add 'Output.all' combinator for Python (#2293) 2018-12-18 13:22:04 -08:00