davsclaus opened a new pull request, #3155:
URL: https://github.com/apache/camel-kamelets/pull/3155

   _Claude Code on behalf of Claus Ibsen_
   
   The last batch of Kamelets rewritten to the documentation standard proposed 
in #3140, `docs/modules/ROOT/pages/documenting.adoc`, like #3141–#3154.
   
   This batch has 15 Kamelets and 8 partial pages:
   - Google Pub/Sub, Cloud Storage (sink, source, event-based source), 
BigQuery, Sheets, Calendar, Gmail, Cloud Functions and Vertex AI;
   - IBM Cloud Object Storage and Watson Natural Language.
   
   ## How they were checked
   
   | Kamelets | Checked |
   |---|---|
   | Pub/Sub, Cloud Storage (including notifications to Pub/Sub), BigQuery | 
Run against a Google Cloud emulator (the image `camel infra run google` uses). 
BigQuery was also run on 4.23.0. |
   | IBM COS | Run against MinIO. |
   | Sheets, Calendar, Gmail, Watson | A local copy of the Kamelet was run, 
with the cloud call replaced by a realistic body. Also checked against the 
template and the component. |
   | Cloud Functions, Vertex AI | Checked against the template and the catalog. 
Vertex AI was run up to the credential stage. |
   
   No real Google or IBM account was used.
   
   ## Facts that were missing or wrong before
   
   - **The Google service account key:** described the same way everywhere. It 
is the Base64 of the JSON key file; a path fails. Without a key, Pub/Sub and 
Storage use Application Default Credentials. Vertex AI is the exception: it 
takes `file:` or `base64:`.
   - **`google-pubsub-sink`:**
     - the body becomes the message data, and headers become attributes;
     - a missing topic fails.
   - **`google-pubsub-source`:**
     - the body is bytes, not JSON as its partial page said;
     - a failed message is redelivered.
   - **`google-storage-source`** works like `aws-s3-source`:
     - it deletes each file after reading by default, and reads everything 
again every ~500 ms when `deleteAfterRead=false`;
     - `filter` is a regex on the full name;
     - Cloud Storage has no ARNs, though the option names and partial pages 
implied it.
   - **`google-storage-sink`:** the same name overwrites the file.
   - **`google-storage-event-based-source`:** gives the notification JSON. With 
`getObject=true` it gives the file instead, for new files only.
   - **`google-bigquery-sink`:**
     - a JSON object is one row, and an array several rows;
     - an unknown column fails the whole message.
   - **Sheets:**
     - the sink writes only the columns of `range`;
     - the source reads everything again on every poll;
     - the sink's partial page claimed headers override the options, which is 
false.
   - **`google-mail-source`:**
     - the body is the mail text as a quoted JSON string;
     - mail is marked read on success, and unread again on failure.
   - **`google-vertexai-sink`:**
     - the defaults of the generation settings are given;
     - `location` must be set as a property (see below).
   - **`ibm-cos-*`:**
     - the sink names the object with `keyName`, then the `file` header, then a 
generated name;
     - the source deletes after reading, or moves with `moveAfterRead`;
     - the source declared its headers as `CamelIbmCos*`, but the component 
sets `CamelIBMCOS*`, which the declaration now uses;
     - `location` is only information.
   - **`ibm-watson-language-sink`:** returns the results as JSON text.
   
   ## Found on the way, not changed here
   
   - **`google-mail-source` does not start without `labels`.** `labels` is not 
required, but the template uses `{{labels}}` without `?`.
   - **`google-vertexai-sink`:**
     - its `location` parameter collides with the `kamelet:` component's own 
`location`, which is where the Kamelet is loaded from. Given as a parameter, it 
fails with `Resource not found: classpath:us-central1/…`. The workaround is the 
property `camel.kamelet.google-vertexai-sink.location`, which the description 
gives. A real fix needs a rename;
     - `rawPredict` needs `publisher`, which the Kamelet does not expose.
   - **On Camel 4.23, `google-sheets-source`, `google-calendar-source` and 
`google-mail-source` fail on every message:** `marshal: json` plus an `out` 
default data type gives `No serializer found for class InputStreamCache`. For 
mail, the message is then marked unread and read again forever. They work on 
4.24.
   - **`google-sheets-source`:** `majorDimension` and `columnNames` only set 
headers, so they do not change how cells are read.
   - **`google-storage-source`:** its cloudevents data type names 
`aws2-s3:application-cloudevents`.
   - **Types and required lists:**
     - `serviceAccountKey` is typed `binary` in 7 Kamelets;
     - the Vertex AI number options are `string`;
     - `serviceAccountKey` is required in BigQuery, Functions and the 
event-based source, which rules out Application Default Credentials there.
   - **Commonly needed component options these Kamelets do not expose:**
     - ack mode and max delivery attempts for Pub/Sub;
     - move after read and keyless (workload identity) auth for Storage;
     - service account login for Sheets, Calendar and Gmail;
     - insert IDs for BigQuery.
   
     These are for a follow-up.
   
   ## Notes for review
   
   - No template, type, default or required list was changed. The `dataTypes` 
blocks are `headers` only, with no `default`.
   - `KameletsCatalogTest.testSupportedHeaders`: the catalog now returns the 
headers these Kamelets declare instead of those of their components. The 
changed counts:
     - `google-functions-sink` 5 → 1
     - `google-pubsub-sink` 3 → 1
     - `google-pubsub-source` 6 → 3
     - `google-storage-sink` 15 → 3
   - This PR is based on `main`; if #3140 merges first, I will rebase it and 
regenerate the index.
   
   `./mvnw clean install` from the root passes.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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