ruediger-maass commented on a change in pull request #4299: Avoid that actions
do not stop after action timeout when logging heavily
URL:
https://github.com/apache/incubator-openwhisk/pull/4299#discussion_r260727635
##########
File path:
common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationFileLogStore.scala
##########
@@ -151,7 +155,10 @@ class DockerToActivationFileLogStore(system: ActorSystem,
destinationDirectory:
logs.runWith(combined)._1.flatMap { seq =>
val possibleErrors = Set(Messages.logFailure,
Messages.truncateLogs(action.limits.logs.asMegaBytes))
val errored = seq.lastOption.exists(last =>
possibleErrors.exists(last.contains))
- val logs = ActivationLogs(seq.toVector)
+ val logs = ActivationLogs(
+ if (activation.response.isContainerError)
+ seq.toVector :+ LogLine(Instant.now.toString, "stderr",
Messages.logFailure).toFormattedString
+ else seq.toVector)
Review comment:
adapted the code to your proposal
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services