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/04 19:25:38 UTC

[GitHub] rabbah commented on a change in pull request #3140: use pureconfig to specify names of db designdocs

rabbah commented on a change in pull request #3140: use pureconfig to specify names of db designdocs
URL: https://github.com/apache/incubator-openwhisk/pull/3140#discussion_r159734921
 
 

 ##########
 File path: common/scala/src/main/scala/whisk/core/entity/WhiskActivation.scala
 ##########
 @@ -147,13 +147,9 @@ object WhiskActivation
 
   override val collectionName = "activations"
 
-  // FIXME: reading the design doc from sys.env instead of a canonical property reader
-  // because WhiskConfig requires a logger, which requires an actor system, neither of
-  // which are readily available here; rather than introduce significant refactoring,
-  // defer this fix until WhiskConfig is refactored itself, which is planned to introduce
-  // type safe properties
-  private val mainDdoc = WhiskConfig.readFromEnv(dbActivationsDesignDoc).getOrElse("whisks.v2")
-  private val filtersDdoc = WhiskConfig.readFromEnv(dbActivationsFilterDesignDoc).getOrElse("whisks-filters.v2")
+  private val dbConfig = loadConfigOrThrow[DBConfig]("whisk.db")
 
 Review comment:
   should we have strings like `"whisk.db"` in a config singleton?

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