Commit Graph

3 Commits

Author SHA1 Message Date
Fraser Waters 6f21cac6f3
Make `engine.NewEvent` type safe ()
<!--- 
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. -->
Small refactor I noticed while writing a test with engine events. We
always had to call `NewEvent` with the tag and payload value for an
event and these _had_ to match up else the engine panics. But we can
just pass the payload and type switch to work out the tag. Means one
less parameter to pass to `NewEvent` and pretty much no chance of it
going wrong. To ensure there's really no chance I've added a generic
union type so you can only pass payload types to this method now.

Cancel had to be handled separately because it doesn't have a payload
type, it's just nil.
2023-11-16 16:54:03 +00:00
Fraser Waters 4ebf61f896
Move sdk/go/common/display to /pkg/display ()
Similar to how https://github.com/pulumi/pulumi/pull/13953 moves some
code from sdk/go/common to /pkg. This display code is only used in /pkg,
another simple reduction of what's in sdk/go/common.
2023-09-18 11:01:28 +00:00
Kyle Dixler d5f42a56e0
Add more detail to update display to indicate `retainOnDelete` usage.
Retain on delete currently applies to replaces and deletes. It is
unclear when a resource is retained on delete. To clarify this, this
commit:
- Improves update status messages with "[retain]"
to clarify when a resource is retained on delete and dropped.
- Adds info warning on preview as to which resources will be dropped in the cloud environment.
2023-04-05 17:25:23 -07:00