Repository navigation
camel-docker: deprecate loggingFilter and followRedirectFilter, which have no effect - #29954
Conversation
… have no effect DockerClientFactory builds the complete DockerClientProfile the client is created from - host, port, credentials, timeout, cert path, the two connection limits, secure, tlsVerify, socket and cmdExecFactory - and it sets neither of these two. DockerClientProfile has no field for either, so isLoggingFilter() and isFollowRedirectFilter() are reachable only from the generated configurers. The matching header constants DOCKER_LOGGING_FILTER and DOCKER_FOLLOW_REDIRECT_FILTER are read nowhere at all, and unlike the other constants in DockerConstants they carry no @metadata, so they are not even documented as headers. Deprecate the two options with a deprecationNote that says nothing reads them, and the two header constants, with an upgrade-guide entry.
gnodet-bot
left a comment
There was a problem hiding this comment.
LGTM. The deprecation is correct and complete: DockerClientFactory never sets these options when building the client, DockerClientProfile has no field for either, and the header constants are read nowhere. @Metadata(deprecationNote=...) is the right Camel mechanism, the generated JSON confirms it, and the upgrade guide entry is clear and actionable.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
davsclaus
left a comment
There was a problem hiding this comment.
Thanks for picking this up. I checked main: DockerClientFactory never reads loggingFilter/followRedirectFilter, DockerClientProfile has no field for them, and the two header constants are unused. The deprecation style (@Metadata(deprecationNote) + @Deprecated) matches earlier option deprecations such as #29706 (aws2-transcribe protocol), and the upgrade-guide entry is the right call.
- Two generated files are missing. A deprecated option also changes the DSL builders (they get
@Deprecatedand a "Deprecation note:" javadoc line). Please regenerate and commitdsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DockerComponentBuilderFactory.javaanddsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DockerEndpointBuilderFactory.java(the boolean and String overloads). Without them CI's uncommitted-changes check will likely fail. - Upgrade guide ("Neither option has ever had an effect"): as far as I can tell the options did work up to Camel 2.17, where
DockerClientFactorycalledconfigBuilder.withLoggingFilter(...)/withFollowRedirectsFilter(...); the docker-java 3.x move in 2.18 dropped that. Could it say "have had no effect since Camel 2.18" instead? (The PR description's "Jersey-era leftovers" is accurate.) - [Suggestion] Same section, last sentence: a
logEIP does not show the traffic with the Docker daemon. Raising the log level of thecom.github.dockerjavaloggers on its own is the useful advice there.
Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
✅ Generated files are up to dateAn earlier CI run reported uncommitted generated changes; the latest run no longer does. |
gnodet-bot
left a comment
There was a problem hiding this comment.
Following up on my earlier review — the "Regen" commit addresses davsclaus's point 1 (DSL builder files now included). Two points from davsclaus's review remain open.
[Point 2] Historically inaccurate wording — "Neither option has ever had an effect" is incorrect. These options worked up to Camel 2.17, when DockerClientFactory called configBuilder.withLoggingFilter(...) / withFollowRedirectsFilter(...); the docker-java 3.x migration in Camel 2.18 dropped them. Please update the phrasing to reflect this (e.g. "have had no effect since Camel 2.18").
[Point 3] Incorrect logging advice — "use a log EIP or raise the log level of the docker-java client instead" misleads readers. A Camel log EIP traces the exchange body/headers at Camel level — it does not capture Docker daemon protocol traffic. The only actionable guidance is raising the log level of the com.github.dockerjava loggers. The log EIP mention should be dropped.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
davsclaus
left a comment
There was a problem hiding this comment.
Thanks, the Regen commit added the two DSL builder files (DockerComponentBuilderFactory and both overloads in DockerEndpointBuilderFactory), so the generated-files point is done. Two upgrade-guide points are still open:
camel-4x-upgrade-guide-4_24.adoc:8749still says "Neither option has ever had an effect". The options worked up to Camel 2.17, so "Neither option has had any effect since Camel 2.18" would be accurate. gnodet-bot's inline suggestion there can be applied as it is.camel-4x-upgrade-guide-4_24.adoc:8755-8756: alogEIP does not show the traffic with the Docker daemon. Keeping only "Raise the log level of thecom.github.dockerjavaloggers to see the traffic with the Docker daemon." would fix it. If you apply gnodet-bot's suggestion on line 8756, please also remove "To log the exchanges with the Docker daemon," at the end of line 8755, or the sentence ends up broken.
Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 9 of 726 tested, 23 compile-only — current: 9 all testedMaveniverse Scalpel detected 9 affected modules (current approach: 9). Skip-tests mode would test 9 modules (5 direct + 8 downstream), skip tests for 23 (generated code, meta-modules) Modules Scalpel would test (9)
Modules with tests skipped (23)
All tested modules (36 modules, 6m 8s total)Total reactor time: 6m 8s
Top 20 slowest modules:
|
…4.adoc Co-authored-by: Guillaume Nodet - AI Bot <gnodet+bot@gmail.com>
…4.adoc Co-authored-by: Guillaume Nodet - AI Bot <gnodet+bot@gmail.com>
gnodet-bot
left a comment
There was a problem hiding this comment.
Following up on my earlier review — both substantive points have been addressed, with one residual sentence issue.
[Point 2 - historical wording] ✅ Addressed — "Neither option has had any effect since Camel 2.18" is now the correct phrasing.
[Point 3 - logging advice] log EIP reference is gone, but the sentence is now broken. The intro clause "To log the exchanges with the Docker daemon," was kept while the main clause was edited to start with "Raise", so "Raise" is capitalized mid-sentence. davsclaus explicitly flagged this in their last comment: "If you apply gnodet-bot's suggestion on line 8756, please also remove 'To log the exchanges with the Docker daemon,' at the end of line 8755, or the sentence ends up broken." — the edit went the other direction and left the broken clause. See inline suggestion.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
The two suggestions were applied but left a dangling clause ("To log the
exchanges with the Docker daemon, Raise the log level ...").
Say when the options stopped working and why - CAMEL-10307, the
docker-java 3.x upgrade that first shipped in camel-2.18.0, removed the
withLoggingFilter and withFollowRedirectsFilter calls they fed - and give
the docker-java logger advice as one sentence.
|
Both suggestions are in, thanks - and I checked the history you pointed at: the options were added by CAMEL-8691 and the calls they fed went away with CAMEL-10307, the docker-java 3.x upgrade, whose first release tag is camel-2.18.0. So "since Camel 2.18" is right and I have said what removed them. The second suggestion had been committed on top of the old clause, leaving "To log the exchanges with the Docker daemon, Raise the log level ..."; that is now one sentence, and the paragraph no longer suggests a |
gnodet-bot
left a comment
There was a problem hiding this comment.
All review points are now fully addressed.
[Point 1 - Generated DSL files] ✅ Done — DockerComponentBuilderFactory and both overloads in DockerEndpointBuilderFactory regenerated with @Deprecated and updated javadoc.
[Point 2 - Historical wording] ✅ Done — "Neither option has had any effect since Camel 2.18" is accurate.
[Point 3 - Logging advice] ✅ Done — The sentence is now well-formed: "To see the traffic with the Docker daemon, raise the log level of the com.github.dockerjava loggers." No broken clause, no log EIP mention.
LGTM. The deprecation is complete: @Deprecated + @Metadata(deprecationNote=...) on both fields and accessors, header constants deprecated, generated files updated, and the upgrade guide is accurate and actionable.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
davsclaus
left a comment
There was a problem hiding this comment.
Thanks, both upgrade-guide points are in: it now says "since Camel 2.18" and names what removed the calls, and the logging advice is one sentence pointing at the com.github.dockerjava loggers. The generated DSL files were already done in the Regen commit, so LGTM.
The PR now conflicts with main in docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc (main also appended sections at the end). Could you rebase and keep both sections? CI has not run on the latest commits because of the conflict, so it will run after the rebase.
Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
# Conflicts: # docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
|
Merged current |
davsclaus
left a comment
There was a problem hiding this comment.
Thanks @Dhairya-007 for the merge with main. The only change since my approval is the merge commit. The conflict in camel-4x-upgrade-guide-4_24.adoc is resolved well: main's newer sections are kept, the docker section comes after them, and the PR's own diff against main is the same 12 upgrade-guide lines as before. Still LGTM.
Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
Problem
camel-dockerpublishes two endpoint options that nothing reads:DockerClientFactory.getDockerClientbuilds the completeDockerClientProfilethe client is created from, and it sets neither of them:DockerClientProfilehas no field for either, andisLoggingFilter()/isFollowRedirectFilter()are called only fromDockerComponentConfigurerandDockerEndpointConfigurer. SologgingFilter=trueparses, is accepted, shows up in the catalog as a supported advanced option, and does nothing.The two matching header constants are read nowhere at all:
Unlike their neighbours in
DockerConstantsthey carry no@Metadataeither, so they are not documented as headers - the names only exist for callers who went looking for them.These look like leftovers from the Jersey-era docker-java client, which configured a
LoggingFilterand aFollowRedirectsFilter; the current client is built throughDockerClientProfileand has nowhere to put them.Fix
Deprecate both options, with a
deprecationNotesaying nothing reads them - the same treatmentaws2-transcribe'sprotocolgot in #29909 - and deprecate the two header constants. An upgrade-guide entry says what to use instead for logging.Nothing is removed, so no URI stops parsing; the generated
docker.jsonfiles are included.