You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/01/17 18:13:25 UTC

[GitHub] mcdan commented on a change in pull request #3196: Fixes #3195 - create config object for docker in the invoker and get ?

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

 ##########
 File path: core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerContainerFactory.scala
 ##########
 @@ -17,30 +17,35 @@
 
 package whisk.core.containerpool.docker
 
+import java.nio.file.Paths
+import java.util.concurrent.TimeoutException
+
 import akka.actor.ActorSystem
-import scala.concurrent.Await
-import scala.concurrent.ExecutionContext
-import scala.concurrent.Future
 import whisk.common.Logging
 import whisk.common.TransactionId
-import whisk.core.WhiskConfig
 import whisk.core.containerpool.Container
 import whisk.core.containerpool.ContainerFactory
 import whisk.core.containerpool.ContainerFactoryProvider
 import whisk.core.entity.ByteSize
 import whisk.core.entity.ExecManifest
 import whisk.core.entity.InstanceId
+import whisk.core.ConfigKeys
+import whisk.core.WhiskConfig
+
 import scala.concurrent.duration._
-import java.util.concurrent.TimeoutException
+import scala.concurrent.Await
+import scala.concurrent.ExecutionContext
+import scala.concurrent.Future
 
 class DockerContainerFactory(config: WhiskConfig, instance: InstanceId, parameters: Map[String, Set[String]])(
   implicit actorSystem: ActorSystem,
   ec: ExecutionContext,
   logging: Logging)
     extends ContainerFactory {
+  private val dockerConfig = pureconfig.loadConfigOrThrow[DockerContainerFactoryConfig](ConfigKeys.invokerDocker)
 
 Review comment:
   Would like some advice on if this is the best pattern for the pureconfig setup. I think the DockerContainter factory is probably the right spot for reading some config but not sure how much I should be pulling into the case class and if the "key" is appropriate in WhiskConfig.scala.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services