Skip to content

camel-docker: deprecate loggingFilter and followRedirectFilter, which have no effect - #29954

Merged
davsclaus merged 6 commits into
apache:mainfrom
Dhairya-007:fix/docker-deprecate-noop-filter-options
Nov 15, 2026
Merged

davsclaus merged 6 commits into
apache:mainfrom
Dhairya-007:fix/docker-deprecate-noop-filter-options

Conversation

@Dhairya-007

Copy link
Copy Markdown
Contributor

Problem

camel-docker publishes two endpoint options that nothing reads:

@UriParam(label = "advanced")
private boolean loggingFilter;
@UriParam(label = "advanced")
private boolean followRedirectFilter;

DockerClientFactory.getDockerClient builds the complete DockerClientProfile the client is created from, and it sets neither of them:

DockerClientProfile clientProfile = new DockerClientProfile();
clientProfile.setHost(host);
clientProfile.setEmail(email);
clientProfile.setUsername(username);
clientProfile.setPassword(password);
clientProfile.setRequestTimeout(requestTimeout);
clientProfile.setServerAddress(serverAddress);
clientProfile.setCertPath(certPath);
clientProfile.setMaxTotalConnections(maxTotalConnections);
clientProfile.setMaxPerRouteConnections(maxPerRouteConnections);
clientProfile.setSecure(secure);
clientProfile.setTlsVerify(tlsVerify);
clientProfile.setSocket(socket);
clientProfile.setCmdExecFactory(cmdExecFactory);

DockerClientProfile has no field for either, and isLoggingFilter() / isFollowRedirectFilter() are called only from DockerComponentConfigurer and DockerEndpointConfigurer. So loggingFilter=true parses, 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:

public static final String DOCKER_FOLLOW_REDIRECT_FILTER = "CamelDockerFollowRedirectFilter";
public static final String DOCKER_LOGGING_FILTER = "CamelDockerLoggingFilter";

Unlike their neighbours in DockerConstants they carry no @Metadata either, 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 LoggingFilter and a FollowRedirectsFilter; the current client is built through DockerClientProfile and has nowhere to put them.

Fix

Deprecate both options, with a deprecationNote saying nothing reads them - the same treatment aws2-transcribe's protocol got 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.json files are included.

… 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 gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

  1. Two generated files are missing. A deprecated option also changes the DSL builders (they get @Deprecated and a "Deprecation note:" javadoc line). Please regenerate and commit dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/DockerComponentBuilderFactory.java and dsl/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.
  2. 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 DockerClientFactory called configBuilder.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.)
  3. [Suggestion] Same section, last sentence: a log EIP does not show the traffic with the Docker daemon. Raising the log level of the com.github.dockerjava loggers 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.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Generated files are up to date

An earlier CI run reported uncommitted generated changes; the latest run no longer does.

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot added the dsl label Nov 14, 2026

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. camel-4x-upgrade-guide-4_24.adoc:8749 still 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.
  2. camel-4x-upgrade-guide-4_24.adoc:8755-8756: a log EIP does not show the traffic with the Docker daemon. Keeping only "Raise the log level of the com.github.dockerjava loggers 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.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-docker
  • docs
  • dsl/camel-componentdsl
  • dsl/camel-endpointdsl

🔬 Scalpel shadow comparison — Scalpel: 9 of 726 tested, 23 compile-only — current: 9 all tested

Maveniverse 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)
  • camel-docker ← components/camel-docker/src/generated/resources/META-INF/org/apache/camel/component/docker/docker.json, components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerConfiguration.java, components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerConstants.java
  • camel-jbang-mcp ← downstream of org.apache.camel:camel-catalog
  • camel-jbang-plugin-mcp ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-plugin-tui ← downstream of org.apache.camel:camel-catalog
  • camel-jbang-plugin-validate ← downstream of org.apache.camel:camel-yaml-dsl-validator
  • camel-jbang-run ← downstream of org.apache.camel:camel-catalog
  • camel-launcher-container ← downstream of org.apache.camel:camel-launcher
  • camel-yaml-dsl-validator ← downstream of org.apache.camel:camel-catalog
  • camel-yaml-dsl-validator-maven-plugin ← downstream of org.apache.camel:camel-yaml-dsl-validator
Modules with tests skipped (23)
  • apache-camel
  • camel-allcomponents
  • camel-catalog-console
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • dummy-component

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

All tested modules (36 modules, 6m 8s total)

Total reactor time: 6m 8s

Module Duration Status
Camel :: JBang :: Plugin :: TUI 50.9s SUCCESS
Camel :: JBang :: MCP 49.2s SUCCESS
Camel :: YAML DSL :: Validator 25.8s SUCCESS
Camel :: JBang :: Plugin :: Validate 23.6s SUCCESS
Camel :: Docker 21.8s SUCCESS
Camel :: YAML DSL 20.9s SUCCESS
Camel :: Component DSL 20.7s SUCCESS
Camel :: Catalog :: Camel Catalog 19.8s SUCCESS
Camel :: JBang :: Run 19.2s SUCCESS
Camel :: Kamelet Main 15.7s SUCCESS
Camel :: JBang :: Plugin :: Kubernetes 14.8s SUCCESS
Camel :: Docs 12.6s SUCCESS
Camel :: JBang :: Plugin :: Testing 12.4s SUCCESS
Camel :: Assembly 10.2s SUCCESS
Camel :: JBang :: Plugin :: Generate 7.5s SUCCESS
Camel :: YAML DSL :: Deserializers 6.4s SUCCESS
Camel :: Catalog :: Camel Route Parser 6.3s SUCCESS
Camel :: Catalog :: Camel Report Maven Plugin 6.2s SUCCESS
Camel :: All Components Sync point 4.5s SUCCESS
Camel :: YAML DSL :: Validator Maven Plugin 3.2s SUCCESS
Camel :: Catalog :: Maven 2.8s SUCCESS
Camel :: Catalog :: Suggest (deprecated) 2.2s SUCCESS
Camel :: YAML DSL :: Maven Plugins 2.0s SUCCESS
Camel :: Coverage 1.6s SUCCESS
Camel :: Catalog :: Dummy Component 1.4s SUCCESS
Camel :: JBang :: Plugin :: MCP 1.3s SUCCESS
Camel :: JBang :: Plugin :: Edit 1.2s SUCCESS
Camel :: JBang :: Main 0.9s SUCCESS
Camel :: Catalog :: Console 0.8s SUCCESS
Camel :: Launcher :: Container 0.8s SUCCESS
Camel :: JBang :: Integration tests 0.7s SUCCESS
Camel :: Endpoint DSL :: Support 0.6s SUCCESS
Camel :: Endpoint DSL n/a
Camel :: Integration Tests n/a
Camel :: JBang :: Core n/a
Camel :: Launcher n/a

Top 20 slowest modules:

  • Camel :: JBang :: Plugin :: TUI (50.9s)
  • Camel :: JBang :: MCP (49.2s)
  • Camel :: YAML DSL :: Validator (25.8s)
  • Camel :: JBang :: Plugin :: Validate (23.6s)
  • Camel :: Docker (21.8s)
  • Camel :: YAML DSL (20.9s)
  • Camel :: Component DSL (20.7s)
  • Camel :: Catalog :: Camel Catalog (19.8s)
  • Camel :: JBang :: Run (19.2s)
  • Camel :: Kamelet Main (15.7s)
  • Camel :: JBang :: Plugin :: Kubernetes (14.8s)
  • Camel :: Docs (12.6s)
  • Camel :: JBang :: Plugin :: Testing (12.4s)
  • Camel :: Assembly (10.2s)
  • Camel :: JBang :: Plugin :: Generate (7.5s)
  • Camel :: YAML DSL :: Deserializers (6.4s)
  • Camel :: Catalog :: Camel Route Parser (6.3s)
  • Camel :: Catalog :: Camel Report Maven Plugin (6.2s)
  • Camel :: All Components Sync point (4.5s)
  • Camel :: YAML DSL :: Validator Maven Plugin (3.2s)

⚙️ View full build and test results

Dhairya-007 and others added 2 commits November 15, 2026 01:33
…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 gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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] ⚠️ Partially addressed — the 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.
@Dhairya-007

Copy link
Copy Markdown
Contributor Author

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 log EIP.

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@Dhairya-007

Copy link
Copy Markdown
Contributor Author

Merged current main in to clear the conflict in camel-4x-upgrade-guide-4_24.adoc — several sections landed there since this branch was cut. The resolution is a plain union: main's sections in place, the === camel-docker one appended last, and I checked the file byte-for-byte against main's copy plus that one section. No other file conflicted.

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants