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

 ##########
 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:
   @rabbah can you confirm? I think we used to have a distinction but killed 
all of that long ago with a hard switch to just CouchDB APIs.

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