pulumi/pkg/backend/diy
Will Jones 60a10a6f8e
Persist metadata about snapshot integrity errors (#17291)
In #17047, we introduced a panic-like error banner for snapshot
integrity issues. In #17144, we improved this to prompt users to provide
information about the operation that *wrote* an invalid snapshot, should
the error be encountered on a later *read*. In this commit, we take
things one step further, persisting the writing command to the snapshot
as metadata in the event that we are about to write an invalid snapshot.
Should an error be encountered on a later read, we are now able to pluck
the metadata out of the snapshot and include it in the error banner
ourselves. This should hopefully further improve the situation when it
comes to tracking down bugs in the engine.

Note that, like all changes to snapshot persistence, new snapshot fields
(in this case, the metadata we now collect) may be clobbered by older
versions of the CLI. That is, if a latest-version CLI writes metadata, a
version older than this commit may erase it, by virtue of ignoring data
it does not understand during deserialization. While unfortunate, this
is also useful information in the event a user raises an issue, since it
(in theory) tells us that a version older than that containing this
commit was involved in the process, which may help diagnosis.
2024-11-06 17:35:27 +00:00
..
backend.go try to keep machine awake during pulumi operations (DIY edition) (#17699) 2024-11-06 14:03:26 +00:00
backend_legacy_test.go Introduce snapshot metadata (#17430) 2024-09-30 16:45:40 +00:00
backend_test.go Introduce snapshot metadata (#17430) 2024-09-30 16:45:40 +00:00
bucket.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
bucket_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
doc.go Rename filestate to DIY (#15314) 2024-01-30 15:53:10 +00:00
lock.go Rename filestate to DIY (#15314) 2024-01-30 15:53:10 +00:00
meta.go Rename filestate to DIY (#15314) 2024-01-30 15:53:10 +00:00
meta_test.go Rename filestate to DIY (#15314) 2024-01-30 15:53:10 +00:00
pool.go Rename filestate to DIY (#15314) 2024-01-30 15:53:10 +00:00
pool_test.go Rename filestate to DIY (#15314) 2024-01-30 15:53:10 +00:00
snapshot.go Persist initial states in DIY backend (#17372) 2024-09-26 14:45:09 +00:00
stack.go Replace `result.Result` with native errors (#17044) 2024-08-22 14:39:59 +00:00
state.go Persist metadata about snapshot integrity errors (#17291) 2024-11-06 17:35:27 +00:00
store.go Rename filestate to DIY (#15314) 2024-01-30 15:53:10 +00:00
store_test.go Rename filestate to DIY (#15314) 2024-01-30 15:53:10 +00:00