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 |
||
---|---|---|
.. | ||
0 | ||
1 |