pulumi/sdk/nodejs/tests/runtime/langhost/cases
Pat Gavlin 1ecdc83a33 Implement more precise delete-before-replace semantics. (#2369)
This implements the new algorithm for deciding which resources must be
deleted due to a delete-before-replace operation.

We need to compute the set of resources that may be replaced by a
change to the resource under consideration. We do this by taking the
complete set of transitive dependents on the resource under
consideration and removing any resources that would not be replaced by
changes to their dependencies. We determine whether or not a resource
may be replaced by substituting unknowns for input properties that may
change due to deletion of the resources their value depends on and
calling the resource provider's Diff method.

This is perhaps clearer when described by example. Consider the
following dependency graph:

  A
__|__
B   C
|  _|_
D  E F

In this graph, all of B, C, D, E, and F transitively depend on A. It may
be the case, however, that changes to the specific properties of any of
those resources R that would occur if a resource on the path to A were
deleted and recreated may not cause R to be replaced. For example, the
edge from B to A may be a simple dependsOn edge such that a change to
B does not actually influence any of B's input properties. In that case,
neither B nor D would need to be deleted before A could be deleted.

In order to make the above algorithm a reality, the resource monitor
interface has been updated to include a map that associates an input
property key with the list of resources that input property depends on.
Older clients of the resource monitor will leave this map empty, in
which case all input properties will be treated as depending on all
dependencies of the resource. This is probably overly conservative, but
it is less conservative than what we currently implement, and is
certainly correct.
2019-01-28 09:46:30 -08:00
..
000.empty Implement free variable calculations 2017-09-04 11:35:21 -07:00
001.one_resource Add auto-parenting 2017-10-15 04:38:26 -07:00
002.ten_resources Add auto-parenting 2017-10-15 04:38:26 -07:00
003.one_complex_resource Resolve missing outputs as `undefined`. (#1427) 2018-05-24 11:22:08 -07:00
004.ten_complex_resources Introduce Output<T> and update Resource construction code to properly handle it. (#834) 2018-02-05 14:44:23 -08:00
005.resource_thens Introduce Output<T> and update Resource construction code to properly handle it. (#834) 2018-02-05 14:44:23 -08:00
006.asset Add auto-parenting 2017-10-15 04:38:26 -07:00
007.promises_io Add auto-parenting 2017-10-15 04:38:26 -07:00
008.ten_depends_on_resources Permit dependsOn that are Outputs (of Outputs) (#2198) 2018-11-19 11:22:55 -05:00
009.invoke Pass "special" properties to `Invoke`. (#1277) 2018-05-01 15:05:42 -07:00
010.runtime_settings Allow multiple Pulumi SDKs side-by-side (#1132) 2018-04-07 08:02:59 -07:00
011.unhandled_error Add a test. 2017-12-13 17:30:43 -08:00
012.assets_archive Test the asset deserialization changes from #677. 2017-12-08 15:37:30 -08:00
013.unhandled_promise_rejection Add a test. 2017-12-13 17:30:43 -08:00
014.read_resource Simplify resource lookup (#1133) 2018-04-07 10:15:58 -07:00
015.runtime_sxs Move management of root resource state to engine (#1944) 2018-09-18 11:47:34 -07:00
016.promise_leak Improve the promise leak experience (#1374) 2018-05-17 15:32:39 -07:00
017.parent_defaults Pull default options from a resource's parent. (#1748) 2018-08-10 16:18:21 -07:00
018.logging Fix an issue with NodeJS host logging (#1819) 2018-08-24 16:50:09 -07:00
019.stack_exports Incorporate PR feedback 2018-09-02 12:15:58 -07:00
020.property_dependencies Implement more precise delete-before-replace semantics. (#2369) 2019-01-28 09:46:30 -08:00