pulumi/pkg/backend/httpstate
Will Jones 62293f05f7
Improve snapshot integrity panics depending on operation (#17144)
Snapshot integrity errors generally happen for one of two reasons:

* We just *wrote* a snapshot with an issue.
* We just attempted to *read* a snapshot with an issue.

As much as possible, we want to capture errors and issues at the point
of *writing* the snapshot, since that will generally be where the bug
that caused the integrity issue lies. This commit updates snapshot
integrity errors to carry awareness of whether they happened during a
read or write, and modifies the panic message to nudge users to hunt
down the failing write operation if the panic they are seeing relates to
a read.


![image](https://github.com/user-attachments/assets/6d91b5ea-95f5-470b-992f-1abfa116c838)

---------

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
Co-authored-by: Eric Rudder <ericrudder@users.noreply.github.com>
2024-09-04 21:22:18 +00:00
..
client Fix deployment settings serialization and keys consistency (#16904) 2024-08-12 19:28:13 +00:00
testdata [snapshot] Use a newer diff package 2023-05-16 12:33:30 -07:00
backend.go Add GetStoredCredentials to pkg workspace (#17106) 2024-08-29 16:04:27 +00:00
backend_test.go Add GetStoredCredentials to pkg workspace (#17106) 2024-08-29 16:04:27 +00:00
console.go Add support for a PULUMI_CONSOLE_DOMAIN env var (#4410) 2020-04-17 11:50:00 -07:00
console_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
diffs.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
diffs_post_1.20.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
diffs_pre_1.20.go [snapshot] Use a newer diff package 2023-05-16 12:33:30 -07:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
environments.go [cli] Include config from ESC in `pulumi config` (#14560) 2023-11-21 10:44:45 +00:00
mock.go Update pu/pu to support deployment run command (#16492) 2024-07-01 14:18:44 +00:00
policypack.go Replace `result.Result` with native errors (#17044) 2024-08-22 14:39:59 +00:00
snapshot.go Lift context parameter to SerializeDeployment/Resource/Operations/Properties (#15929) 2024-04-15 07:45:46 +00:00
snapshot_test.go Add display to the engine tests (#16050) 2024-05-13 07:18:25 +00:00
stack.go Move GetBackendConfigDefaultOrg to pkg workspace (#17105) 2024-08-29 13:22:56 +00:00
state.go Improve snapshot integrity panics depending on operation (#17144) 2024-09-04 21:22:18 +00:00
token_source.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
token_source_test.go Skip TestTokenSourceWithQuicklyExpiringInitialToken (#16515) 2024-06-28 07:42:46 +00:00