Repository navigation
Conversation
…s of the incoming message first Each sink and action that calls a component now removes the headers of that component as its first step, so a header that comes with the message cannot change the bucket, destination, operation or address the Kamelet was configured with. The template's own setHeader steps run after it, and the headers a Kamelet documents as input are kept. - 88 Kamelets: removeHeaders with the component prefix, and a sentence in Good to know. - rest-openapi-sink, ogcapi-features-action, azure-functions-sink remove the CamelHttp* and CamelRestHttp* headers, as http-sink does. - azure-functions-sink sends the key in the x-functions-key header instead of the code query parameter. - KameletsRemoveHeadersTest checks the first step of every changed Kamelet; HttpKameletsTargetTest runs the HTTP Kamelets against local servers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
…ers of the incoming message first The Salesforce producer reads CamelSalesforceSObjectName, CamelSalesforceSObjectId and similar headers ahead of the endpoint options; the component catalog lists only its consumer headers, so the first scan missed these sinks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
davsclaus
force-pushed
the
ci-issue-3240
branch
from
November 18, 2026 21:44
033e233 to
5e02844
Compare
…(keyInHeader) and only strips the HTTP headers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
…n (keyInHeader) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3240.
Each sink and action that calls a Camel component now removes the headers of that component as its first step, so a header that comes along with the message cannot change what the Kamelet was configured to do.
Changes
removeHeadersstep with the prefix of the component (such asCamelAwsS3*,CamelJms*,CamelKafka*,CamelSmpp*,CamelSalesforce*) is the first step of the template, and a sentence in "Good to know" says so.file,keyand similar headers, run after it and keep working.excludePattern, for exampleCamelSmppDestAddr,CamelAwsS3ContentTypeandCamelAwsS3StorageClass,CamelAwsDdbOperation,CamelPulsarProducerMessageKey,CamelCouchbaseId,CamelFileNamefor the FTP/SFTP/SCP sinks, andCamelKafkaKeyandCamelKafkaOverrideTopicfor the Kafka sinks (set by the key and router actions).rest-openapi-sink,ogcapi-features-actionandazure-functions-sinkremove theCamelHttp*andCamelRestHttp*headers, ashttp-sinkdoes.main(chore: the Azure Event Hubs, Cosmos DB and Functions Kamelets take more options (#3170) #3218): thecodequery parameter, or thex-functions-keyheader withkeyInHeader=true. This PR only replaces itsremoveHeader: CamelHttpUriwith theCamelHttp*/CamelRestHttp*strip.exec-sinkandssh-sink(they take the command from headers by design), the actions whose job is to set headers (Kafka router and key actions,insert-header-action, ...), and the Kamelets that already removed their headers before the call (SQL sinks,cassandra-sink,http-sink,mail-sink,aws-ec2-sink,aws-bedrock-agent-sink,docling-convert-action).Rebased onto the #3170 option PRs
google-pubsub-sink: chore: the Google Pub/Sub, Cloud Storage and BigQuery Kamelets take ack, ordering, move and insert ID options (#3170) #3227 addedmessageOrderingEnabled, which reads theCamelGooglePubsubOrderingKeyheader, so that header is kept (excludePattern) and listed in Good to know.aws-translate-action: thesourceLanguagedescription no longer says aCamelAwsTranslateSourceLanguageheader on the message takes precedence, as that header is now removed.azure-functions-sink: keepskeyInHeaderfrom chore: the Azure Event Hubs, Cosmos DB and Functions Kamelets take more options (#3170) #3218 (template and docs partial unchanged apart from the header strip).Tests
KameletsRemoveHeadersTest: for every changed Kamelet (table inremove-headers/kamelets.csv), the first step is the expectedremoveHeaders, andMessage.removeHeaderswith that pattern removes a header of the component and keeps the documented inputs.HttpKameletsTargetTest: runsrest-openapi-sink,ogcapi-features-actionandazure-functions-sink(with the key in the query, and withkeyInHeader=true) against a local server, withCamelHttpUri,CamelHttpPath,CamelHttpQuery,CamelRestHttpUriand similar headers on the message, and checks that the request goes to the configured server, path and query. These tests fail on the templates ofmain../mvnw clean installpasses.Upgrade
A flow that set such a header on purpose before a sink now has to use the option of the Kamelet, or call the Camel component directly. To be added to the upgrade notes (#3190).
Claude Code on behalf of Claus Ibsen
🤖 Generated with Claude Code