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

 ##########
 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?
   
   If not: We should only wrap `collectLogs` into a `Try` or just use a 
`try/catch` here to not box unnecessary.

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