pulumi/pkg/resource/stack
Thomas Gummerer 43322f276a
fix panic on deserializing deployment (#15599)
When a serialized deployment doesn't include a secrets provider
configuration, but does include ciphertexts, currently we end up with a
panic. Error out earlier if this is the case to avoid the panic.

This fixes the panic seen in
https://github.com/pulumi/pulumi/issues/15547 and
https://github.com/pulumi/pulumi/issues/14761, but it doesn't quite
explain why this is happening in the first place. I asked for some more
info from the users in these issues for that.

Putting this up as PR anyway in case anyone has any idea of why this
could be happening in the first place. I've tried spelunking through the
code, but nothing obvious stood out. It is possible that these were
still v2 snapshots that included no secrets manager, but I would be
somewhat surprised if those still existed in the wild.

Another potential solution here would be to try to pass the secret
manager from the config in to the DeserializeDeployment function, so we
could use that in these cases. It might not always be correct though, so
I'm not sure it's the right thing to do.

Thoughts?

---------

Co-authored-by: Fraser Waters <fraser@pulumi.com>
2024-03-07 09:31:57 +00:00
..
testdata [secrets] Fix + refactor bulk decryption. (#9039) 2022-02-25 08:51:52 -08:00
checkpoint.go Check qualified type for root stackness (#14714) 2023-12-04 10:36:51 +00:00
checkpoint_test.go all: Drop ioutil 2023-01-06 16:35:14 -08:00
deployment.go fix panic on deserializing deployment (#15599) 2024-03-07 09:31:57 +00:00
deployment_test.go fix panic on deserializing deployment (#15599) 2024-03-07 09:31:57 +00:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
plan.go Move sdk/go/common/display to /pkg/display (#13954) 2023-09-18 11:01:28 +00:00
secrets.go Remove b64 from the default secrets provider (#15163) 2024-01-17 13:29:51 +00:00
secrets_test.go Remove b64 from the default secrets provider (#15163) 2024-01-17 13:29:51 +00:00