pulumi/pkg/engine/lifecycletest/testdata/output/TestContinueOnErrorWithChan.../0
Thomas Gummerer 0febb7b096
continue-on-error: fix integrity issues in up with changed dependencies (#16733)
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
2024-07-22 11:25:33 +00:00
..
diff.stderr.txt continue-on-error: fix integrity issues in up with changed dependencies (#16733) 2024-07-22 11:25:33 +00:00
diff.stdout.txt continue-on-error: fix integrity issues in up with changed dependencies (#16733) 2024-07-22 11:25:33 +00:00
eventstream.json continue-on-error: fix integrity issues in up with changed dependencies (#16733) 2024-07-22 11:25:33 +00:00
progress.stderr.txt continue-on-error: fix integrity issues in up with changed dependencies (#16733) 2024-07-22 11:25:33 +00:00
progress.stdout.txt continue-on-error: fix integrity issues in up with changed dependencies (#16733) 2024-07-22 11:25:33 +00:00