[ 
https://issues.apache.org/jira/browse/CAMEL-27110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Federico Mariani updated CAMEL-27110:
-------------------------------------
    Fix Version/s:     (was: 4.22.3)
      Description: 
On camel-4.18.x, {{camel bind}} fills its Pipe templates with {{replaceFirst}}, 
which reads the {{$\{...\}}} of a value as a regex group reference. A property 
such as {{--property source.message='Order $\{header.orderId\} received'}} 
makes {{camel bind}} fail with:

{code}
ERROR: named capturing group is missing trailing '}'
{code}

Since camel-kamelets #3145, {{camel bind ... --step set-body-action}} fails the 
same way: {{camel bind}} reads the Kamelets from camel-kamelets main and gives 
the step the example of the Kamelet, which now holds {{$\{header.orderId\}}}.

camel-4.22.x and main fill the templates with {{String.replace}} since 
53b399d885e9. ({{camel bind}} is removed on main, CAMEL-27002.)

The BindTest step tests that compare against camel-kamelets main are disabled 
on camel-4.22.x and camel-4.18.x by https://github.com/apache/camel/pull/30277 
and https://github.com/apache/camel/pull/30278.

_Claude Code on behalf of Federico Mariani_

  was:
{{BindTest.shouldBindWithSteps}} and {{BindTest.shouldBindWithUriSteps}} 
(camel-jbang-core) fail on camel-4.22.x and camel-4.18.x, so every pull request 
on these branches whose build reaches camel-jbang-core fails.

{{camel bind}} reads each Kamelet from the main branch of camel-kamelets 
({{github:apache:camel-kamelets:main:kamelets/<name>.kamelet.yaml}} in 
{{PipeProvider}}) and fills a step's required properties with the example value 
of the Kamelet. The {{set-body-action}} Kamelet on camel-kamelets main now has 
an example ({{"Order $\{header.orderId} received"}}), so the generated Pipe has 
that value where the tests expect the fallback {{"value"}}:

{code}
expected: ... properties:
      value: "value"
but was:  ... properties:
      value: "Order ${header.orderId} received"
{code}

The two tests now expect the example of the Kamelet. {{camel bind}} is removed 
on main (CAMEL-27002), so main is not affected.

_Claude Code on behalf of Federico Mariani_

       Issue Type: Bug  (was: Test)
          Summary: camel-jbang - camel bind on camel-4.18.x fails when a 
property value or a Kamelet example holds ${...}  (was: camel-jbang - BindTest 
fails on camel-4.22.x and camel-4.18.x: the set-body-action Kamelet now has an 
example value)

> camel-jbang - camel bind on camel-4.18.x fails when a property value or a 
> Kamelet example holds ${...}
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27110
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27110
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>            Reporter: Federico Mariani
>            Assignee: Federico Mariani
>            Priority: Major
>             Fix For: 4.18.6
>
>




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to