allthingssecurity opened a new pull request, #29439: URL: https://github.com/apache/camel/pull/29439
# Description [CAMEL-25732](https://issues.apache.org/jira/browse/CAMEL-25732) Follow-up of CAMEL-25680, agreed in the review of #27919. - Logging: when the Docker events stream fails before it was opened (the daemon cannot be reached), `EventsCallback.onError` logs one WARN line without the stack trace, so a daemon that is down does not print a stack trace for every retry. The throwable is now also logged at DEBUG, as for a failed attempt to subscribe again (`subscribeAgain`). The WARN line is unchanged. - Test: no test covered an `exec()` that throws when the consumer subscribes again, which is what the default Netty transport does when the daemon cannot be reached (the connect is synchronous and the callback is not called). Tests (`DockerEventsConsumerStreamTest`, mocked `DockerClient`, no daemon): - New `failingExecWhenSubscribingAgainIsTriedAgain`: the stream fails, the first attempt to subscribe again throws from `exec()`, the next one opens a new stream that delivers events. It covers existing behaviour, so it passes on main; it fails when the retry in the `subscribeAgain` catch block is removed. - New `streamThatFailsBeforeItIsOpenLogsTheStackTraceAtDebug`: a stream that fails before it is open logs one WARN line without the stack trace and the throwable at DEBUG. Fails on main (no DEBUG event). - Both new tests pass 20 runs in a row (the whole test class 20 times, 140/140). Offline, the camel-docker unit tests pass: 72 run, 0 failures, 4 skipped (they need a Docker daemon). # Target - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch) # Tracking - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it): [CAMEL-25732](https://issues.apache.org/jira/browse/CAMEL-25732). # Apache Camel coding standards and style - [x] I checked that each commit in the pull request has a meaningful subject line and body. - [ ] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes. (I built camel-docker and the modules it depends on, including the formatter and import-sort plugins, and ran the camel-docker tests. No generated file changes. I did not run the full root build.) # AI-assisted contributions - [x] If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR description identifies the AI tool used. This PR was prepared with Claude Code (Claude Opus 5.5). The commit carries a `Co-Authored-By` trailer. _Claude Code on behalf of allthingssecurity_ 🤖 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]
