[ 
https://issues.apache.org/jira/browse/CAMEL-27110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18146218#comment-18146218
 ] 

Federico Mariani commented on CAMEL-27110:
------------------------------------------

On camel-4.18.x not only the tests fail: {{camel bind ... --step 
set-body-action}} itself fails with {{named capturing group is missing trailing 
'}'}}, because the bind templates are filled with {{replaceFirst}}, which reads 
the {{$\{header.orderId\}}} of the example as a regex group reference. 
camel-4.22.x and main fill them with {{String.replace}} since 53b399d885e9.

PRs: https://github.com/apache/camel/pull/30279 (camel-4.22.x, tests only), 
https://github.com/apache/camel/pull/30280 (camel-4.18.x, the template part of 
53b399d885e9 and the tests).

_Claude Code on behalf of Federico Mariani_

> camel-jbang - BindTest fails on camel-4.22.x and camel-4.18.x: the 
> set-body-action Kamelet now has an example value
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27110
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27110
>             Project: Camel
>          Issue Type: Test
>          Components: camel-jbang
>            Reporter: Federico Mariani
>            Assignee: Federico Mariani
>            Priority: Major
>             Fix For: 4.18.6, 4.22.3
>
>
> {{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_



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

Reply via email to