oscerd opened a new issue, #2971:
URL: https://github.com/apache/camel-kamelets/issues/2971
Two source Kamelets behave in ways their schema does not describe.
### 1. `dropbox-source` deletes every file it consumes
```yaml
- toD: "dropbox:get?...&remotePath=${exchangeProperty.dropboxFileName}"
...
- toD: "dropbox:del?...&remotePath=${exchangeProperty.dropboxFileName}"
```
The `del` is unconditional. There is no `deleteAfterRead` property, and the
Kamelet description says only "Consume Files". An operator reading the schema
has no way to learn that running this Kamelet empties the folder it polls.
Every other consuming source that destroys what it reads declares the
behaviour — `azure-storage-blob-source` has a `deleteAfterRead` property
(default `false`).
Proposal: add a declared `deleteAfterRead` property defaulting to `false`
and gate the `dropbox:del` step behind it, matching the azure blob source. Note
this flips the default behaviour, so it needs an upgrade note.
### 2. `azure-storage-blob-event-based-source` matches the container by
substring
`kamelets/azure-storage-blob-event-based-source.kamelet.yaml:155`
```yaml
- simple: '${exchangeProperty.azure-storage-blob-event-type} ==
"Microsoft.Storage.BlobCreated" &&
${exchangeProperty.azure-storage-blob-subject} contains "{{containerName}}"'
```
The Event Grid subject has the form
`/blobServices/default/containers/<container>/blobs/<path>`, and `<path>` is
chosen by whoever uploaded the blob. `contains` therefore matches on the blob
path as well as the container segment, so an event for a container the operator
did not configure can satisfy the guard whenever the configured name appears
anywhere in the subject.
The `google-storage-event-based-source` sibling uses strict equality for the
same job.
Proposal: parse the `/containers/<name>/blobs/` segment and compare it for
equality, as google does.
_Claude Code on behalf of Andrea Cosentino_
--
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]