davsclaus opened a new pull request, #30398:
URL: https://github.com/apache/camel/pull/30398

   ## Backport of #30389
   
   Backport of #30389 (CAMEL-27160: Dynamic endpoint option values computed 
from the message are bound as literal text) onto `camel-4.18.x`, for 4.18.6.
   
   JIRA: [CAMEL-27160](https://issues.apache.org/jira/browse/CAMEL-27160)
   
   **Original PR:** #30389 (squash commit 13c0615acc06), which completes #30340 
by @oscerd
   **Original authors:** @oscerd, @davsclaus
   **Target branch:** `camel-4.18.x`
   
   ### Straight or adapted
   
   Adapted by hand. This branch has neither CAMEL-24282 nor CAMEL-24414: there 
is no raw uri on `NormalizedUri`, `doGetEndpoint` has a different signature, 
and the evaluated uri goes through `resolveEndpointUriPropertyPlaceholders` and 
`normalizeUri`.
   
   - **`NormalizedUri`:** new `literalOptionBinding` flag, 
`newNormalizedUri(uri, normalized, literalOptionBinding)` and 
`isLiteralOptionBinding()`. The two-argument factory delegates with `false`.
   - **`AbstractCamelContext`:** the four-argument `doGetEndpoint` delegates to 
a new five-argument one. When the flag is set, that one opens the literal 
binding scope (try/finally) around `component.createEndpoint(...)`, as on 
`main`.
   - **`DefaultCamelContextExtension`:** passes the flag on.
   - **`SendDynamicProcessor.prepareRecipient` and 
`ProcessorHelper.prepareRecipient`** (toD/enrich/wireTap, and 
recipientList/routingSlip/dynamicRouter/pollEnrich) set the flag.
   - **Clean merges:** `PropertyBindingSupport`, `EndpointHelper`, 
`DefaultRegistry`, `RawParameterHelper`, `SendDynamicAwareSupport`, 
`PollDynamicAwareSupport`.
   - **Docs:** this branch has no "Using ENV variables with raw values" section 
in `endpoint.adoc`, so the note goes into 
`faq/pages/how-do-i-configure-endpoints.adoc`.
   - **What is covered on this branch:**
     - a `#class:` or `#property:` value from the message is not resolved;
     - a `RAW(...)` value is unwrapped without evaluating `$simple{...}`, also 
on the http `SendDynamicAware` path;
     - `#bean:`, `#type:` and `#name` still resolve.
   - **What is not covered on this branch:** a `{{...}}` from the message is 
still resolved, because the evaluated uri is resolved as a string before the 
endpoint is created. Changing that needs CAMEL-24282, a behaviour change of 
4.22, which is not part of this backport. Five tests are adapted to this, each 
with a comment.
   - **Upgrade guide:** left out of this PR. The 4.18.6 note goes into 
`camel-4x-upgrade-guide-4_18.adoc` on `main`, in a separate doc PR.
   
   ### Tests
   - New tests pass: 33.
   - Wider runs:
     - the camel-core dynamic, binding, enrich, recipient, placeholder and 
registry sets (629);
     - the full camel-core suite (6963);
     - camel-support (30);
     - camel-http `*SendDynamicAware*` (12).
   - Without the change: 17 failures and 3 errors out of the 32 new tests, and 
the camel-http test fails.
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to