Croway opened a new pull request, #30292:
URL: https://github.com/apache/camel/pull/30292

   Backport of #30289 to camel-4.22.x: only the WARN for `noop=true` with 
`delete=true` or `move`.
   
   Manual port of the noop part of 4ae654fe1911 (CAMEL-27116: camel-file, 
camel-ftp, camel-smb - warn when noop is set with delete or move, a fileName 
has wildcards, or the directory is classpath:, and say that include and exclude 
are regular expressions). With `noop=true` and `delete=true` the consumer 
deletes the files (delete wins), and with `noop=true` and `move` it does not 
move them (noop wins). Both still start and behave as before; creating the 
consumer now logs a WARN that says which option wins and what to remove, unless 
a custom `processStrategy` is set.
   
   Adjustments:
   - Not a cherry-pick: only the noop part of 
`GenericFileEndpoint.warnIfConsumerOptionsConflict()` is ported, with the same 
WARN text as on main. The fileName wildcard WARN, the `classpath:` directory 
WARN, the include/exclude error message, the `${ }` message, the option 
descriptions (component JSON, catalog, endpoint DSL) and the docs of #30289 are 
left out. #30289 has no upgrade-guide hunk.
   - `FileEndpoint`, `RemoteFileEndpoint` (camel-ftp-common) and `SmbEndpoint` 
call it in `createConsumer()` after the default idempotent repository is set: 
on main the call sits next to `warnIfIdempotentOptionsUnused()`, which is not 
on this branch. mina-sftp and azure-files get it through `RemoteFileEndpoint`, 
as on main.
   - `FileConsumerNoopWithDeleteOrMoveTest` (camel-core) is the one of main. 
`RemoteFileEndpointConflictingConsumerOptionsTest` (camel-ftp) and 
`SmbEndpointConflictingConsumerOptionsTest` (camel-smb) keep only the noop 
cases: the fileName wildcard and include cases are removed.
   - `file-component.adoc` is unchanged: this branch has no noop paragraph 
where the note of main fits, so the catalog copy is unchanged too.
   
   Tests, on camel-4.22.x with JDK 25 (`mvnd test -pl 
core/camel-core,components/camel-ftp,components/camel-smb -am 
-Dtest='org/apache/camel/component/file/**/*Test,org/apache/camel/component/smb/**/*Test'`):
 camel-core 279 classes, 487 tests, 0 failures, 12 skipped (manual tests); 
camel-file 28 tests, camel-ftp 105 tests (9 skipped, manual), camel-smb 7 
tests, 0 failures. Without the change in `src/main`, the new tests fail where 
the WARN is expected: camel-core 2 of 8, camel-ftp 6 of 21, camel-smb 2 of 5; 
the cases that must not warn pass both ways. The build leaves no uncommitted 
change (formatter, impsort).
   
   _Claude Code on behalf of Federico Mariani_
   


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