Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
11382: Keep resource refs when invoking `pulumi:pulumi:getResource` r=justinvp a=justinvp We used to always keep resource references when marshaling the results of `pulumi:pulumi:getResource`, but this regressed in #9323 to only keep resource if the invoke request's `acceptResources` flag was set. Unfortunately, that flag is not being set when calling `pulumi:pulumi:getResource` in the Go, Node.js, and Python SDKs (although, it is being set for .NET and Java). Two fixes: 1. Update the monitor to go back to always keeping resources when `pulumi:pulumi:getResource` is being invoked. This way, older SDKs that are not setting `acceptResources` will go back to the original behavior. 2. Update the SDKs to always set `acceptResources`, so that these newer versions of the SDKs will work with older engines that are checking `acceptResources`. (2) will help us with EKS 1.0. We'll be able to update EKS to use a version of ``@pulumi/pulumi`` with the fix to set the `acceptResources` flag. Note: We definitely need tests to lock-in the behavior here so it doesn't re-regress in the future. But I also would like to get the nodejs SDK fix in the next release, because we need it for EKS. So, I'd like to add the tests as a follow-up to this PR, unless someone feels strongly it needs to be included with this change. Fixes #11380 Co-authored-by: Justin Van Patten <jvp@justinvp.com>
- Loading branch information
Showing
6 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...ng/20221116--engine--always-keep-resources-when-pulumi-pulumi-getresource-is-invoked.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
changes: | ||
- type: fix | ||
scope: engine | ||
description: Always keep resources when pulumi:pulumi:getResource is invoked |
4 changes: 4 additions & 0 deletions
4
...6--sdk-go-nodejs-python--set-acceptresources-when-invoking-pulumi-pulumi-getresource.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
changes: | ||
- type: fix | ||
scope: sdk/go,nodejs,python | ||
description: Set acceptResources when invoking pulumi:pulumi:getResource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters