-
Notifications
You must be signed in to change notification settings - Fork 44
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
gcp:cloudfunctions:Function: Type checking failed (environmentVariables) #1979
Comments
Hey @rh4ll, thank for reporting the issue and sorry you've had trouble. We'll address this as soon as possible! |
@rh4ll looking at the latest GCP docs it looks like the environmentVariables input is now typed as a Map instead of a List[Map] - https://www.pulumi.com/registry/packages/gcp/api-docs/cloudfunctions/function/#environment_variables_python Does your error go away if you edit your code to pass in a Map instead of a List[Map]? e.g. |
No the typing of environmentVariables requires an array |
Ah maybe not. Give me a few mins |
Ergh yeah, that's sorted it. |
No, not superfluous at all - the panic you got is a pretty bad UX and the CLI should have emitted a nicer error message instead. |
CC @corymhall FYI. We recently introduced the type-checking pass specifically so it would provide some guidance like Very much worth it to fix the typo obviously, thank you for spotting that. |
Upstream providers are allowed to panic when they get invalidly typed inputs. We are following up now for improving the UX when this happens. |
This adds a regression test for the warnings we issue to users when a property has the wrong type. This could result in panics down the line, so we need to catch them early. Testing this in the bridge is currently quite hard as we can't use YAML for this because it is too strict in type-checking. We only have unit tests which indirectly test this but these break under PRC. This was introduced in pulumi/pulumi-terraform-bridge#1987 original GCP issue: pulumi/pulumi-terraform-bridge#1979 Bridge issue for integration tests for the feature: pulumi/pulumi-terraform-bridge#2418
What happened?
Updating from 6.67.0 to @pulumi/gcp > 7.10.0 (present in 7.22.0 too)
Run pulumi up on a stack, containing a pre existing cloud function using an environment variable
Get error:
NOTE: The typo in the error message. "/pului/
Example
Create a function similar to below in 6.67.0 then attempt to update to 7.22.0
Get specified error with the following stack trace
Output of
pulumi about
original
pulumi:providers:gcp urn:pulumi:production::quill-infrastructure::pulumi:providers:gcp::default_6_67_0
new
pulumi:providers:gcp urn:pulumi:production::quill-infrastructure::pulumi:providers:gcp::default_7_22_0
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: