aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg2018-07-23 15:13:16 -0400
committerJeff Johnston2018-08-03 12:26:47 -0400
commitc96ecb3c76d70ad8cf0eaf96f6d6356a0b7388aa (patch)
treeb28689d87a3d479c89ff2642759550dd6239b691
parent47b688acdd54039d3a0c057739312d7d719d1d22 (diff)
downloadorg.eclipse.linuxtools-c96ecb3c76d70ad8cf0eaf96f6d6356a0b7388aa.tar.gz
org.eclipse.linuxtools-c96ecb3c76d70ad8cf0eaf96f6d6356a0b7388aa.tar.xz
org.eclipse.linuxtools-c96ecb3c76d70ad8cf0eaf96f6d6356a0b7388aa.zip
Bug 500177 - Update to com.spotify.docker.client 8.11.7.
- Issues with initializing a unix socket connection can be resolve by updating to latest docker-client, which properly supports proxy configuration Change-Id: Iaf7cae09f94262a891501416c37be36b33ac18c6 Reviewed-on: https://git.eclipse.org/r/126560 Tested-by: CI Bot Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
-rw-r--r--containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainerConfig.java14
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui.tests/src/org/eclipse/linuxtools/internal/docker/ui/testutils/MockImageInfoFactory.java12
-rw-r--r--releng/org.eclipse.linuxtools.target/linuxtools-e4.8.target18
3 files changed, 20 insertions, 24 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainerConfig.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainerConfig.java
index 2e9e02894c..37ca14a614 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainerConfig.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainerConfig.java
@@ -15,6 +15,7 @@ package org.eclipse.linuxtools.internal.docker.core;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -91,16 +92,13 @@ public class DockerContainerConfig implements IDockerContainerConfig {
this.env = containerConfig != null ? containerConfig.env() : null;
this.cmd = containerConfig != null ? containerConfig.cmd() : null;
this.image = containerConfig != null ? containerConfig.image() : null;
- /*
- * This is a bug in spotify/docker-client 6.1.1.
- * com.spotify.docker.client.ContainerConfig.volumes() tries
- * volumes.keySet() which might be null. For now we need to guard
- * against this.
- */
+
@SuppressWarnings("rawtypes")
- Map<String, Map> res = null;
+ Map<String, Map> res = new HashMap<>();
try {
- res = containerConfig != null ? containerConfig.volumes() : null;
+ if (containerConfig != null && containerConfig.volumes() != null) {
+ containerConfig.volumes().forEach(v -> res.put(v, Collections.emptyMap()));
+ }
} catch (NullPointerException e) {
}
this.volumes = res;
diff --git a/containers/org.eclipse.linuxtools.docker.ui.tests/src/org/eclipse/linuxtools/internal/docker/ui/testutils/MockImageInfoFactory.java b/containers/org.eclipse.linuxtools.docker.ui.tests/src/org/eclipse/linuxtools/internal/docker/ui/testutils/MockImageInfoFactory.java
index b233cc7a5e..f410ad7cff 100644
--- a/containers/org.eclipse.linuxtools.docker.ui.tests/src/org/eclipse/linuxtools/internal/docker/ui/testutils/MockImageInfoFactory.java
+++ b/containers/org.eclipse.linuxtools.docker.ui.tests/src/org/eclipse/linuxtools/internal/docker/ui/testutils/MockImageInfoFactory.java
@@ -13,14 +13,12 @@
package org.eclipse.linuxtools.internal.docker.ui.testutils;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import org.mockito.Mockito;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
import com.spotify.docker.client.messages.ContainerConfig;
import com.spotify.docker.client.messages.ImageInfo;
@@ -37,7 +35,7 @@ public class MockImageInfoFactory {
private final ImageInfo imageInfo;
- private Map<String, Map> volumes;
+ private ImmutableSet<String> volumes;
private List<String> command;
@@ -51,9 +49,9 @@ public class MockImageInfoFactory {
public Builder volume(final String volume) {
if (this.volumes == null) {
- this.volumes = new HashMap<>();
+ this.volumes = new ImmutableSet.Builder<String>().add(volume).build();
}
- this.volumes.put(volume, new HashMap<>());
+ this.volumes = new ImmutableSet.Builder<String>().addAll(this.volumes).add(volume).build();
return this;
}
@@ -79,7 +77,7 @@ public class MockImageInfoFactory {
Mockito.when(this.imageInfo.containerConfig()).thenReturn(containerConfig);
Mockito.when(config.cmd()).thenReturn(ImmutableList.copyOf(this.command));
Mockito.when(config.entrypoint()).thenReturn(ImmutableList.copyOf(this.entrypoint));
- Mockito.when(config.volumes()).thenReturn(ImmutableMap.copyOf(this.volumes));
+ Mockito.when(config.volumes()).thenReturn(ImmutableSet.copyOf(this.volumes));
Mockito.when(config.env()).thenReturn(ImmutableList.copyOf(this.env));
return imageInfo;
}
diff --git a/releng/org.eclipse.linuxtools.target/linuxtools-e4.8.target b/releng/org.eclipse.linuxtools.target/linuxtools-e4.8.target
index 75484c42e7..03fc48464c 100644
--- a/releng/org.eclipse.linuxtools.target/linuxtools-e4.8.target
+++ b/releng/org.eclipse.linuxtools.target/linuxtools-e4.8.target
@@ -17,8 +17,8 @@
<unit id="com.github.jnr.unixsocket" version="0.18.0.v20180207-1730"/>
<unit id="com.google.gson" version="2.7.0.v20170129-0911"/>
<unit id="com.google.guava" version="21.0.0.v20170206-1425"/>
-<unit id="com.spotify.docker.client" version="8.9.2.v20180207-1730"/>
-<unit id="com.spotify.docker.client.source" version="8.9.2.v20180207-1730"/>
+<unit id="com.spotify.docker.client" version="8.11.7.v20180731-1413"/>
+<unit id="com.spotify.docker.client.source" version="8.11.7.v20180731-1413"/>
<unit id="javassist" version="3.13.0.GA_v201209210905"/>
<unit id="javax.ws.rs" version="2.0.1.v201504171603"/>
<unit id="jnr.x86asm" version="1.0.2.v201505052040"/>
@@ -31,13 +31,13 @@
<unit id="org.apache.commons.lang" version="2.6.0.v201404270220"/>
<unit id="org.apache.commons.lang3" version="3.1.0.v201403281430"/>
<unit id="org.apache.commons.lang3" version="3.1.0.v201403281430"/>
-<unit id="org.apache.httpcomponents.httpclient" version="4.5.2.v20170210-0925"/>
+<unit id="org.apache.httpcomponents.httpclient" version="4.5.2.v20180410-1551"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.6.v20170210-0925"/>
<unit id="org.apache.xerces" version="2.9.0.v201101211617"/>
<unit id="org.assertj" version="1.7.1.v20170413-2026"/>
<unit id="org.assertj" version="1.7.1.v20170413-2026"/>
<unit id="org.bouncycastle.bcpkix" version="1.52.0.v20161004-1854"/>
-<unit id="org.bouncycastle.bcprov" version="1.52.0.v20161004-1854"/>
+<unit id="org.bouncycastle.bcprov" version="1.52.0.v20180328-2148"/>
<unit id="org.cyberneko.html" version="1.9.14.v201105210654"/>
<unit id="org.glassfish.hk2.api" version="2.5.0.v20161103-0227"/>
<unit id="org.glassfish.hk2.locator" version="2.5.0.v20161103-0227"/>
@@ -52,13 +52,13 @@
<unit id="org.glassfish.jersey.media.jersey-media-json-jackson" version="2.22.1.v20161117-2005"/>
<unit id="org.mockito" version="1.9.5.v201605172210"/>
<unit id="org.mockito" version="1.9.5.v201605172210"/>
-<unit id="org.objectweb.asm" version="6.0.0.v20170929-1901"/>
-<unit id="org.objectweb.asm.analysis" version="6.0.0.v20170929-1901"/>
-<unit id="org.objectweb.asm.tree" version="6.0.0.v20170929-1901"/>
-<unit id="org.objectweb.asm.util" version="6.0.0.v20170929-1901"/>
+<unit id="org.objectweb.asm" version="6.0.0.v20180414-0329"/>
+<unit id="org.objectweb.asm.analysis" version="6.0.0.v20180414-0329"/>
+<unit id="org.objectweb.asm.tree" version="6.0.0.v20180414-0329"/>
+<unit id="org.objectweb.asm.util" version="6.0.0.v20180414-0329"/>
<unit id="org.slf4j.api" version="1.7.10.v20170428-1633"/>
<unit id="org.swtchart" version="0.10.0.v201605200358"/>
-<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20180302171354/repository"/>
+<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/I20180801200452/repository"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.jdt.core" version="0.0.0"/>