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

   JIRA: [CAMEL-27104](https://issues.apache.org/jira/browse/CAMEL-27104)
   
   - `FilesConsumer.doStart` logs a WARN and starts the consumer when the 
starting directory cannot be created (CAMEL-22177), but it only catches 
`GenericFileOperationFailedException`. `FilesOperations.connect` and 
`FilesOperations.buildDirectory` let the Azure SDK `ShareStorageException` 
through unwrapped. So a share that refused to create the directory (`403 
AuthorizationPermissionMismatch`) or refused the connection (`403 
AuthenticationFailed`) failed the route start. The ftp and sftp consumers start 
in both cases.
   - `connect` (the remote check only, not the client creation) and 
`buildDirectory` now wrap the error in a `GenericFileOperationFailedException` 
with the same message. The route starts, and each poll connects and tries to 
create the directory again through `RemoteFileConsumer.prePollCheck`.
   - The Azure error is the cause, so 
`onException(ShareStorageException.class)` still matches when the producer or a 
move creates a directory, or when the producer connects as it starts.
   - The component page says what happens when the directory cannot be created. 
Same model as CAMEL-27080 for camel-smb (#30237).
   
   Tests: `FilesConsumerAutoCreateTest` (camel-azure-files, mocked share 
client, since Azurite has no Files service). On main, 4 of its 6 tests fail: 
both routes fail to start with `FailedToStartRouteException ... Status code 
403`, and the two operations throw `ShareStorageException`. With the fix, all 6 
pass. The two controls pass on both: an existing directory, and a producer 
`onException(ShareStorageException.class)`. All 53 camel-azure-files tests pass.
   
   Upgrade guide: 4.24 entry "camel-azure-files - a starting directory that 
cannot be created, or a refused connection, no longer fails the route start".
   
   _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