New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading sdk form 3.43.1 to 3.46.1 throws eror #11316
Comments
@rshade Could you link us to the automated test that failed? Is the code sample that caused the failure available? |
@RobbieMcKinstry, there's a repro in pulumi/pulumi-awsx#948, if that helps. I still haven't figured out what's going on. It appears to happen when passing an explicit |
This is a regression in the Node.js SDK introduced by #11093. pulumi/sdk/nodejs/runtime/resource.ts Lines 530 to 536 in beaf07d
#11093 added the |
11509: [sdk/nodejs] Fix regression when passing a provider to a MLC r=justinvp a=justinvp #11093 changed the Node.js SDK to pass a provider specified in a MLC's `ResourceOptions.provider` to the engine. Unfortunately, this regresses behavior that existing programs rely on. For example: ```ts import * as aws from "`@pulumi/aws";` import * as awsx from "`@pulumi/awsx";` const myRegion = new aws.Provider("us-east-1", { region: "us-east-1", }); const vpc = new awsx.ec2.Vpc("awsx-nodejs-default-args", {}, { provider: myRegion }); ``` In the above program, an explicit _aws_ provider is being passed to the _aws**x**_ `VPC` component, with the intention that the _aws_ provider will be used as the provider for all of `Vpc`'s children. With the change in #11093, the engine would try to call `Construct` for the `Vpc` using the specified `aws` provider, which does not work (it fails with `plugins that can construct components must support secrets`). This change reverts the problematic change from #11093 and adds a regression test to lock-in the previous behavior. Note: We do want to be able to support specifying a MLC's provider (to allow explicit providers for MLCs), but we'll address that in a separate change. (I'll open an issue). Fixes #11316 Co-authored-by: Justin Van Patten <jvp@justinvp.com>
11509: [sdk/nodejs] Fix regression when passing a provider to a MLC r=justinvp a=justinvp #11093 changed the Node.js SDK to pass a provider specified in a MLC's `ResourceOptions.provider` to the engine. Unfortunately, this regresses behavior that existing programs rely on. For example: ```ts import * as aws from "`@pulumi/aws";` import * as awsx from "`@pulumi/awsx";` const myRegion = new aws.Provider("us-east-1", { region: "us-east-1", }); const vpc = new awsx.ec2.Vpc("awsx-nodejs-default-args", {}, { provider: myRegion }); ``` In the above program, an explicit _aws_ provider is being passed to the _aws**x**_ `VPC` component, with the intention that the _aws_ provider will be used as the provider for all of `Vpc`'s children. With the change in #11093, the engine would try to call `Construct` for the `Vpc` using the specified `aws` provider, which does not work (it fails with `plugins that can construct components must support secrets`). This change reverts the problematic change from #11093 and adds a regression test to lock-in the previous behavior. Note: We do want to be able to support specifying a MLC's provider (to allow explicit providers for MLCs), but we'll address that in a separate change. (I'll open an issue). Fixes #11316 Co-authored-by: Justin Van Patten <jvp@justinvp.com>
What happened?
Automated testing against upgrading from 3.43.1 -> 3.46.1 thru the following error:
Steps to reproduce
Expected Behavior
Actual Behavior
Output of
pulumi about
No response
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: