Open Yufeireal opened 1 month ago
Yes, this is due to the imperfect running mechanism of the KCL evaluator, although the IDE can recognize it correctly. We will improve it in future versions, and now you need to explicitly specify the type.
b = NewInputs {
vdeployments: NewDeploymentCollectionInputs {
deploy_b: {
container_b: {
minReplicas: 2
}
}
}
}
or
b = NewInputs {
vdeployments: {
deploy_b: {
container_b: NewContainerInputs {
minReplicas: 2
}
}
}
}
Got it!! Thanks for taking a look.
General Question
Hi team, I've posted a question in our kcl slack channel: https://cloud-native.slack.com/archives/C05TC96NWN8/p1729279836481899 File an issue here in case it's a bug.
When defining schemas like this
Playground link
I got an error about expect ContainerInputs, but got a dict. However, if I change the initialization to be:
It works.
Not sure if this is expected when base schema has dynamic fields and we does not support override those dynamic fields right now. Need some help here, thanks!