Skip to content

CAMEL-23284: Fix Pipe Kamelet properties with {{placeholder}} being URL-encoded#22406

Merged
Croway merged 1 commit intomainfrom
CAMEL-23284-main
Apr 2, 2026
Merged

CAMEL-23284: Fix Pipe Kamelet properties with {{placeholder}} being URL-encoded#22406
Croway merged 1 commit intomainfrom
CAMEL-23284-main

Conversation

@Croway
Copy link
Copy Markdown
Contributor

@Croway Croway commented Apr 2, 2026

Summary

When a Pipe YAML uses {{placeholder}} in Kamelet source/sink properties, the curly braces are URL-encoded to %7B%7B...%7D%7D by URISupport.createQueryString(), preventing Camel's property placeholder resolver from recognizing them.

Reproducer:

apiVersion: camel.apache.org/v1
kind: Pipe
metadata:
  name: placeholder-bug
spec:
  source:
    ref:
      kind: Kamelet
      apiVersion: camel.apache.org/v1
      name: timer-source
    properties:
      message: "{{my.message}}"
  sink:
    uri: "log:result"
camel run pipe.yaml --prop=my.message="Hello Camel"
# Expected: logs "Hello Camel"
# Actual:   logs "%7B%7Bmy.message%7D%7D"

Root cause: extractCamelEndpointUri() in YamlRoutesBuilderLoader calls URISupport.createQueryString(params) which URL-encodes {{ to %7B%7B and }} to %7D%7D. The encoding itself is correct and necessary for special characters, but property placeholder double-braces must be preserved.

Fix: After creating the query string, restore %7B%7B{{ and %7D%7D}} so Camel's property placeholder resolver can find them.

Jira: https://issues.apache.org/jira/browse/CAMEL-23284

@Croway Croway requested a review from oscerd April 2, 2026 12:09
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🧪 CI tested the following changed modules:

  • dsl/camel-yaml-dsl/camel-yaml-dsl
All tested modules (34 modules)
  • Camel :: Coverage
  • Camel :: Coverage [pom]
  • Camel :: JBang :: Core
  • Camel :: JBang :: Core [jar]
  • Camel :: JBang :: Integration tests
  • Camel :: JBang :: Integration tests [jar]
  • Camel :: JBang :: MCP
  • Camel :: JBang :: MCP [jar]
  • Camel :: JBang :: Main
  • Camel :: JBang :: Main [jar]
  • Camel :: JBang :: Plugin :: Edit
  • Camel :: JBang :: Plugin :: Edit [jar]
  • Camel :: JBang :: Plugin :: Generate
  • Camel :: JBang :: Plugin :: Generate [jar]
  • Camel :: JBang :: Plugin :: Kubernetes
  • Camel :: JBang :: Plugin :: Kubernetes [jar]
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: Route Parser [jar]
  • Camel :: JBang :: Plugin :: Testing
  • Camel :: JBang :: Plugin :: Testing [jar]
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: JBang :: Plugin :: Validate [jar]
  • Camel :: Kamelet Main
  • Camel :: Kamelet Main [jar]
  • Camel :: Launcher
  • Camel :: Launcher [jar]
  • Camel :: Launcher :: Container
  • Camel :: Launcher :: Container [pom]
  • Camel :: YAML DSL
  • Camel :: YAML DSL [jar]
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator [jar]
  • Camel :: YAML DSL :: Validator Maven Plugin
  • Camel :: YAML DSL :: Validator Maven Plugin [maven-plugin]

@Croway Croway merged commit 9bb6243 into main Apr 2, 2026
5 checks passed
@davsclaus davsclaus deleted the CAMEL-23284-main branch April 12, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants