pulumi / pulumi-java

Java support for Pulumi
Apache License 2.0
64 stars 19 forks source link

Fail fast on schema lookup failures #1357

Closed lunaris closed 2 months ago

lunaris commented 2 months ago

Presently, if an input program is ill-formed (e.g. refers to attributes that do not appear in the schema), we will generate an ill-formed output program instead of failing with an error. Specifically we will generate Java code containing PANICs where we fail to dereference nils picked up as a result of failed schema lookups. This commit fixes this behaviour so that Java code generation proceeds as we do for other languages -- validating schema lookups and failing outright instead of generating ill-formed programs.