KaotoIO / kaoto-ui

Frontend for the Kaoto project to provide an easy-to-use integration framework based on Apache Camel.
https://www.kaoto.io
Apache License 2.0
89 stars 44 forks source link

Route is not displayed correctly #1628

Open lhein opened 1 year ago

lhein commented 1 year ago

Describe the Bug

When copy & paste the route at https://pastebin.com/raw/5GjkzGfN to the code editor the displayed route on the canvas is not correct and the code is partially getting discarded. See picture.

grafik

Steps to Reproduce the Bug or Issue

  1. copy & paste the code from https://pastebin.com/raw/5GjkzGfN to the Kaoto internal editor and hit "Apply"
  2. see the result in both editor and graphical view

Screenshots or Videos

No response

Platform

apupier commented 1 year ago

reproducing with a simpler route (which can still be surely simplified):

- from:
    uri: timer:trigger-gitter-streaming
    parameters:
      repeatCount: 1
    steps:
    - wire-tap:
        uri: kamelet:sink
    - set-body:
        expression:
          simple: {}

Ui is fine with an unknown kamelet URi:

- from:
    uri: timer:trigger-gitter-streaming
    parameters:
      repeatCount: 1
    steps:
    - wire-tap:
        uri: kamelet:unknown
    - set-body:
        expression:
          simple: {}

and UI is fine too with a log URI:

- from:
    uri: timer:trigger-gitter-streaming
    parameters:
      repeatCount: 1
    steps:
    - wire-tap:
        uri: log:try
    - set-body:
        expression:
          simple: {}

so i guess that the kamelet:sink has a special and wrong handling

kahboom commented 1 year ago

Is this definitely a frontend issue?

apupier commented 1 year ago

i would say that there is an issue visible in the frontend but that there was no investigations done yet to determine in which component it needs to be fixed.

lordrip commented 1 year ago

Yes, the special handling is for the END steps:

kamelet-sink is one of those steps:

name: "kamelet:sink"
type: "END"
id: "kamelet:sink-END"

that's why no other step can be further linked. I would need to investigate where this logic is placed to look for a solution.