rabbah commented on a change in pull request #3369: Use pureconfig for 
CouchDbRestStore
URL: 
https://github.com/apache/incubator-openwhisk/pull/3369#discussion_r172544358
 
 

 ##########
 File path: 
common/scala/src/main/scala/whisk/core/database/CouchDbStoreProvider.scala
 ##########
 @@ -36,21 +47,18 @@ object CouchDbStoreProvider extends ArtifactStoreProvider {
     actorSystem: ActorSystem,
     logging: Logging,
     materializer: ActorMaterializer): ArtifactStore[D] = {
-    require(config != null && config.isValid, "config is undefined or not 
valid")
+    val dbConfig = loadConfigOrThrow[CouchDbConfig](ConfigKeys.couchdb)
     require(
-      config.dbProvider == "Cloudant" || config.dbProvider == "CouchDB",
-      "Unsupported db.provider: " + config.dbProvider)
-    assume(
-      Set(config.dbProtocol, config.dbHost, config.dbPort, config.dbUsername, 
config.dbPassword, name(config))
-        .forall(_.nonEmpty),
-      "At least one expected property is missing")
+      dbConfig.provider == "Cloudant" || dbConfig.provider == "CouchDB",
+      s"Unsupported db.provider: ${dbConfig.provider}")
 
 Review comment:
   This is vestigial at this point and can be removed in separate PR.

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


With regards,
Apache Git Services

Reply via email to