Fix codegen ignoring "plain": true fields in Args schemas #506
Labels
area/api
User visible API
area/codegen
Schema to code generator
impact/breaking
Fixing this issue will require a breaking change
impact/reliability
Something that feels unreliable or flaky
kind/bug
Some behavior is incorrect or out of spec
P2
Bugs of moderate severity to be assigned to an engineer in the next iteration
size/M
Estimated effort to complete (up to 5 days).
Milestone
Our codegen currently ignores modifier
"plain": true
in args schemas which is apparently used to mark fields that are not dynamic and have to be provided statically. Here's an example ofVpcArgs
in ts awsx:And relevant schema definition:
Each field marked with
plain: true
is not wrapped inInput
here and this means there's no way to provide anOutput
-wrapped value for it - it has to be known statically (or user has to make the whole resource part of a dynamic tree and create it inapply
(ourmap
/flatMap
) lambda). This property is upheld when resources are used in multi-language components (MLC) - in this case AWSx and EKS and Besom breaks the expectation by sending an Output due to keep outputs /outputValues
feature support (we send an output on wire protocol, serde on receiving side deserializes it correctly asOutputValue
but then the whole code expects it to be a plain type, not a wrapped one so it explodes like in #493 (this is the cause of this issue).The text was updated successfully, but these errors were encountered: