openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rab...@apache.org
Subject [incubator-openwhisk] branch master updated: Always return activation without log on blocking invoke. (#4100)
Date Tue, 06 Nov 2018 12:33:40 GMT
This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 729cb2c  Always return activation without log on blocking invoke. (#4100)
729cb2c is described below

commit 729cb2c19dc6b1ee7d654df591a2e9858909db01
Author: Christian Bickel <github@cbickel.de>
AuthorDate: Tue Nov 6 13:33:32 2018 +0100

    Always return activation without log on blocking invoke. (#4100)
    
    If a user invokes a blocking action today, the invoker executes the activation and sends
back the result to the controller, which passes it back to the client. If it is not possible
to pass the result back to the controller, the controller will try to get the result from
the database. And here's the problem. If the controller receives the result of the activation
from the invoker, there are no logs included. If it polls it from the database, the logs are
included. This should be unifi [...]
---
 .../main/scala/whisk/core/controller/actions/PrimitiveActions.scala    | 2 +-
 tests/src/test/scala/whisk/core/controller/test/ActionsApiTests.scala  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
b/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
index b924d93..d16bafa 100644
--- a/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
+++ b/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
@@ -631,7 +631,7 @@ protected[actions] trait PrimitiveActions {
               LoggingMarkers.CONTROLLER_ACTIVATION_BLOCKING_DATABASE_RETRIEVAL,
               s"retrieved activation for blocking invocation via DB polling",
               logLevel = InfoLevel)
-            result.trySuccess(Right(activation))
+            result.trySuccess(Right(activation.withoutLogs))
           case Failure(_: NoDocumentException) => pollActivation(docid, context, result,
wait, retries + 1, maxRetries)
           case Failure(t: Throwable)           => result.tryFailure(t)
         }
diff --git a/tests/src/test/scala/whisk/core/controller/test/ActionsApiTests.scala b/tests/src/test/scala/whisk/core/controller/test/ActionsApiTests.scala
index fe4d217..31a996a 100644
--- a/tests/src/test/scala/whisk/core/controller/test/ActionsApiTests.scala
+++ b/tests/src/test/scala/whisk/core/controller/test/ActionsApiTests.scala
@@ -1271,7 +1271,8 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi
{
       activationIdFactory.make(),
       start = Instant.now,
       end = Instant.now,
-      response = ActivationResponse.success(Some(JsObject("test" -> "yes".toJson))))
+      response = ActivationResponse.success(Some(JsObject("test" -> "yes".toJson))),
+      logs = ActivationLogs(Vector("first line", "second line")))
     put(entityStore, action)
     // storing the activation in the db will allow the db polling to retrieve it
     // the test harness makes sure the activation id observed by the test matches


Mime
View raw message