You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Kubevela doesn't seem to have a mechanism to validate input fields in an Application before applying the manifest. Currently, the Application manifest deployment fails with an error with the workload output. This makes it difficult to debug, especially for end users.
To Reproduce
Steps to reproduce the behavior:
Install Kubevela and Crossplane with Upbound AWS DynamoDB provider enabled.
Install the following Component Definition
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
name: dynamodb-v0
namespace: vela-system
spec:
schematic:
cue:
template:
"output: {\n\tapiVersion: \"dynamodb.aws.upbound.io/v1beta1\"\n\tkind: \"Table\"\n\tmetadata:
name: \"tenant-\" + parameter.governance.tenantName + \"-\" + parameter.name\n\tspec:
{\n\t\tname: \"tenant-\" + parameter.governance.tenantName + \"-\" + parameter.name\n\t\tregion:
parameter.region\n\t}\n}\n\nparameter: {\n\t// +usage=Name of the DynamoDB
Table. Tenant prefix will be added automatically.\n\tname: string\n\t// +usage=AWS
region where the DynamoDB Table will be created.\n\tregion: string\n\t// +usage=Attribute
definitions, only required for hashKey and rangeKey attributes.\n\t// +usage=Governance
metadata used for attribution of resources in Kubernetes and AWS.\n\tgovernance:
{\n\t\t// +usage=Tenant name. Will be prefixed to the requested name of the
Table.\n\t\ttenantName: string\n\t}\n}\n"
workload:
definition:
apiVersion: dynamodb.aws.upbound.io/v1beta1
kind: Table
Install the following Kubevela Application with properties.name missing.
Error: run step(provider=oam,do=component-apply): GenerateComponentManifest: evaluate base template component=myapptable app=test-kubevela-dynamodb-required: failed to have the workload/trait unstructured: output.metadata.name: non-concrete value string in operand to + (and 1 more errors)
Expected behavior
We expect a relevant error from the point of view of the end user defining the Application. The current form of the error cannot be interpreted by the end user. Kubevela should validate the Application manifest before applying and return any errors.
This also upgrades the version of cuelang to v0.6.0, which adds support
for fields with "RequiredConstraint". The target for this commit is to
validate if a required fields is missing from the input parameters and
return a meaningful error useful w.r.t to the Kubevela Application.
kubevela#6505
This also upgrades the version of cuelang to v0.6.0, which adds support
for fields with "RequiredConstraint". The target for this commit is to
validate if a required fields is missing from the input parameters and
return a meaningful error useful w.r.t to the Kubevela Application.
kubevela#6505
Signed-off-by: Rahul Kumar <rahukumar@guidewire.com>
Describe the bug
Currently Kubevela doesn't seem to have a mechanism to validate input fields in an Application before applying the manifest. Currently, the Application manifest deployment fails with an error with the workload output. This makes it difficult to debug, especially for end users.
To Reproduce
Steps to reproduce the behavior:
properties.name
missing.run step(provider=oam,do=component-apply): GenerateComponentManifest: evaluate base template component=myapptable app=test-kubevela-dynamodb-required: failed to have the workload/trait unstructured: output.metadata.name: non-concrete value string in operand to + (and 1 more errors)
Expected behavior
We expect a relevant error from the point of view of the end user defining the Application. The current form of the error cannot be interpreted by the end user. Kubevela should validate the Application manifest before applying and return any errors.
KubeVela Version
Vela Core : 1.9.10
Cluster information
Additional context
0.6.0
. https://github.com/cue-lang/cue/releases/tag/v0.6.0The text was updated successfully, but these errors were encountered: