You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/07/09 14:40:30 UTC
[GitHub] dgrove-oss closed pull request #52: Do not emit log marker on a
re-init.
dgrove-oss closed pull request #52: Do not emit log marker on a re-init.
URL: https://github.com/apache/incubator-openwhisk-runtime-docker/pull/52
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/README.md b/README.md
index 32f61cb..c01c912 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ zip myAction.zip exec
Create the action using the docker image for the runtime
```
-wsk action update myAction myAction.zip --docker openwhisk/dockerskeleton:1.3.1
+wsk action update myAction myAction.zip --docker openwhisk/dockerskeleton:1.3.2
```
This works on any deployment of Apache OpenWhisk
diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md
index 8712a33..fa09b5d 100644
--- a/core/CHANGELOG.md
+++ b/core/CHANGELOG.md
@@ -19,6 +19,10 @@
# Apache OpenWhisk Docker Runtime Container
+## 1.3.2
+Changes:
+ - Fixes bug where a log maker is emitted more than once.
+
## 1.3.1
Changes:
- Disallow re-initialization by default. Added environment variable to enable re-initialization for local development.
diff --git a/core/actionProxy/actionproxy.py b/core/actionProxy/actionproxy.py
index 0bca409..9d34776 100644
--- a/core/actionProxy/actionproxy.py
+++ b/core/actionProxy/actionproxy.py
@@ -221,7 +221,7 @@ def init():
sys.stderr.write(msg + '\n')
response = flask.jsonify({'error': msg})
response.status_code = 403
- return complete(response)
+ return response
message = flask.request.get_json(force=True, silent=True)
if message and not isinstance(message, dict):
diff --git a/tests/src/test/scala/runtime/actionContainers/ActionProxyContainerTests.scala b/tests/src/test/scala/runtime/actionContainers/ActionProxyContainerTests.scala
index 52022ee..383f43b 100644
--- a/tests/src/test/scala/runtime/actionContainers/ActionProxyContainerTests.scala
+++ b/tests/src/test/scala/runtime/actionContainers/ActionProxyContainerTests.scala
@@ -30,13 +30,7 @@ import common.TestUtils
import common.WskActorSystem
import spray.json._
-@RunWith(classOf[JUnitRunner])
-class ActionProxyContainerTests extends BasicActionRunnerTests with WskActorSystem {
-
- override def withActionContainer(env: Map[String, String] = Map.empty)(code: ActionContainer => Unit) = {
- withContainer("dockerskeleton", env)(code)
- }
-
+object CodeSamples {
val codeNotReturningJson = """
|#!/bin/sh
|echo not a json object
@@ -149,6 +143,25 @@ class ActionProxyContainerTests extends BasicActionRunnerTests with WskActorSyst
Seq(("bash", bash), ("python", python), ("perl", perl))
}
+}
+
+@RunWith(classOf[JUnitRunner])
+class ActionProxyContainerTests extends BasicActionRunnerTests with WskActorSystem {
+
+ override def withActionContainer(env: Map[String, String] = Map.empty)(code: ActionContainer => Unit) = {
+ withContainer("dockerskeleton", env)(code)
+ }
+
+ override val testNoSourceOrExec = TestConfig("", hasCodeStub = true)
+ override val testNotReturningJson = TestConfig(CodeSamples.codeNotReturningJson, enforceEmptyOutputStream = false)
+ override val testInitCannotBeCalledMoreThanOnce = TestConfig(CodeSamples.codeNotReturningJson)
+ // the skeleton requires the executable to be called /action/exec, this test will pass with any "main"
+ override val testEntryPointOtherThanMain =
+ TestConfig(CodeSamples.stdLargeInputSamples(0)._2, main = "exec", false, true)
+ override val testEcho = TestConfig(CodeSamples.stdCodeSamples(0)._2)
+ override val testUnicode = TestConfig(CodeSamples.stdUnicodeSamples(0)._2)
+ override val testEnv = TestConfig(CodeSamples.stdEnvSamples(0)._2)
+ override val testLargeInput = TestConfig(CodeSamples.stdLargeInputSamples(0)._2)
behavior of "openwhisk/dockerskeleton"
@@ -239,11 +252,4 @@ class ActionProxyContainerTests extends BasicActionRunnerTests with WskActorSyst
e shouldBe empty
})
}
-
- testNotReturningJson(codeNotReturningJson, checkResultInLogs = true)
- testEcho(stdCodeSamples)
- testUnicode(stdUnicodeSamples)
- testEnv(stdEnvSamples)
- testLargeInput(stdLargeInputSamples)
- testInitCannotBeCalledMoreThanOnce(codeNotReturningJson) // any code sample will do
}
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services