Skip to content
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

Integration tests for handling of mistyped properties #2418

Closed
VenelinMartinov opened this issue Sep 17, 2024 · 0 comments · Fixed by #2461
Closed

Integration tests for handling of mistyped properties #2418

VenelinMartinov opened this issue Sep 17, 2024 · 0 comments · Fixed by #2461
Assignees
Labels
kind/engineering Work that is not visible to an external user resolution/fixed This issue was fixed

Comments

@VenelinMartinov
Copy link
Contributor

What happened?

We introduced warnings and error handling for mistyped properties in #2000

Unfortunately it is currently quite challenging to test this as we rely on YAML for testing in the bridge and YAML checks types too strictly for this feature. The existing GRPC tests break under PRC.

We should add Python/Typescript tests for this or investigate if it is possible to make YAML less strict.

Example

.

Output of pulumi about

.

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).

@VenelinMartinov VenelinMartinov added the kind/engineering Work that is not visible to an external user label Sep 17, 2024
@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Sep 17, 2024
@VenelinMartinov VenelinMartinov removed the needs-triage Needs attention from the triage team label Sep 17, 2024
VenelinMartinov added a commit to pulumi/pulumi-gcp that referenced this issue Sep 17, 2024
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
Frassle pushed a commit to pulumi/pulumi-yaml that referenced this issue Sep 19, 2024
This adds an option to the YAML runtime to disable the type checking.
This is controlled by the `PULUMI_YAML_DISABLE_TYPE_CHECKING`
environment variable.

This is useful for tests where we need to test type mismatches which
could happen in other languages, like Python or Typescript.

Can use some guidance on how to add tests here.

Required for
pulumi/pulumi-terraform-bridge#2418
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/engineering Work that is not visible to an external user resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants