oscerd opened a new issue, #2958:
URL: https://github.com/apache/camel-kamelets/issues/2958

   Two related cases where `spec.definition` and the template disagree.
   
   **1. `queueURL` is declared but never used**
   
   ```
   kamelets/aws-sqs-source.kamelet.yaml:85
   kamelets/aws-s3-event-based-source.kamelet.yaml:122
   ```
   
   Both declare a `queueURL` property, but neither template references it — 
`grep -c '{{queueURL}}'` returns 0 in both files. The `from:` URIs bind only 
`queueNameOrArn`. An operator who sets `queueURL` gets no effect and no warning.
   
   Fix: either bind it (`queueUrl: "{{?queueURL}}"`) or drop the property from 
both schemas.
   
   **2. Precondition fallbacks invert the declared schema defaults**
   
   Five templates use `${properties:X:true}` as the fallback in a precondition 
while the schema declares `default: false` for the same property:
   
   | file | property | schema default | fallback |
   |---|---|---|---|
   | `azure-storage-blob-source.kamelet.yaml:182` | `deleteAfterRead` | `false` 
| `true` |
   | `aws-s3-event-based-source.kamelet.yaml:184` | `getObject` | `false` | 
`true` |
   | `azure-storage-blob-event-based-source.kamelet.yaml:135` | `getBlob` | 
`false` | `true` |
   | `google-storage-event-based-source.kamelet.yaml:99` | `getObject` | 
`false` | `true` |
   | `set-kafka-key-action.kamelet.yaml:60` | `forceHeaderDeletion` | `false` | 
`true` |
   
   (`cassandra-sink.kamelet.yaml:114` uses the same idiom but is consistent — 
schema default is `true`.)
   
   Whether the fallback is ever reached depends on whether the consuming 
runtime materialises `spec.definition` defaults before evaluating 
preconditions. For the Camel Kamelet loader it appears not to be reached, but 
that is not obviously guaranteed for every supported consumer (camel-k 
operator, camel-kafka-connector, Camel JBang). The `azure-storage-blob-source` 
case is the one that matters most, since the fallback direction is "delete the 
blob".
   
   Fix is one word per site — change the fallback to match the declared default 
(`:false`) — and is safe regardless of which runtime behaviour holds.
   
   _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]

Reply via email to