DESCRIPTION

Bug 471670 - better support cases where the Docker connection is lost

Refactoring the DockerConnection to handle 3 states:
- unknown (connection was not opened)
- established (connection was opened and Docker responded
  to ping)
- closed

Connections are in UNKNOWN state by default, and opened when
node is expanded in Explorer view or list of containers or
images is loaded.

Connection is set back to UNKNOWN state when the settings are
changed.

Change-Id: I469fbe9df711a1539d5407bcae02ad1e1cde6340
Signed-off-by: Zechariah Krause xxx@xxx.xxx


COMMENTS

author: Zechariah Krause
date: 2016-05-31 10:35:33.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2016-05-31 10:35:39.000000000

Patch Set 5:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/10871/

-------------------------------------
author: Brenden Conley
date: 2016-05-31 11:13:18.000000000

Patch Set 5: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/10871/ : SUCCESS

-------------------------------------
author: Zechariah Krause
date: 2016-05-31 12:13:22.000000000

Patch Set 5:

Roland, I took all your comments into account and submitted another version of the patch.

-------------------------------------
author: Nathanael Holden
date: 2016-05-31 14:02:27.000000000

Patch Set 5: Code-Review-1

(1 comment)

Just one small thing I noticed that looks like a change in logic. Might be a typo..

Have you tested that everything is still working as expected. I noticed we have other places where we use the jobchangelistener but going forward we shouldn't just copy the old usages if they don't accomplish anything better than just listing statements sequentially.

Line:77, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/BuildImageCommandHandler.java -> Something has to be wrong here. Initially you made this, 'connection.getState() != EnumDockerConnectionState.ESTABLISHED', and I suggested '! connection.isOpen()'. Now it's just connection.isOpen() so the negation is missing.

Is this just a typo or is there a reason for the change in logic..

-------------------------------------
author: Nathanael Holden
date: 2016-05-31 14:06:36.000000000

Patch Set 5:

(1 comment)

Line:79, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerContainersContentProvider.java -> Nothing happens here, I think the entire addJobChangeListener should be removed like others.

-------------------------------------
author: Zechariah Krause
date: 2016-05-31 16:15:48.000000000

Patch Set 5:

Roland, I took your last 2 comments into accounts. One typo and one cut/paste without removing the remaining listener :-/

-------------------------------------
author: Gerrit Code Review
date: 2016-05-31 18:46:30.000000000

Change has been successfully cherry-picked as 92e687c26559b2b2ae11560eee61a5dd113d2ef9 by Nathanael Holden

-------------------------------------
