[BUG] Syncing a Kamelet or KameletBinding with a description returns an empty flow
lordrip opened this issue · 5 comments
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Open the source code editor
- Fill in the following YAML
Yaml
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: route-4127
spec:
description: |-
Receive all text messages that people send to your telegram bot.
source:
properties: {}
ref:
apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
name: aws-cloudtrail-source
types: {}
sink:
properties: {}
ref:
apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
name: aws-cloudwatch-sink
types: {}
- Press
sync
- See the console error as the flow is empty
Expected behavior
The backend should return a flow without steps but the rest of the information, e.g.:
JSON
{
"flows": [
{
"steps": [],
"metadata": {
"labels": {
"camel.apache.org/kamelet.type": "action"
},
"annotations": {},
"additionalProperties": {},
"name": "route-2782-action",
"definition": {
"properties": {},
"title": ""
},
"beans": null,
"dependencies": [
"camel:core"
],
"spec": {
"definition": {
"properties": {},
"title": ""
},
"dependencies": [
"camel:core"
],
"template": {}
}
},
"parameters": [],
"dsl": "Kamelet"
}
]
}
@lordrip there's no description
under Kamelet spec
, did you mean /spec/definition/description
for Kamelet?
https://camel.apache.org/camel-k/1.12.x/apis/kamelets.html#_camel_apache_org_v1alpha1_JSONSchemaProps
It's successfully preserved.
For KameletBinding, I can't find description
explicitly declared, it could be in metadata
, but not yet sure.
https://camel.apache.org/camel-k/1.12.x/apis/kamelets.html#_camel_apache_org_v1alpha1_KameletBinding
EDIT: KameletBinding doesn't have description
ATM.
apache/camel-k#4535
The issue would be rather returning an empty integration JSON instead of just removing invalid property - or did we decide to return an error instead so that frontend can stop reflecting and show the error to the user?
Releasing as now I'm not sure how it's supposed to be
Re-evaluate this once #751 and KaotoIO/kaoto-ui#1795 are addressed
I would say close this as the yaml is invalid.
The description in Bindings is stored as an annotation.