pulumi/pkg/resource
Fraser Waters 035a502d86
Verify partial journals in engine tests (#15018)
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->

This updates test_plan.go to verify that every partial snapshot is also
a valid snapshot. This tests that the journal always writes out _valid_
snapshots even for scenarios where an update only partially ran.

While doing this it flagged up that the validation code was wrong for
delete-before-create resources.

When we do a delete-before-create replacement we need to leave the
"being replaced" resource in the snapshot. This is because while that
resource is being replaced it might have dependents that are not being
replaced, and so there is a period of time where _it_ is deleted but
dependents are still referring to it. If we removed it from the snapshot
at this point those dependent resources would not validate.

But in the case of two resources both being delete-before-create
replaced you can have a scenario where both get deleted (but are still
in the snapshot file) and the first then gets created thus removing it's
old entry from the snapshot file and adding it's new state. If the first
resource was a provider that will change it's ID, thus making the
provider reference in the second resource now look invalid.
2024-01-05 23:16:40 +00:00
..
analyzer Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
deploy Verify partial journals in engine tests (#15018) 2024-01-05 23:16:40 +00:00
edit Rewrite filestate.RenameStack logic in terms of checkpoints (#13927) 2023-12-22 12:28:41 +00:00
graph Replace ResourceSet with a generic set type (#14724) 2023-12-03 23:20:43 +00:00
provider Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
stack Add Base64SecretsProvider for testing (#15017) 2024-01-05 08:32:56 +00:00
testdata ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00