[incubator-openwhisk] branch master updated: Adjust error handling in the Cloudant Rest Store (#4325)
This is an automated email from the ASF dual-hosted git repository. markusthoemmes 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 6f4d185 Adjust error handling in the Cloudant Rest Store (#4325) 6f4d185 is described below commit 6f4d1854813f2cc6e39d16dc7b1e9525f7b5e20e Author: Martin Henke AuthorDate: Thu May 9 07:28:08 2019 +0200 Adjust error handling in the Cloudant Rest Store (#4325) * correct inconsistent error handling in the couchdb rest store * remove duplicate metrics by making exceptions distinguishable --- .../core/database/ArtifactStoreExceptions.scala| 6 ++ .../openwhisk/core/database/CouchDbRestStore.scala | 18 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStoreExceptions.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStoreExceptions.scala index fb6a072..701ff84 100644 --- a/common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStoreExceptions.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/ArtifactStoreExceptions.scala @@ -27,8 +27,14 @@ case class DocumentTypeMismatchException(message: String) extends ArtifactStoreE case class DocumentUnreadable(message: String) extends ArtifactStoreException(message) +case class GetException(message: String) extends ArtifactStoreException(message) + case class PutException(message: String) extends ArtifactStoreException(message) +case class DeleteException(message: String) extends ArtifactStoreException(message) + +case class QueryException(message: String) extends ArtifactStoreException(message) + sealed abstract class ArtifactStoreRuntimeException(message: String) extends RuntimeException(message) case class UnsupportedQueryKeys(message: String) extends ArtifactStoreRuntimeException(message) diff --git a/common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbRestStore.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbRestStore.scala index 4707781..774cf2e 100644 --- a/common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbRestStore.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbRestStore.scala @@ -129,7 +129,7 @@ class CouchDbRestStore[DocumentAbstraction <: DocumentSerializer](dbProtocol: St start, s"[PUT] '$dbName' failed to put document: '${docinfoStr}'; http status: '${code}'", ErrorLevel) - throw new Exception("Unexpected http response code: " + code) + throw new PutException("Unexpected http response code: " + code) } } @@ -164,7 +164,7 @@ class CouchDbRestStore[DocumentAbstraction <: DocumentSerializer](dbProtocol: St case Left(code) => transid.failed(this, start, s"'$dbName' failed to put documents, http status: '${code}'", ErrorLevel) - throw new Exception("Unexpected http response code: " + code) + throw new PutException("Unexpected http response code: " + code) } } @@ -200,7 +200,7 @@ class CouchDbRestStore[DocumentAbstraction <: DocumentSerializer](dbProtocol: St start, s"[DEL] '$dbName' failed to delete document: '${doc}'; http status: '${code}'", ErrorLevel) - throw new Exception("Unexpected http response code: " + code) + throw new DeleteException("Unexpected http response code: " + code) } } @@ -240,8 +240,8 @@ class CouchDbRestStore[DocumentAbstraction <: DocumentSerializer](dbProtocol: St throw NoDocumentException("not found on 'get'") case Left(code) => - transid.finished(this, start, s"[GET] '$dbName' failed to get document: '${doc}'; http status: '${code}'") - throw new Exception("Unexpected http response code: " + code) + transid.failed(this, start, s"[GET] '$dbName' failed to get document: '${doc}'; http status: '${code}'") + throw new GetException("Unexpected http response code: " + code) } } recoverWith { case e: DeserializationException => throw DocumentUnreadable(Messages.corruptedEntity) @@ -310,7 +310,7 @@ class CouchDbRestStore[DocumentAbstraction <: DocumentSerializer](dbProtocol: St case Left(code) => transid.failed(this, start, s"Unexpected http response code: $code", ErrorLevel) - throw new Exception("Unexpected http response code: " + code) + throw new QueryException("Unexpected http response code: " + code) } reportFailure( @@ -344,7 +344,7 @@ class CouchDbRestStore[DocumentAbstraction <: DocumentSerializer](dbProtocol: St case Left(code) => transid.failed(this, start,
[incubator-openwhisk-apigateway] branch master updated: Add paging to getTenantAPIs (#335)
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-apigateway.git The following commit(s) were added to refs/heads/master by this push: new 1f46de9 Add paging to getTenantAPIs (#335) 1f46de9 is described below commit 1f46de9d2f7a9420e48c533af7a4b1b6118aa130 Author: Lars Andersson AuthorDate: Thu May 9 07:10:22 2019 +0200 Add paging to getTenantAPIs (#335) * Fix for https://github.com/apache/incubator-openwhisk/issues/1692#issuecomment-463651323 --- scripts/lua/management/lib/tenants.lua | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/scripts/lua/management/lib/tenants.lua b/scripts/lua/management/lib/tenants.lua index fda5413..314da92 100644 --- a/scripts/lua/management/lib/tenants.lua +++ b/scripts/lua/management/lib/tenants.lua @@ -114,7 +114,39 @@ function _M.getTenantAPIs(dataStore, id, queryParams) end end end - return apiList + if ((queryParams['skip'] == nil and queryParams['limit'] == nil) or table.getn(apiList) == 0) then +return apiList + else +return applyPagingToAPIs(apiList, queryParams) + end +end + +-- Apply paging on apis +-- @param apis the list of apis +-- @param queryparams object containing optional query parameters +function applyPagingToAPIs(apiList, queryParams) + local skip = queryParams['skip'] == nil and 1 or queryParams['skip'] + local limit = queryParams['limit'] == nil and table.getn(apiList) or queryParams['limit'] + if (tonumber(limit) < 1) then +return {} + end + if (tonumber(skip) <= 0) then +skip = 1 + else +skip = skip + 1 + end + if ((skip + limit - 1) > table.getn(apiList)) then +limit = table.getn(apiList) + else +limit = skip + limit - 1 + end + local apis = {} + local idx = 0 + for i = skip, limit do +apis[idx] = apiList[i] +idx = idx + 1 + end + return apis end --- Filter apis based on query paramters
[incubator-openwhisk] branch master updated: Honor skip and limit aparameters in action /whisk.system/apimgmt/getApi (#4295)
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 d2bdcda Honor skip and limit aparameters in action /whisk.system/apimgmt/getApi (#4295) d2bdcda is described below commit d2bdcdab157ac45b938ab6086a80bad694b8d0fa Author: Lars Andersson AuthorDate: Thu May 9 07:08:27 2019 +0200 Honor skip and limit aparameters in action /whisk.system/apimgmt/getApi (#4295) --- core/routemgmt/common/apigw-utils.js | 4 ++-- core/routemgmt/getApi/getApi.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/routemgmt/common/apigw-utils.js b/core/routemgmt/common/apigw-utils.js index d66ac3c..8ed07e6 100644 --- a/core/routemgmt/common/apigw-utils.js +++ b/core/routemgmt/common/apigw-utils.js @@ -287,7 +287,7 @@ function deleteApiFromGateway(gwInfo, spaceGuid, apiId) { /** * Return an array of APIs */ -function getApis(gwInfo, spaceGuid, bpOrApiName) { +function getApis(gwInfo, spaceGuid, bpOrApiName, limit, skip) { var qsBasepath = { 'basePath' : bpOrApiName }; var qsApiName = { 'title' : bpOrApiName }; var qs; @@ -302,7 +302,7 @@ function getApis(gwInfo, spaceGuid, bpOrApiName) { } var options = { followAllRedirects: true, -url: gwInfo.gwUrl+'/'+encodeURIComponent(spaceGuid)+'/apis', +url: gwInfo.gwUrl+'/'+encodeURIComponent(spaceGuid)+'/apis?limit='+limit+'='+skip, headers: { 'Accept': 'application/json', 'User-Agent': UserAgent diff --git a/core/routemgmt/getApi/getApi.js b/core/routemgmt/getApi/getApi.js index 198b820..c349d90 100644 --- a/core/routemgmt/getApi/getApi.js +++ b/core/routemgmt/getApi/getApi.js @@ -81,6 +81,8 @@ function main(message) { console.log('tenantInstance: '+message.tenantInstance+' / '+tenantInstance); console.log('accesstoken : '+message.accesstoken); console.log('spaceguid : '+message.spaceguid); + console.log('limit : '+message.limit); + console.log('skip : '+message.skip); console.log('basepath/name : '+message.basepath); console.log('relpath : '+message.relpath); console.log('operation : '+message.operation); @@ -91,7 +93,7 @@ function main(message) { gwInfo.gwUrl = message.gwUrlV2; gwInfo.gwAuth = message.accesstoken; // Obtain the API from the API GW -return utils2.getApis(gwInfo, message.spaceguid, message.basepath) +return utils2.getApis(gwInfo, message.spaceguid, message.basepath, message.limit, message.skip) .then(function(endpointDocs) { console.log('Got '+endpointDocs.length+' APIs'); if (endpointDocs.length === 0) {
[incubator-openwhisk] branch master updated (e9583fd -> b814c42)
This is an automated email from the ASF dual-hosted git repository. rabbah pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git. from e9583fd Touch-up Action loop markdown adjusting grammar/flow (#4469) add b814c42 ubuntu installation guide change (#4463) No new revisions were added by this update. Summary of changes: tools/ubuntu-setup/README.md | 1 + 1 file changed, 1 insertion(+)
[incubator-openwhisk] branch master updated: Touch-up Action loop markdown adjusting grammar/flow (#4469)
This is an automated email from the ASF dual-hosted git repository. mrutkowski 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 e9583fd Touch-up Action loop markdown adjusting grammar/flow (#4469) e9583fd is described below commit e9583fd2e3a48ea211d976deeb13b3019866310e Author: Matt Rutkowski AuthorDate: Wed May 8 17:52:59 2019 -0500 Touch-up Action loop markdown adjusting grammar/flow (#4469) * Touch-up pass on ActionLoop docs. * Touch-up pass on ActionLoop docs. * Touch-up pass on ActionLoop docs. * Touch-up pass on ActionLoop docs. * Touch-up pass on ActionLoop docs. * Touch-up pass on ActionLoop docs. * Touch-up pass on ActionLoop docs. * complete update of launcher xlate to ruby instructions * complete update of launcher xlate to ruby instructions --- docs/actions-actionloop.md | 213 + 1 file changed, 120 insertions(+), 93 deletions(-) diff --git a/docs/actions-actionloop.md b/docs/actions-actionloop.md index 87bd7be..62f5dc3 100644 --- a/docs/actions-actionloop.md +++ b/docs/actions-actionloop.md @@ -17,73 +17,82 @@ # limitations under the License. # --> + # Developing a new Runtime with the ActionLoop proxy -The [runtime specification](actions-new.md) defines the expected behavior of a runtime. You can implement a runtime from scratch just following the spec. +The [runtime specification](actions-new.md) defines the expected behavior of a runtime. You can implement a runtime from scratch just following the specification. -However, the fastest way to develop a new runtime is reusing the *ActionLoop* proxy, that already implements the specification and provides just a few hooks to get a fully functional (and *fast*) runtime in a few hours. +However, the fastest way to develop a new runtime is reusing the *ActionLoop* proxy that already implements the specification and provides just a few hooks to get a fully functional (and *fast*) runtime in a few hours or less. ## What is the ActionLoop proxy -The ActionLoop proxy is a runtime "engine", written in Go, originally developed specifically to support the Go language. However it was written in a pretty generic way, and it has been then adopted also to implement runtimes for Swift, PHP, Python, Rust, Java, Ruby and Crystal. Even though it was developed with compiled languages in mind it works equally well with scripting languages. - -Using it, you can develop a new runtime in a fraction of the time needed for a full-fledged runtime, since you have only to write a command line protocol and not a fully featured web server, with an amount of corner case to take care. +The ActionLoop proxy is a runtime "engine", written in the [Go programming language](https://golang.org/), originally developed specifically to support a Go language runtime. However, it was written in a generic way such that it has since been adopted to implement runtimes for Swift, PHP, Python, Rust, Java, Ruby and Crystal. Even though it was developed with compiled languages in mind it works equally well with scripting languages. -Also, you will likely get a pretty fast runtime, since it is currently the most rapid. It was also adopted to improve performances of existing runtimes, that gained from factor 2x to a factor 20x for languages like Python, Ruby, PHP, and Java. +Using it, you can develop a new runtime in a fraction of the time needed for authoring a full-fledged runtime from scratch. This is due to the fact that you have only to write a command line protocol and not a fully featured web server (with a small amount of corner case to take care of). The results should also produce a runtime that is fairly fast and responsive. In fact, the ActionLoop proxy has also been adopted to improve the performance of existing runtimes like Python, Ruby, PHP, [...] -ActionLoop also supports "precompilation". You can take a raw image and use the docker image to perform the transformation in action. You will get a zip file that you can use as an action that is very fast to start because it contains only the binaries and not the sources. +ActionLoop also supports "precompilation". You can use the docker image of the runtime to compile your source files in an action offline. You will get a ZIP file that you can use as an action that is very fast to start because it contains only the binaries and not the sources. More information on this approach can be found here: [Precompiling Go Sources Offline](https://github.com/apache/incubator-openwhisk-runtime-go/blob/master/docs/DEPLOY.md#precompile) which describes how to do this [...] -So it is likely are using ActionLoop a better bet than implementing the specification from scratch. If you are convinced and want to use it, read
[incubator-openwhisk-package-kafka] branch master updated: Upgrade ibrdkafka to latest major release (#339)
This is an automated email from the ASF dual-hosted git repository. japetrsn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-package-kafka.git The following commit(s) were added to refs/heads/master by this push: new cdb1de8 Upgrade ibrdkafka to latest major release (#339) cdb1de8 is described below commit cdb1de87c9042b4e6d425d80302d437b20e672ec Author: James Dubee AuthorDate: Wed May 8 18:01:25 2019 -0400 Upgrade ibrdkafka to latest major release (#339) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5d37564..7df860c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM python:2.7.16 RUN apt-get update && apt-get upgrade -y # install librdkafka -ENV LIBRDKAFKA_VERSION 0.11.6 +ENV LIBRDKAFKA_VERSION 1.0.0 RUN git clone --depth 1 --branch v${LIBRDKAFKA_VERSION} https://github.com/edenhill/librdkafka.git librdkafka \ && cd librdkafka \ && ./configure \
[incubator-openwhisk-devtools] branch master updated: Add updated test jars and test http payloads (#258)
This is an automated email from the ASF dual-hosted git repository. pdesai pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-devtools.git The following commit(s) were added to refs/heads/master by this push: new 1f27b3b Add updated test jars and test http payloads (#258) 1f27b3b is described below commit 1f27b3b2c5ad5dec49591ed0d4edebfeb53653d4 Author: Matt Rutkowski AuthorDate: Wed May 8 12:04:56 2019 -0500 Add updated test jars and test http payloads (#258) * Update tests for java8 dockerfile * Update tests for java8 dockerfile --- .gitignore | 1 + .../java/tests/knative/helloworld/README.md| 51 .../tests/knative/helloworldwithparams/Hello.java | 30 .../tests/knative/helloworldwithparams/README.md | 52 .../tests/knative/helloworldwithparams/hello.jar | Bin 0 -> 1107 bytes .../knative-data-init-run.json | 2 +- .../helloworldwithparams/knative-data-init.json| 2 +- .../helloworldwithparams/openwhisk-data-init.json | 2 +- .../payload-knative-init-run.http | 2 +- .../helloworldwithparams/payload-knative-init.http | 2 +- .../payload-openwhisk-init.http| 2 +- .../knative/helloworldwithparamsfromenv/Hello.java | 27 +++ .../knative/helloworldwithparamsfromenv/README.md | 53 + .../knative/helloworldwithparamsfromenv/hello.jar | Bin 0 -> 1069 bytes .../knative-data-init-run.json | 2 +- .../knative-data-init.json | 2 +- .../openwhisk-data-init.json | 2 +- .../payload-knative-init-run.http | 2 +- .../payload-openwhisk-init.http| 2 +- 19 files changed, 225 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 309bf07..8f36644 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ package-lock.json # Java *.class +*.base64 out/ # Swift diff --git a/knative-build/runtimes/java/tests/knative/helloworld/README.md b/knative-build/runtimes/java/tests/knative/helloworld/README.md index 812edf6..8b83ab5 100644 --- a/knative-build/runtimes/java/tests/knative/helloworld/README.md +++ b/knative-build/runtimes/java/tests/knative/helloworld/README.md @@ -72,3 +72,54 @@ curl -H "Host: java-helloworld.default.example.com" -d "@openwhisk-data-run.json {"payload":"Hello World!"} ``` + +## Updating the testcase + +### Create the jar file + +``` +$ jar cf hello.jar Hello.java +``` + +### Base64 encode the jar file +``` +$ base64 hello.jar > hello.jar.base64 +``` + +hello.jar.base64 then contains: + +``` +UEsDBBQACAgIACZ+p04JAAQATUVUQS1JTkYv/soAAAMAUEsHCAACAFBLAwQUAAgICAAmfqdOFE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEGxkYKWi4JudkFhSnKvgXpOZ5WWrycvFyAQBQSwcIMFMkp0EAAABBUEsDBBQACAgIAAl+p04KSGVsbG8uamF2YX1TTW+bQBC98yumnHDi4qrHRjnQJFZoIxwFp1GOaxhgW9ilu0uIVeW/d4aPBKlRORjv7Myb994MmxMPTuBGZqgs5uA0uAohakVGr1QXrhcGYas7lQsntYIgSrcroCMa0ApBG2i0QUbJtHJGHjpHsXpEBFEaxAaVsyFAijjAJ7t9fHEFhawRcmnH [...] +``` + +### Update value for "code" key in test file + +Any file that contains an "init" payload will need to be updated. For example, using ```payload-knative-init-run.http``` as an example: + +``` +POST http://localhost:8080/ HTTP/1.1 +content-type: application/json + +{ + "init": { +"name": "java-helloworld", +"main": "Hello", +"binary": true, +"code" : "UEsDBBQACAgIABljwUoJAAQATUVUQS1JTkYv/soAAAMAUEsHCAACAFBLAwQUAAgICAAZY8FKFE1FVEEtSU5GL01BTklGRVNULk1G803My0xLLS7RDUstKs7Mz7NSMNQz4OVyLkpNLElN0XWqBAlY6BnEmxkoaPgXJSbnpCo45xcV5BcllgCVa/Jy8XIBAFBLBwhiwEEKQwAAAEQAAABQSwMEFAAICAgACmPBSgsAAABIZWxsby5jbGFzc31T227TQBA9k5tdx6HBtCkUUhpuTdK0Bkq5NFUlioQQSqFSUCV428Qr4+JL5DgVfAp/AS+pRCU+gG9CiFmLgFTSWvLM7J6Zc2Zn7R+/vn0H8ABtAxaqOpZ0XDegYVmZmoEbuKnhlloweFvDHQOGCleUr+toKN9U+KqGlo [...] + }, + "activation": { +"namespace": "default", +"action_name": "java-helloworld", +"api_host": "", +"api_key": "", +"activation_id": "", +"deadline": "410249880" + }, + "value": { +"name": "Joe", +"place": "TX" + } +} + +### +``` diff --git a/knative-build/runtimes/java/tests/knative/helloworldwithparams/Hello.java b/knative-build/runtimes/java/tests/knative/helloworldwithparams/Hello.java new file mode 100644 index 000..e10a8f8 --- /dev/null +++ b/knative-build/runtimes/java/tests/knative/helloworldwithparams/Hello.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this
[incubator-openwhisk-cli] branch master updated: Update tests to react to provide-api-key toggle (#438)
This is an automated email from the ASF dual-hosted git repository. japetrsn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git The following commit(s) were added to refs/heads/master by this push: new 18fd63c Update tests to react to provide-api-key toggle (#438) 18fd63c is described below commit 18fd63cf05c35c6a0c4d2b8717c30a56fc0a7268 Author: James Dubee AuthorDate: Wed May 8 11:19:21 2019 -0400 Update tests to react to provide-api-key toggle (#438) --- .../core/cli/test/WskCliBasicUsageTests.scala | 115 +++-- .../test/scala/system/basic/WskCliBasicTests.scala | 36 --- 2 files changed, 85 insertions(+), 66 deletions(-) diff --git a/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskCliBasicUsageTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskCliBasicUsageTests.scala index 66106b4..b16b58b 100644 --- a/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskCliBasicUsageTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskCliBasicUsageTests.scala @@ -66,7 +66,7 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers { // Some action invocation environments will not have an api key; so allow this check to be conditionally skipped val apiKeyCheck = true - val requireAPIKeyAnnotation = WhiskProperties.getBooleanProperty("whisk.feature.requireApiKeyAnnotation", true); + val requireAPIKeyAnnotation = WhiskProperties.getBooleanProperty("whisk.feature.requireApiKeyAnnotation", true) behavior of "Wsk CLI usage" @@ -653,6 +653,24 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers { val createAnnots = Map(createKey -> createValue, origKey -> origValue) val updateAnnots = Map(updateKey -> updateValue, origKey -> overwrittenValue) +val baseAnnotations = + Parameters("web-export", JsTrue) ++ +Parameters("raw-http", JsFalse) ++ +Parameters("final", JsTrue) ++ +Parameters("exec", "nodejs:6") +val createAnnotations = if (requireAPIKeyAnnotation) { + baseAnnotations ++ +Parameters(WhiskAction.provideApiKeyAnnotationName, JsFalse) ++ +Parameters(createKey, createValue) ++ +Parameters(origKey, origValue) +} else { + baseAnnotations ++ +Parameters(createKey, createValue) ++ +Parameters(origKey, origValue) +} +val updateAnnotations = baseAnnotations ++ Parameters(updateKey, updateValue) ++ Parameters( + origKey, + overwrittenValue) assetHelper.withCleaner(wsk.action, name) { (action, _) => action.create(name, file, annotations = createAnnots) @@ -660,30 +678,18 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers { wsk.action.create(name, file, web = Some("true"), update = true) -val existinAnnots = - wsk.action.get(name, fieldFilter = Some("annotations")).stdout -assert(existinAnnots.startsWith(s"ok: got action $name, displaying field annotations\n")) -removeCLIHeader(existinAnnots).parseJson shouldBe JsArray( - JsObject("key" -> JsString("web-export"), "value" -> JsBoolean(true)), - JsObject("key" -> JsString(origKey), "value" -> origValue), - JsObject("key" -> JsString("raw-http"), "value" -> JsBoolean(false)), - JsObject("key" -> JsString("final"), "value" -> JsBoolean(true)), - JsObject("key" -> JsString(createKey), "value" -> createValue), - JsObject("key" -> JsString(WhiskAction.provideApiKeyAnnotationName), "value" -> JsBoolean(false)), - JsObject("key" -> JsString("exec"), "value" -> JsString("nodejs:6"))) +val existingAnnots = wsk.action.get(name, fieldFilter = Some("annotations")).stdout +assert(existingAnnots.startsWith(s"ok: got action $name, displaying field annotations\n")) +removeCLIHeader(existingAnnots).parseJson.convertTo[Set[JsObject]] shouldBe createAnnotations.toJsArray + .convertTo[Set[JsObject]] wsk.action.create(name, file, web = Some("true"), update = true, annotations = updateAnnots) val updatedAnnots = wsk.action.get(name, fieldFilter = Some("annotations")).stdout assert(updatedAnnots.startsWith(s"ok: got action $name, displaying field annotations\n")) -removeCLIHeader(updatedAnnots).parseJson shouldBe JsArray( - JsObject("key" -> JsString("web-export"), "value" -> JsBoolean(true)), - JsObject("key" -> JsString(origKey), "value" -> overwrittenValue), - JsObject("key" -> JsString(updateKey), "value" -> updateValue), - JsObject("key" -> JsString("raw-http"), "value" -> JsBoolean(false)), - JsObject("key" -> JsString("final"), "value" -> JsBoolean(true)), - JsObject("key" -> JsString("exec"), "value" -> JsString("nodejs:6"))) +removeCLIHeader(updatedAnnots).parseJson.convertTo[Set[JsObject]] shouldBe updateAnnotations.toJsArray + .convertTo[Set[JsObject]] }
[incubator-openwhisk-deploy-kube] branch master updated: Adding Node.js v12 to kube deployments (#459)
This is an automated email from the ASF dual-hosted git repository. jamesthomas pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-deploy-kube.git The following commit(s) were added to refs/heads/master by this push: new cbc1ec7 Adding Node.js v12 to kube deployments (#459) cbc1ec7 is described below commit cbc1ec7cac2de4162434e2136f5bc089b67f791e Author: James Thomas AuthorDate: Wed May 8 10:09:46 2019 +0100 Adding Node.js v12 to kube deployments (#459) --- helm/openwhisk/runtimes.json | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/helm/openwhisk/runtimes.json b/helm/openwhisk/runtimes.json index 8a66680..571b7d4 100644 --- a/helm/openwhisk/runtimes.json +++ b/helm/openwhisk/runtimes.json @@ -7,7 +7,7 @@ "image": { "prefix": "openwhisk", "name": "nodejs6action", -"tag": "c173d64" +"tag": "ab224ab" }, "deprecated": false, "attached": { @@ -27,7 +27,7 @@ "image": { "prefix": "openwhisk", "name": "action-nodejs-v8", -"tag": "c173d64" +"tag": "ab224ab" }, "deprecated": false, "attached": { @@ -41,7 +41,21 @@ "image": { "prefix": "openwhisk", "name": "action-nodejs-v10", -"tag": "c173d64" +"tag": "ab224ab" +}, +"deprecated": false, +"attached": { +"attachmentName": "codefile", +"attachmentType": "text/plain" +} +}, +{ +"kind": "nodejs:12", +"default": false, +"image": { +"prefix": "openwhisk", +"name": "action-nodejs-v12", +"tag": "ab224ab" }, "deprecated": false, "attached": {
[incubator-openwhisk-runtime-nodejs] branch master updated: Bump nodejs versions to 6.17.1, 8.16.0, 10.15.3 and 12.1.0. (#127)
This is an automated email from the ASF dual-hosted git repository. jamesthomas pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-nodejs.git The following commit(s) were added to refs/heads/master by this push: new 3bf5268 Bump nodejs versions to 6.17.1, 8.16.0, 10.15.3 and 12.1.0. (#127) 3bf5268 is described below commit 3bf5268f3254befd708210f15a0a4b0914d1e8e4 Author: falkzoll AuthorDate: Wed May 8 11:08:23 2019 +0200 Bump nodejs versions to 6.17.1, 8.16.0, 10.15.3 and 12.1.0. (#127) --- README.md | 8 core/nodejs10Action/CHANGELOG.md | 2 +- core/nodejs10Action/Dockerfile | 2 +- core/nodejs10Action/knative/Dockerfile | 2 +- core/nodejs12Action/Dockerfile | 2 +- core/nodejs6Action/CHANGELOG.md| 2 +- core/nodejs6Action/Dockerfile | 2 +- core/nodejs8Action/CHANGELOG.md| 2 +- core/nodejs8Action/Dockerfile | 2 +- core/nodejs8Action/knative/Dockerfile | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 5a21d5f..caf5ba2 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ This repository contains sources files needed to build the Node.js runtimes for The following Node.js runtime versions (with kind & image labels) are generated by the build system: -- Node.js 6.17.0 (`nodejs:6 ` & `openwhisk/nodejs6action`) -- Node.js 8.15.1 (`nodejs:8` & `openwhisk/action-nodejs-v8`) -- Node.js 10.15.2 (`nodejs:10` & `openwhisk/action-nodejs-v10`) -- Node.js 12.0.0 (`nodejs:12` & `openwhisk/action-nodejs-v12`) +- Node.js 6.17.1 (`nodejs:6 ` & `openwhisk/nodejs6action`) +- Node.js 8.16.0 (`nodejs:8` & `openwhisk/action-nodejs-v8`) +- Node.js 10.15.3 (`nodejs:10` & `openwhisk/action-nodejs-v10`) +- Node.js 12.1.0 (`nodejs:12` & `openwhisk/action-nodejs-v12`) This README documents the build, customisation and testing of these runtime images. diff --git a/core/nodejs10Action/CHANGELOG.md b/core/nodejs10Action/CHANGELOG.md index e6f00e1..9ed2a2c 100644 --- a/core/nodejs10Action/CHANGELOG.md +++ b/core/nodejs10Action/CHANGELOG.md @@ -25,4 +25,4 @@ Changes: - [openwhisk v3.18.0](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs. -Node.js version = [10.15.2](https://nodejs.org/en/blog/release/v10.15.2/) +Node.js version = [10.15.3](https://nodejs.org/en/blog/release/v10.15.3/) diff --git a/core/nodejs10Action/Dockerfile b/core/nodejs10Action/Dockerfile index 2aebe4b..a2dbaf6 100644 --- a/core/nodejs10Action/Dockerfile +++ b/core/nodejs10Action/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # -FROM node:10.15.2-stretch +FROM node:10.15.3-stretch RUN apt-get update && apt-get install -y \ imagemagick \ graphicsmagick \ diff --git a/core/nodejs10Action/knative/Dockerfile b/core/nodejs10Action/knative/Dockerfile index 0ed61de..a519498 100644 --- a/core/nodejs10Action/knative/Dockerfile +++ b/core/nodejs10Action/knative/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # -FROM node:10.15.2-stretch +FROM node:10.15.3-stretch RUN apt-get update && apt-get install -y \ imagemagick \ graphicsmagick \ diff --git a/core/nodejs12Action/Dockerfile b/core/nodejs12Action/Dockerfile index ebbf54f..422bda1 100644 --- a/core/nodejs12Action/Dockerfile +++ b/core/nodejs12Action/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # -FROM node:12.0.0-stretch +FROM node:12.1.0-stretch RUN apt-get update && apt-get install -y \ imagemagick \ graphicsmagick \ diff --git a/core/nodejs6Action/CHANGELOG.md b/core/nodejs6Action/CHANGELOG.md index 6bd2751..905c53c 100644 --- a/core/nodejs6Action/CHANGELOG.md +++ b/core/nodejs6Action/CHANGELOG.md @@ -26,7 +26,7 @@ Changes: - [openwhisk v3.18.0](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs. -Node.js version = [6.17.0](https://nodejs.org/en/blog/release/v6.17.0/) +Node.js version = [6.17.1](https://nodejs.org/en/blog/release/v6.17.1/) ## 1.12.0 Change: Update npm openwhisk package from `3.16.0` to `3.17.0` diff --git a/core/nodejs6Action/Dockerfile b/core/nodejs6Action/Dockerfile index b238acb..d323330 100644 --- a/core/nodejs6Action/Dockerfile +++ b/core/nodejs6Action/Dockerfile @@ -18,7 +18,7 @@ FROM nodejsactionbase # based on https://github.com/nodejs/docker-node -ENV NODE_VERSION 6.17.0 +ENV NODE_VERSION 6.17.1 RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz; \ && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ && rm "node-v$NODE_VERSION-linux-x64.tar.gz" diff --git a/core/nodejs8Action/CHANGELOG.md b/core/nodejs8Action/CHANGELOG.md index f03fcb2..e210c5c 100644 ---