-
Notifications
You must be signed in to change notification settings - Fork 116
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
[dotnet] pulumi preview
fails when giving a Provider with unknowns to a ConfigGroup
#2741
Comments
Internal discussion: https://pulumi.slack.com/archives/CPKMG4L3Z/p1704422635365439 |
I'm calling this a "panic" because it's an error that spills our internally inconsistent state. |
I believe the issue to be a bug with how the SDK uses immutable arrays. One must check Some key background information:
To reproduce, I simply set the provider's var conf = new RandomPet("conf", new RandomPetArgs{});
var eksProvider = new Kubernetes.Provider("eks-provider", new()
{
KubeConfig = conf.Id,
}); |
pulumi preview
fails when adding a Provider option to a ConfigGrouppulumi preview
fails when giving a Provider with unknowns to a ConfigGroup
The deeper issue is that Pulumi skips over invokes during preview, and here's an open issue about that: pulumi/pulumi#10209 We can still fix the kubernetes provider without a pu/pu change, by detecting that the invoke was skipped and returning an Unknown value. The scope of the fix will be the dotnet SDK. |
…2957) <!--Thanks for your contribution. See [CONTRIBUTING](CONTRIBUTING.md) for Pulumi's contribution guidelines. Help us merge your changes more quickly by adding more details such as labels, milestones, and reviewers.--> ### Proposed changes This PR fixes the "panic" that occurs when an uninitialized provider is used with the yaml/kustomize resources. In that situation, the invoke calls aren't performed and the engine simply returns an uninitialized result. This causes a problem in the callers because the methods on `ImmutableArray` mustn't be used when the value is uninitialized (`IsDefault` is true). ### Example The example given in #2741 easily repros the issue. With this fix, the behavior improves: ``` Diagnostics: kubernetes:yaml:ConfigFile (guestbook): warning: Required input properties have unknown values. Preview is incomplete. Outputs: FrontendIp: output<string> ``` ### Testing Includes integration tests involving an uninitialized provider with a `ConfigFile` or `Directory`. ### Related issues (optional) <!--Refer to related PRs or issues: #1234, or 'Fixes #1234' or 'Closes #1234'. Or link to full URLs to issues or pull requests in other GitHub repositories. --> Closes #2741
What happened?
I'm testing a C# Pulumi program with
pulumi preview
and ran into an issue using a ConfigGroup with a Provider option.I tried updating the Pulumi.Kubernetes package to use the latest alpha as it contains #2720 however the error persists.
The full error message:
Example
Program.cs File:
Source for the
app/guestbook.yaml File
Output of
pulumi about
Additional context
From Fraser regarding the error message:
I think this is the fun that invokes still run even if a provider isn't configured but there's nothing to run so they just return null but none of the deserialisers can really do anything to deal with that so you get errors likes this
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: