mirror of https://github.com/pulumi/pulumi.git
0febb7b096
In `pulumi up --continue-on-error`, we have to make sure to not delete resources that are still needed in the snapshot because an earlier step failed. E.g. if B depends on A, and A fails to be deleted, we need to make sure B is not deleted as well, otherwise we get a snapshot integrity failure because B is missing A. We do this by checking the dependencies of B in the *current program*, e.g. only checking `dep.Res()`. However it is possible that the dependencies in the new program are not the same. For example, say resource A depends on provider B. Now we change the program and resource A depends on provider C. We try to `pulumi up --continue-on-error` the latter program, but the Update of resource A fails. But because the new resource A only depends on C, and not on B, we go ahead and delete B, resulting in a snapshot integrity failure, because A has not been updated. Fix this by also checking the `res.Old()` for dependencies, and not deleting those either if `res` had a failure. Note that this isn't an issue for creates/updates, because we only need to check wheter a *new* resource is dependent on the existing resource. Fixes https://github.com/pulumi/pulumi/issues/16720 |
||
---|---|---|
.. | ||
deploytest | ||
providers | ||
builtins.go | ||
builtins_test.go | ||
deployment.go | ||
deployment_executor.go | ||
deployment_executor_test.go | ||
deployment_test.go | ||
doc.go | ||
import.go | ||
import_test.go | ||
manifest.go | ||
manifest_test.go | ||
plan.go | ||
plan_test.go | ||
snapshot.go | ||
snapshot_test.go | ||
source.go | ||
source_error.go | ||
source_error_test.go | ||
source_eval.go | ||
source_eval_test.go | ||
source_null.go | ||
source_query.go | ||
source_query_test.go | ||
state_builder.go | ||
state_builder_test.go | ||
step.go | ||
step_executor.go | ||
step_executor_test.go | ||
step_generator.go | ||
step_generator_test.go | ||
step_test.go | ||
target.go | ||
target_test.go |