oscerd opened a new pull request, #1817:
URL: https://github.com/apache/camel-kafka-connector/pull/1817

   Backport of five fixes merged to `main`, onto `camel-kafka-connector-4.18.x` 
(4.18.1-SNAPSHOT).
   
   | Original | Issue | What |
   |---|---|---|
   | #1810 | #1799 | `FileTransforms` swallowed an `IOException` and emitted a 
record with a `null` value; NPE on a `null` record value |
   | #1811 | #1800 | SMT `TypeConverter` was `static` and assigned per 
instance; the per-instance `CamelContext` was never released |
   | #1812 | #1801 | `ValidString` validation for 
`camel.idempotency.expression.type`, `camel.idempotency.repository.type`, 
`camel.error.handler` |
   | #1814 | #1797 | Composed endpoint URI was logged in clear text at INFO, 
carrying `PASSWORD`-typed option values |
   | #1815 | #1806 | `camel.remove.headers.pattern` was applied after the 
aggregation and idempotency stages on the sink path |
   
   Four cherry-picked cleanly. #1815 conflicted and was resolved by hand — see 
below.
   
   ## Deliberately NOT backported: #1809 (password-typed connector options)
   
   That PR flipped five options from `ConfigDef.Type.STRING` to `Type.PASSWORD` 
on `main`. It does **not**
   belong on this branch, and cherry-picking it here would be wrong rather than 
merely unnecessary.
   
   On `main` those five were *stale generated output*: the Kamelets 4.21.0 
catalog declares
   `format: password` for them, so the generator produces `PASSWORD` and the 
checked-in tree had drifted.
   
   On 4.18.x the bundled kamelets are from the 4.18.0 catalog, which does 
**not** declare
   `format: password` for those properties:
   
   ```
                                             format: password occurrences
   kamelet                                   4.18.x        main
   camel-sftp-sink                                1           2
   camel-scp-sink                                 1           2
   camel-jms-pooled-apache-artemis-sink           0           1
   ```
   
   So on this branch `Type.STRING` is what the generator produces, and the 
cherry-pick would hand-edit
   generated code into disagreeing with the branch's own generator. I confirmed 
this empirically: with
   that commit included, a full `./mvnw clean install` regenerated all five 
files straight back to
   `STRING`. With it dropped, the same build leaves **zero** regeneration drift.
   
   If password typing is wanted on 4.18.x, the route is a Kamelets catalog bump 
on that branch, not this
   change.
   
   ## Conflict resolution for #1815
   
   `main`'s hunk carried two features this branch does not have, which a 
careless resolution would have
   dragged in:
   
   - `dumpRoutes` / `withDumpRoutes(...)` on `CamelKafkaConnectMain.Builder`
   - the `DEFAULT_KAMELET_CKC_SINK` / `CAMEL_SINK_KAMELET_CONF` lookup in 
`CamelSinkTask`
   
   I kept this branch's shape and took only `withRemoveHeadersFirst` plus the 
route-assembly change, and
   verified `dumpRoutes` does not appear in the resolved file.
   
   ## Behaviour change worth a release note
   
   #1812 is fail-closed: a connector configuration with a misspelled value for 
one of those three options
   is accepted by 4.18.0 today and will be **rejected** after upgrading to 
4.18.1. That is the point of
   the fix — the `expression.type` case silently drops every record after the 
first — but it is a
   behaviour change inside a patch release. Say the word and I will drop that 
commit too.
   
   ## Verification
   
   - `core` on this branch: 119 tests pass.
   - Full reactor build with the whole test suite (`./mvnw clean install`): 
BUILD SUCCESS, 28 test runs,
     no failures.
   - Full reactor build after dropping #1809 (`./mvnw clean install 
-DskipTests`): BUILD SUCCESS with no
     regeneration drift.


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