pulumi/tests/integration
Joe Duffy 0a38bc295c
Fix issue with --target deletion dependent calculation (#8360)
* Fix issue with --target deletion dependant calculation

The code that computed --target deletion dependants was not correct.
It used parent/child component relationships, but did not respect actual
DAG dependencies. As a result, it could erroneously leave hanging
references to resources that no longer exist after performing a
`pulumi destroy --target X` operation. This manifested in bugs like
https://github.com/pulumi/pulumi/issues/6283, which is fixed by this
change. The solution is to compute the (transitive!) dependency graph
correctly, factoring in both parent/child, as well as explicit and
implicit, dependencies. The existing logic does the correct thing once
we do this. I've also added tests for this area, including regression
tests that cover transitive dependency relationships, as well as ones
that would cause an infinite loop given a naive implementation.

* Add a changelog entry

* Fix failing test to include all destroyed targets

Unless I'm missing something, the entire tree should be deleted
in this test case because A is the ancestor for the entire tree.

* Use DependencyGraph to compute dependents

Per code review feedback from @pgavlin.

Co-authored-by: Anton Tayanovskyy <anton@pulumi.com>
2021-11-12 10:02:51 -05:00
..
about Allow windows to use NPM 2021-08-30 19:16:19 -07:00
aliases [sdk/go] Respect default parent in go aliases. (#8288) 2021-10-28 17:25:31 -07:00
cloud_secrets_provider Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
component_provider_schema Use `provider.MainWithOptions` to reduce boilerplate in integration tests (#7684) 2021-07-30 06:31:17 -07:00
config_basic Fix module names to match paths (#8304) 2021-10-28 16:18:15 +01:00
config_capture_e2e/nodejs Changing build.proj to run all languages and tests on windows 2020-01-27 21:16:37 +02:00
config_secrets_warn Fix module names to match paths (#8304) 2021-10-28 16:18:15 +01:00
construct_component Use `provider.MainWithOptions` to reduce boilerplate in integration tests (#7684) 2021-07-30 06:31:17 -07:00
construct_component_error_apply Fix a hang in nodejs remote components when an error is thrown within an apply (#7365) 2021-06-25 18:41:54 -07:00
construct_component_methods [sdk/dotnet] Support for calling methods (#7582) 2021-08-24 20:17:05 -07:00
construct_component_methods_unknown [sdk/dotnet] Support for calling methods (#7582) 2021-08-24 20:17:05 -07:00
construct_component_plain Use `provider.MainWithOptions` to reduce boilerplate in integration tests (#7684) 2021-07-30 06:31:17 -07:00
construct_component_provider Deduplicate a couple of go module names (#8232) 2021-10-15 14:21:12 +01:00
construct_component_slow [deps] Ensuring pulumi/pulumi pkg references pulumi sdk v3.0.0-beta.1 2021-04-14 19:32:18 +01:00
construct_component_unknown Use `provider.MainWithOptions` to reduce boilerplate in integration tests (#7684) 2021-07-30 06:31:17 -07:00
custom_timeouts [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
delete_before_create [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
dependency_steps [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
double_pending_delete [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
duplicate_urns [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
dynamic Lower the BrokenDynamicProvider regression test from integration to mock (#7951) 2021-09-10 17:25:48 -04:00
ee_perf Use prefered `new pulumi.Config()` form 2019-01-31 16:11:57 -08:00
empty [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
enums Updating requirements.txt to use 3.x series of pulumi (#8337) 2021-11-02 15:25:26 -07:00
explicit_provider Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
get_created Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
get_resource [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
invalid_package_json Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
large_resource [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
nodejs/compiler_options [sdk/nodejs] Prevent Pulumi from overriding tsconfig.json options. (#7068) 2021-08-15 18:58:43 -07:00
partial_state [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
partial_values Propagate inputs to outputs during preview. (#3327) 2019-11-11 12:09:34 -08:00
policy Use ESlint instead of TSlint (#7719) 2021-08-10 11:31:59 -07:00
project_main Remove existing lock files 2018-11-12 15:33:58 -08:00
project_main_abs Enable absolute and relative parent paths for pulumi main (#6734) 2021-04-08 21:39:52 -07:00
project_main_parent/foo Enable absolute and relative parent paths for pulumi main (#6734) 2021-04-08 21:39:52 -07:00
protect_resources [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
provider_secret_config Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
python Make virtualenv paths relative to root when main points elsewhere (#6966) 2021-05-14 13:41:55 -04:00
python_await [sdk/python] - Await all async tasks (#6606) 2021-03-30 10:56:17 -07:00
query [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
read [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
recreate_resource_check [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
rotate_passphrase Deduplicate a couple of go module names (#8232) 2021-10-15 14:21:12 +01:00
secret_outputs [sdk/python] Fix secret regression (#5496) 2020-10-01 14:57:51 -07:00
single_resource Suppress JSON outputs in preview correctly (#2771) 2019-05-25 12:10:38 +02:00
stack_bad_parenting Consistent dependencies (#2517) 2019-03-05 20:34:51 -08:00
stack_component Enable creation of TStack using IServiceProvider (#5723) 2020-11-30 16:43:18 +01:00
stack_dependencies Remove existing lock files 2018-11-12 15:33:58 -08:00
stack_outputs Bump to .NET Core 3.1 (#4400) 2020-04-15 16:31:18 +02:00
stack_parenting Consistent dependencies (#2517) 2019-03-05 20:34:51 -08:00
stack_project_name Consistent dependencies (#2517) 2019-03-05 20:34:51 -08:00
stack_reference [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
stack_reference_multi/python Regression tests for StackReference in the Python SDK (#3913) 2020-02-17 10:40:46 -08:00
stack_reference_secrets Bump to .NET Core 3.1 (#4400) 2020-04-15 16:31:18 +02:00
steps [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
targets Fix issue with --target deletion dependent calculation (#8360) 2021-11-12 10:02:51 -05:00
transformations [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
types [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
appdash_test.go Add trace proxying to fix sub-process trace collection into files (#7248) 2021-06-10 22:57:18 -04:00
integration_dotnet_test.go Allow failure to cleanup 2021-08-31 00:25:50 -07:00
integration_go_test.go Allow failure to cleanup 2021-08-31 00:25:50 -07:00
integration_nodejs_test.go Skip failing test on windows 2021-08-30 22:53:16 -07:00
integration_python_test.go Lower the BrokenDynamicProvider regression test from integration to mock (#7951) 2021-09-10 17:25:48 -04:00
integration_test.go [cli] Emit JSON events for updates via `--json` flag (#8275) 2021-10-26 16:21:27 -07:00