chetanmeh commented on a change in pull request #3196: Fixes #3195 - create 
config object for docker in the invoker and get ?
URL: 
https://github.com/apache/incubator-openwhisk/pull/3196#discussion_r163146551
 
 

 ##########
 File path: 
core/invoker/src/main/scala/whisk/core/containerpool/ContainerProxy.scala
 ##########
 @@ -380,18 +382,25 @@ class ContainerProxy(
     val activationWithLogs: Future[Either[ActivationLogReadingError, 
WhiskActivation]] = activation
       .flatMap { activation =>
         val start = tid.started(this, LoggingMarkers.INVOKER_COLLECT_LOGS)
-        collectLogs(tid, job.msg.user, activation, container, job.action)
-          .andThen {
-            case Success(_) => tid.finished(this, start)
-            case Failure(t) => tid.failed(this, start, s"reading logs failed: 
$t")
-          }
-          .map(logs => Right(activation.withLogs(logs)))
-          .recover {
-            case LogCollectingException(logs) =>
-              Left(ActivationLogReadingError(activation.withLogs(logs)))
-            case _ =>
-              
Left(ActivationLogReadingError(activation.withLogs(ActivationLogs(Vector(Messages.logFailure)))))
-          }
+        Try(
+          collectLogs(tid, job.msg.user, activation, container, job.action)
 
 Review comment:
   > Where is the exception thrown? Can we make collectLogs not throw an 
exception but rather return a Future.failed in that case?
   
   @markusthoemmes  Problem here is that `collectLogs` is provided from 
outside. So we would need to rely on it returning a Future.failed. More details 
are provided [here][1]
   
   [1]: 
https://github.com/apache/incubator-openwhisk/issues/3195#issuecomment-358734535

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to