[ 
https://issues.apache.org/jira/browse/CAMEL-27948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-27948:
--------------------------------
    Description: 
Found while improving the option descriptions of camel-docker for CAMEL-23832 
(commit 
https://github.com/apache/camel/commit/bad83878ac9bc088cb788df6bdc3ddc8def71f1a,
 pull request https://github.com/apache/camel/pull/31192).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. URI parameters of other types are ignored
{{DockerHelper.getProperty}} returns null when the target type is not String, 
Integer or Boolean, so docker:events?initialRange=60000 is ignored; 
prop.getClass().isAssignableFrom(clazz) is reversed and 
Integer.valueOf((String) prop) throws ClassCastException for a non-String value.
Proposed change: convert with the CamelContext TypeConverter.

h4. 2. CamelDockerHostConfig drops other headers
{{DockerProducer.executeCreateContainerRequest}} replaces the HostConfig with 
the header value after CamelDockerCapAdd, CapDrop, CpuShares and Dns were set 
on the previous one, so they are lost; MemoryLimit, MemorySwap, Binds and 
VolumesFrom are then written into the caller HostConfig object.
Proposed change: apply the HostConfig header first, then the other headers to a 
copy.

h4. 3. maxTotalConnections, maxPerRouteConnections and requestTimeout
{{DockerClientFactory}}: maxTotalConnections and maxPerRouteConnections only go 
into the client cache key, never to the exec factory; with the default Netty 
factory requestTimeout only sets the connect timeout (Jersey gets the read 
timeout too).
Proposed change: pass them to the factory (and withReadTimeout for Netty), or 
deprecate them as loggingFilter was.

h4. 4. Smaller issues
CamelDockerHostPath (containercopyfile) is never read by docker-java 3.7.1. 
CamelDockerTimestamps is not sent for containerattach. 
{{DockerHelper.getArrayProperty}}: header.getClass().getDeclaringClass() is 
null for arrays, so an array header of another component type throws a 
NullPointerException. The auth operation without a username fails with a 
NullPointerException. The header-to-type lists in DockerOperation are unused 
and partly wrong. The doc page says all URI options can be passed as headers; 
it is the other way round. JerseyDockerCmdExecFactory is deprecated in 
docker-java 3.7.1.


_Claude Code on behalf of davsclaus_

  was:
Found while improving the option descriptions of camel-docker for CAMEL-23832 
(pull request https://github.com/apache/camel/pull/31192).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. URI parameters of other types are ignored
{{DockerHelper.getProperty}} returns null when the target type is not String, 
Integer or Boolean, so docker:events?initialRange=60000 is ignored; 
prop.getClass().isAssignableFrom(clazz) is reversed and 
Integer.valueOf((String) prop) throws ClassCastException for a non-String value.
Proposed change: convert with the CamelContext TypeConverter.

h4. 2. CamelDockerHostConfig drops other headers
{{DockerProducer.executeCreateContainerRequest}} replaces the HostConfig with 
the header value after CamelDockerCapAdd, CapDrop, CpuShares and Dns were set 
on the previous one, so they are lost; MemoryLimit, MemorySwap, Binds and 
VolumesFrom are then written into the caller HostConfig object.
Proposed change: apply the HostConfig header first, then the other headers to a 
copy.

h4. 3. maxTotalConnections, maxPerRouteConnections and requestTimeout
{{DockerClientFactory}}: maxTotalConnections and maxPerRouteConnections only go 
into the client cache key, never to the exec factory; with the default Netty 
factory requestTimeout only sets the connect timeout (Jersey gets the read 
timeout too).
Proposed change: pass them to the factory (and withReadTimeout for Netty), or 
deprecate them as loggingFilter was.

h4. 4. Smaller issues
CamelDockerHostPath (containercopyfile) is never read by docker-java 3.7.1. 
CamelDockerTimestamps is not sent for containerattach. 
{{DockerHelper.getArrayProperty}}: header.getClass().getDeclaringClass() is 
null for arrays, so an array header of another component type throws a 
NullPointerException. The auth operation without a username fails with a 
NullPointerException. The header-to-type lists in DockerOperation are unused 
and partly wrong. The doc page says all URI options can be passed as headers; 
it is the other way round. JerseyDockerCmdExecFactory is deprecated in 
docker-java 3.7.1.


_Claude Code on behalf of davsclaus_


> camel-docker: typed URI parameters ignored, HostConfig header drops other 
> headers, unused connection options
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27948
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27948
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-docker
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-docker for CAMEL-23832 
> (commit 
> https://github.com/apache/camel/commit/bad83878ac9bc088cb788df6bdc3ddc8def71f1a,
>  pull request https://github.com/apache/camel/pull/31192).
> These are separate problems of the component; the descriptions change only 
> documents the current behavior.
> h4. 1. URI parameters of other types are ignored
> {{DockerHelper.getProperty}} returns null when the target type is not String, 
> Integer or Boolean, so docker:events?initialRange=60000 is ignored; 
> prop.getClass().isAssignableFrom(clazz) is reversed and 
> Integer.valueOf((String) prop) throws ClassCastException for a non-String 
> value.
> Proposed change: convert with the CamelContext TypeConverter.
> h4. 2. CamelDockerHostConfig drops other headers
> {{DockerProducer.executeCreateContainerRequest}} replaces the HostConfig with 
> the header value after CamelDockerCapAdd, CapDrop, CpuShares and Dns were set 
> on the previous one, so they are lost; MemoryLimit, MemorySwap, Binds and 
> VolumesFrom are then written into the caller HostConfig object.
> Proposed change: apply the HostConfig header first, then the other headers to 
> a copy.
> h4. 3. maxTotalConnections, maxPerRouteConnections and requestTimeout
> {{DockerClientFactory}}: maxTotalConnections and maxPerRouteConnections only 
> go into the client cache key, never to the exec factory; with the default 
> Netty factory requestTimeout only sets the connect timeout (Jersey gets the 
> read timeout too).
> Proposed change: pass them to the factory (and withReadTimeout for Netty), or 
> deprecate them as loggingFilter was.
> h4. 4. Smaller issues
> CamelDockerHostPath (containercopyfile) is never read by docker-java 3.7.1. 
> CamelDockerTimestamps is not sent for containerattach. 
> {{DockerHelper.getArrayProperty}}: header.getClass().getDeclaringClass() is 
> null for arrays, so an array header of another component type throws a 
> NullPointerException. The auth operation without a username fails with a 
> NullPointerException. The header-to-type lists in DockerOperation are unused 
> and partly wrong. The doc page says all URI options can be passed as headers; 
> it is the other way round. JerseyDockerCmdExecFactory is deprecated in 
> docker-java 3.7.1.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to