gnodet-bot commented on code in PR #26447:
URL: https://github.com/apache/camel/pull/26447#discussion_r4010877132


##########
components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletComponent.java:
##########
@@ -101,13 +101,6 @@ public class KameletComponent extends DefaultComponent {
     public KameletComponent() {

Review Comment:
   ๐Ÿงช **Missing regression test for the reported issue**
   
   The PR description references [a test 
case](https://github.com/bartoszpop/CAMEL-24747/blob/main/src/test/java/io/github/bartoszpop/camel/Camel27474Test.java)
 in an external repo but provides no test in-tree demonstrating the `toD` vs 
`to` inconsistency. Without a test here, there's no guarantee the fix actually 
works, and no protection against future regressions.
   
   A test should demonstrate: when a kamelet parameter contains a URL-special 
character (e.g. `%` or `+`) and the kamelet is invoked via `toD`, the parameter 
arrives at the underlying component exactly as specified.



##########
components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletComponent.java:
##########
@@ -101,13 +101,6 @@ public class KameletComponent extends DefaultComponent {
     public KameletComponent() {

Review Comment:
   โš ๏ธ **Incomplete revert โ€” will break `AwsRawSecretTest` and 
`KameletGlobalPropertiesTest`**
   
   Camel-22511 introduced three coordinated changes:
   1. `useRawUri()=true` (removed here)
   2. `resolveRawParameterValues()=false` (still at line ~278)
   3. Manual `URISupport.resolveRawParameterValues(parameters)` call in 
`createEndpoint()` (still at line ~139)
   
   With `useRawUri()=true` removed, `DefaultComponent.createEndpoint()` will 
now encode the URI before parsing it (`UnsafeUriCharactersEncoder.encode(uri)` 
+ `URISupport.parseParameters(u)`). This means parameters like 
`accessKey=my@+id` get encoded to `accessKey=my%40%2Bid` before 
`KameletComponent.createEndpoint()` sees them. The manual 
`URISupport.resolveRawParameterValues(parameters)` call then strips `RAW()` 
tokens from the already-encoded map โ€” it doesn't decode percent-encoded 
characters. The secret keys arrive corrupted.
   
   `AwsRawSecretTest` (added by CAMEL-22511) uses exactly these special 
characters (`my@+id`, `my%^+|key`) and will fail after this revert. 
`KameletGlobalPropertiesTest.urlEncodingIsRespected()` was updated by the same 
commit to pass raw URIs with literal spaces and slashes โ€” it will also fail.
   
   The revert needs to be all-or-nothing: if you revert `useRawUri()`, you must 
also revert `resolveRawParameterValues()=false`, restore the original 
`KameletGlobalPropertiesTest.urlEncodingIsRespected()` (with percent-encoded 
URIs), remove `AwsRawSecretTest`, and update the 4.16 upgrade guide.



-- 
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