Dhairya-007 opened a new pull request, #29954:
URL: https://github.com/apache/camel/pull/29954

   ## Problem
   
   `camel-docker` publishes two endpoint options that nothing reads:
   
   ```java
   @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:
   
   ```java
   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:
   
   ```java
   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.


-- 
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