Error: /home/runner/work/pulumi-grafana/pulumi-grafana/sdk/dotnet/Config/Config.cs(119,127): error CS0019: Operator '??' cannot be applied to operands of type 'ImmutableArray<string>' and 'string' [/home/runner/work/pulumi-grafana/pulumi-grafana/sdk/dotnet/Pulumiverse.Grafana.csproj]
Output of pulumi about
NA. Codegen was on v3.118.0.
Additional context
Waiting until we check if SDKs compile is confusing to users and might not catch the bug until runtime for a python based provider. Pulumi should fail fast when invalid default values are supplied and give the user an actionable error message.
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).
For better or worse, we should start with a warning. We've run into issues when we immediately made things stricter with an error (e.g. https://github.com/pulumi/pulumi/issues/14631).
What happened?
This was raised internally: https://pulumi.slack.com/archives/C045N7FDGHW/p1719386921192569.
Example
To summarize:
A bridged provider maintainer set a default value (via env) for a provider configuration value.
At minimum, this generates invalid C# code:
https://github.com/pulumiverse/pulumi-grafana/pull/175/files#diff-95b29f66b24fa6371a2f80b462b9bf6222b7ae1a30b703b88d47d207b2c49e2aR119
The code doesn't type check:
Output of
pulumi about
NA. Codegen was on v3.118.0.
Additional context
Waiting until we check if SDKs compile is confusing to users and might not catch the bug until runtime for a python based provider. Pulumi should fail fast when invalid default values are supplied and give the user an actionable error message.
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).