Fix #2971: declare dropbox-source's delete, and match the azure blob container exactly - #2974
Merged
Conversation
… blob container exactly
dropbox-source deleted every file it consumed with no property controlling
it and no mention in the description. Declare a deleteAfterRead property
and gate the dropbox:del step on it. The default is true, not false: the
Kamelet polls with a timer and keeps no record of what it has read, so
turning the delete off makes every poll re-deliver the whole folder. The
behaviour is unchanged; it is now visible in the schema and switchable.
The gate uses {{deleteAfterRead}} rather than ${properties:...} so the
property counts as used, avoiding another entry in the validator's
unused-parameter exclusion list.
azure-storage-blob-event-based-source guarded its fetch with
"subject contains containerName". The Event Grid subject is
/blobServices/default/containers/<container>/blobs/<path>, and <path> is
chosen by the uploader, so the guard also matched on the blob path and on
containers whose name merely has the configured one as a prefix. Match the
container segment exactly instead.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
davsclaus
approved these changes
Aug 24, 2026
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 #2971
1.
dropbox-source— the delete is now declared and switchableThe Kamelet deleted every file it consumed via an unconditional
dropbox:del, with no property controlling it and no mention in the description ("Consume Files"). An operator reading the schema had no way to learn the folder gets emptied.The default is
true, notfalse— deliberately. My first pass at this issue proposedfalseto matchazure-storage-blob-source, which was wrong:dropbox-sourcepolls withtimer+dropbox:searchand has no idempotent consumer or repository. The delete is what stops the next poll re-delivering the same files, so defaulting it off would turn everyperiodtick into a re-delivery of the whole folder.So this is a no-op at runtime. What changes is that the destruction is now visible in the schema and in tooling, and an operator who has added their own idempotency can switch it off. Making
falsesafe would additionally need an idempotent consumer — noted in the issue as separate work.The gate uses
{{deleteAfterRead}}rather than the${properties:deleteAfterRead:true}form the sibling Kamelets use. That is not cosmetic:${properties:...}does not register as a use, so the validator rejects the property as declared-but-unused, and the existing Kamelets work around that by being listed inverifyUsedParams's exclusion list inscript/validator/validator.go. Addingdropbox-sourcethere would disable the unused-parameter check for every property in the file. Verified both branches withcamel run: default → delete runs,deleteAfterRead=false→ skipped.2.
azure-storage-blob-event-based-source— exact container matchThe subject comes from the Event Grid event's
$.subject, shaped/blobServices/default/containers/<container>/blobs/<path>, where<path>is chosen by whoever uploaded the blob.containstherefore matched on the blob path too. Thegoogle-storage-event-based-sourcesibling already uses strict equality.Verified with
camel run:/blobServices/default/containers/mycontainer/blobs/report.csvmycontainer/blobServices/default/containers/other/blobs/mycontainer/evil.csvmycontainer/blobServices/default/containers/mycontainer-staging/blobs/x.csvmycontainerThe last two both matched under
contains.Verification
script/validatorreports no errorsmvn verifypassescamel runas described; no live Dropbox or Azure endpoint involvedClaude Code on behalf of Andrea Cosentino