rabbah commented on a change in pull request #5169:
URL: https://github.com/apache/openwhisk/pull/5169#discussion_r796206810



##########
File path: 
common/scala/src/main/scala/org/apache/openwhisk/core/database/ActivationStore.scala
##########
@@ -33,32 +32,52 @@ import scala.concurrent.Future
 case class UserContext(user: Identity, request: HttpRequest = HttpRequest())
 
 trait ActivationStore {
+  val logging: Logging
 
+  /* DEPRECATED: disableStoreResult config is now deprecated replaced with 
blocking activation store level (storeBlockingResultLevel) */
   protected val disableStoreResultConfig = 
loadConfigOrThrow[Boolean](ConfigKeys.disableStoreResult)
+  protected val storeBlockingResultLevelConfig = {
+    try {
+      
ActivationStoreLevel.valueOf(loadConfigOrThrow[String](ConfigKeys.storeBlockingResultLevel))
+    } catch {
+      case _: Exception =>
+        val disableStoreResultConfig = 
loadConfigOrThrow[Boolean](ConfigKeys.disableStoreResult)
+        logging.warn(
+          this,
+          s"The config ${ConfigKeys.disableStoreResult} being used is 
deprecated. Please use the replacement config 
${ConfigKeys.storeBlockingResultLevel}")
+        if (disableStoreResultConfig) ActivationStoreLevel.STORE_FAILURES else 
ActivationStoreLevel.STORE_ALWAYS
+    }
+  }
+  protected val storeNonBlockingResultLevelConfig =

Review comment:
       should this also be in the try and ignored/set to false if it fails?
   this lgtm in general, just a question of how long you want to tolerate the 
deprecated flag.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to