Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16818

camel-core - route dump dose not print correct route with kamelet eip

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.11.0
    • 3.11.1, 3.12.0
    • camel-core
    • None
    • Unknown

    Description

      Using route dump option of camel context does not print the correct route in case of using kamelet eip.

      Find the reproducer here: https://github.com/valdar/camel/tree/issue/16818

      run:

      ./mvnw clean verify -pl :camel-kamelet -Dtest=KameletRouteDumpTest
      

      the test will pass but in the test log that you can find in components/camel-kamelet/target/camel-kamelet-test.log this is what is printed as route:

      <routes xmlns="http://camel.apache.org/schema/spring">
      
          <route customId="true" id="test">
              <from uri="direct:templateEmbedded"/>
              <kamelet id="kamelet1" name="setBody?bodyValue=test"/>
          </route>
      
          <route customId="true" id="setBody-1" template="true">
              <from uri="kamelet://source?routeId=setBody-1"/>
              <setBody id="setBody1">
                  <constant>{{bodyValue}}</constant>
              </setBody>
              <to id="to2" uri="kamelet://sink?routeId=setBody-1"/>
          </route>
      
      </routes>
      

      but there should be a to(...) statement after <kamelet id="kamelet1" name="setBody?bodyValue=test"/> in the route with id=test.

      Attachments

        Activity

          valdar Andrea Tarocchi created issue -
          valdar Andrea Tarocchi made changes -
          Field Original Value New Value
          Environment Find the reproducer here:

          run:
          {code:bash}
          ./mvnw clean verify -pl :camel-kamelet -Dtest=KameletRouteDumpTest
          {code}

          the test will pass but in the test log that you can find in {{components/camel-kamelet/target/camel-kamelet-test.log}} this is what is printed as route:

          {code:xml}
          <routes xmlns="http://camel.apache.org/schema/spring">

              <route customId="true" id="test">
                  <from uri="direct:templateEmbedded"/>
                  <kamelet id="kamelet1" name="setBody?bodyValue=test"/>
              </route>

              <route customId="true" id="setBody-1" template="true">
                  <from uri="kamelet://source?routeId=setBody-1"/>
                  <setBody id="setBody1">
                      <constant>{{bodyValue}}</constant>
                  </setBody>
                  <to id="to2" uri="kamelet://sink?routeId=setBody-1"/>
              </route>

          </routes>
          {code}

          but there should be a {{to(...)}} statement after {{<from uri="direct:templateEmbedded"/>}} in the route with {{id=test}}.
          valdar Andrea Tarocchi made changes -
          Description Using route dump option of camel context does not print the correct route in case of using \{{kamelet}} eip. Using route dump option of camel context does not print the correct route in case of using \{{kamelet}} eip.

          Find the reproducer here: https://github.com/valdar/camel/tree/issue/16818

          run:
          {code:bash}
          ./mvnw clean verify -pl :camel-kamelet -Dtest=KameletRouteDumpTest
          {code}

          the test will pass but in the test log that you can find in {{components/camel-kamelet/target/camel-kamelet-test.log}} this is what is printed as route:

          {code:xml}
          <routes xmlns="http://camel.apache.org/schema/spring">

              <route customId="true" id="test">
                  <from uri="direct:templateEmbedded"/>
                  <kamelet id="kamelet1" name="setBody?bodyValue=test"/>
              </route>

              <route customId="true" id="setBody-1" template="true">
                  <from uri="kamelet://source?routeId=setBody-1"/>
                  <setBody id="setBody1">
                      <constant>{{bodyValue}}</constant>
                  </setBody>
                  <to id="to2" uri="kamelet://sink?routeId=setBody-1"/>
              </route>

          </routes>
          {code}

          but there should be a {{to(...)}} statement after {{<from uri="direct:templateEmbedded"/>}} in the route with {{id=test}}.
          valdar Andrea Tarocchi made changes -
          Affects Version/s 3.11.0 [ 12350096 ]
          valdar Andrea Tarocchi made changes -
          Description Using route dump option of camel context does not print the correct route in case of using \{{kamelet}} eip.

          Find the reproducer here: https://github.com/valdar/camel/tree/issue/16818

          run:
          {code:bash}
          ./mvnw clean verify -pl :camel-kamelet -Dtest=KameletRouteDumpTest
          {code}

          the test will pass but in the test log that you can find in {{components/camel-kamelet/target/camel-kamelet-test.log}} this is what is printed as route:

          {code:xml}
          <routes xmlns="http://camel.apache.org/schema/spring">

              <route customId="true" id="test">
                  <from uri="direct:templateEmbedded"/>
                  <kamelet id="kamelet1" name="setBody?bodyValue=test"/>
              </route>

              <route customId="true" id="setBody-1" template="true">
                  <from uri="kamelet://source?routeId=setBody-1"/>
                  <setBody id="setBody1">
                      <constant>{{bodyValue}}</constant>
                  </setBody>
                  <to id="to2" uri="kamelet://sink?routeId=setBody-1"/>
              </route>

          </routes>
          {code}

          but there should be a {{to(...)}} statement after {{<from uri="direct:templateEmbedded"/>}} in the route with {{id=test}}.
          Using route dump option of camel context does not print the correct route in case of using \{{kamelet}} eip.

          Find the reproducer here: https://github.com/valdar/camel/tree/issue/16818

          run:
          {code:bash}
          ./mvnw clean verify -pl :camel-kamelet -Dtest=KameletRouteDumpTest
          {code}

          the test will pass but in the test log that you can find in {{components/camel-kamelet/target/camel-kamelet-test.log}} this is what is printed as route:

          {code:xml}
          <routes xmlns="http://camel.apache.org/schema/spring">

              <route customId="true" id="test">
                  <from uri="direct:templateEmbedded"/>
                  <kamelet id="kamelet1" name="setBody?bodyValue=test"/>
              </route>

              <route customId="true" id="setBody-1" template="true">
                  <from uri="kamelet://source?routeId=setBody-1"/>
                  <setBody id="setBody1">
                      <constant>{{bodyValue}}</constant>
                  </setBody>
                  <to id="to2" uri="kamelet://sink?routeId=setBody-1"/>
              </route>

          </routes>
          {code}

          but there should be a {{to(...)}} statement after {{<kamelet id="kamelet1" name="setBody?bodyValue=test"/>}} in the route with {{id=test}}.
          davsclaus Claus Ibsen made changes -
          Assignee Claus Ibsen [ davsclaus ]
          davsclaus Claus Ibsen made changes -
          Fix Version/s 3.12.0 [ 12350283 ]
          davsclaus Claus Ibsen made changes -
          Summary route dump dose not print correct route with kamelet eip camel-core - route dump dose not print correct route with kamelet eip
          davsclaus Claus Ibsen made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          davsclaus Claus Ibsen made changes -
          Component/s camel-core [ 12313938 ]
          davsclaus Claus Ibsen made changes -
          Fix Version/s 3.11.1 [ 12350361 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]

          People

            davsclaus Claus Ibsen
            valdar Andrea Tarocchi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: