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

   JIRA: [CAMEL-27078](https://issues.apache.org/jira/browse/CAMEL-27078)
   
   - `SmbConsumer.prePollCheck` had a WARN for a starting directory it could 
not create (`autoCreate=true`), but it was never logged: the catch block set 
`loggedIn = false` before the `loggedIn && !autoCreatedDone` check. The poll 
logged `Cannot connect/login to: ...` instead, or nothing when an earlier poll 
had already logged that it could not connect. The reason (such as 
`STATUS_ACCESS_DENIED`) was only logged at DEBUG.
   - `prePollCheck` now records whether it connected before the failure, and 
logs `Cannot auto-create starting directory <directory> at: ... due to: 
<reason>. Will skip this poll.`, once. The `Cannot connect/login to: ...` WARN 
gives the reason too, on one line. This is the change CAMEL-27019 made in 
`RemoteFileConsumer` for ftp, ftps, sftp and mina-sftp.
   - The rest is unchanged: when to connect, when to create the directory, 
`throwExceptionOnConnectFailed`, and which polls are skipped.
   
   Tests: `SmbConsumerSkipPollWarnTest` (new, stub operations, no server). Both 
tests fail on main (the auto-create failure is logged as `Cannot connect/login 
to: smb://camel@localhost:4450. Will skip this poll.`; the connect WARN has no 
reason) and pass with the fix. Checked against the Samba test container as 
well: with the server unreachable when the route starts and then a read-only 
share, main logs only the first connect WARN, and the fix logs `Cannot 
auto-create starting directory inbox at: ... due to: STATUS_ACCESS_DENIED 
(0xc0000022): Create failed for \\localhost\data-ro\inbox. Will skip this 
poll.`. All camel-smb tests and ITs pass.
   
   Upgrade guide: a short camel-smb entry in `camel-4x-upgrade-guide-4_24.adoc` 
for the changed WARN text.
   
   _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