pulumi/pkg/resource
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
..
config Don't fail on configuration keys like a:config:b:c 2018-11-20 14:14:37 -08:00
deploy Implement more precise delete-before-replace semantics. (#2369) 2019-01-28 09:46:30 -08:00
edit Add new 'pulumi state' command for editing state (#2024) 2018-10-15 09:52:55 -07:00
graph Process deletions conservatively in parallel (#1963) 2018-09-27 15:49:08 -07:00
plugin Implement more precise delete-before-replace semantics. (#2369) 2019-01-28 09:46:30 -08:00
provider Implement status sinks 2018-08-31 15:56:53 -07:00
stack Implement more precise delete-before-replace semantics. (#2369) 2019-01-28 09:46:30 -08:00
testdata Fix asset bugs; write more tests 2017-10-24 09:00:11 -07:00
asset.go Implement more precise delete-before-replace semantics. (#2369) 2019-01-28 09:46:30 -08:00
asset_test.go Adopt golangci-lint and address issues 2018-11-08 14:11:47 -08:00
errors.go Add license headers 2018-05-22 15:02:47 -07:00
properties.go Add API types for the V3 checkpoint (#2384) 2019-01-23 13:33:25 -08:00
properties_diff.go Add license headers 2018-05-22 15:02:47 -07:00
properties_diff_test.go Add license headers 2018-05-22 15:02:47 -07:00
properties_test.go Add license headers 2018-05-22 15:02:47 -07:00
resource_goal.go Implement more precise delete-before-replace semantics. (#2369) 2019-01-28 09:46:30 -08:00
resource_id.go Add license headers 2018-05-22 15:02:47 -07:00
resource_id_test.go Adopt golangci-lint and address issues 2018-11-08 14:11:47 -08:00
resource_operation.go Add a list of in-flight operations to the deployment (#1759) 2018-08-10 21:39:59 -07:00
resource_state.go Implement more precise delete-before-replace semantics. (#2369) 2019-01-28 09:46:30 -08:00
stack.go Make a smattering of CLI UX improvements 2018-09-24 08:43:46 -07:00
status.go Partial status for resource providers 2018-07-02 13:32:23 -07:00
urn.go Add license headers 2018-05-22 15:02:47 -07:00
urn_test.go Add license headers 2018-05-22 15:02:47 -07:00