From b843ea9ef42b810fadb27e52a2f0891dae95f736 Mon Sep 17 00:00:00 2001 From: Falk Zoll Date: Thu, 5 Oct 2023 13:07:55 +0200 Subject: [PATCH] Disable nodejs:10. - Also adjust tests to the new open files limit (1000->998 files) introduced with the new github action runner version. --- .github/workflows/run-tests.yml | 17 +++++++++ ansible/files/runtimes-nodeonly.json | 6 ++-- ansible/files/runtimes.json | 36 +++++++++++++------ .../metrics/KamonRecorderTests.scala | 2 +- .../metrics/PrometheusRecorderTests.scala | 2 +- .../standalone/StandaloneOpenWhisk.scala | 4 +-- core/standalone/waitready | 2 +- .../test/DockerContainerFactoryTests.scala | 2 +- .../controller/test/ActionsApiTests.scala | 36 +++++++++---------- .../test/PackageActionsApiTests.scala | 2 +- .../SequenceActionApiMigrationTests.scala | 4 +-- .../core/entity/test/ExecHelpers.scala | 14 ++++---- .../core/entity/test/SchemaTests.scala | 14 ++++---- .../core/entity/test/WhiskEntityTests.scala | 4 +-- .../core/limits/ActionLimitsTests.scala | 5 ++- 15 files changed, 92 insertions(+), 58 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index ae34ff4e456..809be3a345c 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -33,14 +33,31 @@ jobs: - name: Docker Images Cleanup run: | + set -x + docker version df -h docker image ls docker image rm $(docker image ls -q) -f df -h # We use the built in docker of the github action environment. + # Therefore the docker install step below is commented. + # + # With newer github action runners, the ./tools/travis/docker.sh does not + # work anymore. Switched to 'setup a pinned docker version' instead. #- name: befor install -> docker.sh # run: ./tools/travis/docker.sh + #- name: setup a pinned docker version + # run: | + # set -x + # cat /etc/docker/daemon.json || true + # curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + # sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + # sudo apt-get update + # apt list -a docker-ce + # sudo apt-get -y --allow-downgrades install docker-ce=5:20.10.14~3-0~ubuntu-jammy + # docker version + # cat /etc/docker/daemon.json || true - name: befor install -> install python3-pip run: sudo apt-get install -y python3-pip diff --git a/ansible/files/runtimes-nodeonly.json b/ansible/files/runtimes-nodeonly.json index 96f870eba38..1456f199d27 100644 --- a/ansible/files/runtimes-nodeonly.json +++ b/ansible/files/runtimes-nodeonly.json @@ -3,7 +3,7 @@ "This file describes the different languages (aka. managed action runtimes) supported by the system", "as well as blackbox images that support the runtime specification.", "Only actions with runtime families / kinds defined here can be created / read / updated / deleted / invoked.", - "Define a list of runtime families (example: 'nodejs') with at least one kind per family (example: 'nodejs:10').", + "Define a list of runtime families (example: 'nodejs') with at least one kind per family (example: 'nodejs:20').", "Each runtime family needs a default kind (default: true).", "When removing or renaming runtime families or runtime kinds from this file, preexisting actions", "with the affected kinds can no longer be read / updated / deleted / invoked. In order to remove or rename", @@ -16,11 +16,11 @@ "runtimes": { "nodejs": [ { - "kind": "nodejs:10", + "kind": "nodejs:20", "default": true, "image": { "prefix": "openwhisk", - "name": "action-nodejs-v10", + "name": "action-nodejs-v20", "tag": "nightly" }, "deprecated": false, diff --git a/ansible/files/runtimes.json b/ansible/files/runtimes.json index 586ced31259..4ad91dbff0d 100644 --- a/ansible/files/runtimes.json +++ b/ansible/files/runtimes.json @@ -3,7 +3,7 @@ "This file describes the different languages (aka. managed action runtimes) supported by the system", "as well as blackbox images that support the runtime specification.", "Only actions with runtime families / kinds defined here can be created / read / updated / deleted / invoked.", - "Define a list of runtime families (example: 'nodejs') with at least one kind per family (example: 'nodejs:10').", + "Define a list of runtime families (example: 'nodejs') with at least one kind per family (example: 'nodejs:20').", "Each runtime family needs a default kind (default: true).", "When removing or renaming runtime families or runtime kinds from this file, preexisting actions", "with the affected kinds can no longer be read / updated / deleted / invoked. In order to remove or rename", @@ -36,7 +36,7 @@ "name": "action-nodejs-v8", "tag": "nightly" }, - "deprecated": false, + "deprecated": true, "attached": { "attachmentName": "codefile", "attachmentType": "text/plain" @@ -44,23 +44,17 @@ }, { "kind": "nodejs:10", - "default": true, + "default": false, "image": { "prefix": "openwhisk", "name": "action-nodejs-v10", "tag": "nightly" }, - "deprecated": false, + "deprecated": true, "attached": { "attachmentName": "codefile", "attachmentType": "text/plain" - }, - "stemCells": [ - { - "count": 2, - "memory": "256 MB" - } - ] + } }, { "kind": "nodejs:12", @@ -75,6 +69,26 @@ "attachmentName": "codefile", "attachmentType": "text/plain" } + }, + { + "kind": "nodejs:20", + "default": true, + "image": { + "prefix": "openwhisk", + "name": "action-nodejs-v20", + "tag": "nightly" + }, + "deprecated": false, + "attached": { + "attachmentName": "codefile", + "attachmentType": "text/plain" + }, + "stemCells": [ + { + "count": 2, + "memory": "256 MB" + } + ] } ], "python": [ diff --git a/core/monitoring/user-events/src/test/scala/org/apache/openwhisk/core/monitoring/metrics/KamonRecorderTests.scala b/core/monitoring/user-events/src/test/scala/org/apache/openwhisk/core/monitoring/metrics/KamonRecorderTests.scala index 3ef93d510fe..05f10c3288a 100644 --- a/core/monitoring/user-events/src/test/scala/org/apache/openwhisk/core/monitoring/metrics/KamonRecorderTests.scala +++ b/core/monitoring/user-events/src/test/scala/org/apache/openwhisk/core/monitoring/metrics/KamonRecorderTests.scala @@ -63,7 +63,7 @@ class KamonRecorderTests extends KafkaSpecBase with BeforeAndAfterEach with Kamo val namespaceGuest = "guest" val actionWithCustomPackage = "apimgmt/createApi" val actionWithDefaultPackage = "createApi" - val kind = "nodejs:10" + val kind = "nodejs:default" val memory = 256 it should "push user events to kamon" in { diff --git a/core/monitoring/user-events/src/test/scala/org/apache/openwhisk/core/monitoring/metrics/PrometheusRecorderTests.scala b/core/monitoring/user-events/src/test/scala/org/apache/openwhisk/core/monitoring/metrics/PrometheusRecorderTests.scala index 22cafac9bd8..af34569deef 100644 --- a/core/monitoring/user-events/src/test/scala/org/apache/openwhisk/core/monitoring/metrics/PrometheusRecorderTests.scala +++ b/core/monitoring/user-events/src/test/scala/org/apache/openwhisk/core/monitoring/metrics/PrometheusRecorderTests.scala @@ -34,7 +34,7 @@ class PrometheusRecorderTests extends KafkaSpecBase with BeforeAndAfterEach with val namespaceGuest = "guest" val actionWithCustomPackage = "apimgmt/createApiOne" val actionWithDefaultPackage = "createApi" - val kind = "nodejs:10" + val kind = "nodejs:default" val memory = "256" it should "push user events to kamon" in { diff --git a/core/standalone/src/main/scala/org/apache/openwhisk/standalone/StandaloneOpenWhisk.scala b/core/standalone/src/main/scala/org/apache/openwhisk/standalone/StandaloneOpenWhisk.scala index 3fb2abb350f..f0e7bd7e53e 100644 --- a/core/standalone/src/main/scala/org/apache/openwhisk/standalone/StandaloneOpenWhisk.scala +++ b/core/standalone/src/main/scala/org/apache/openwhisk/standalone/StandaloneOpenWhisk.scala @@ -176,11 +176,11 @@ object StandaloneOpenWhisk extends SLF4JLogging { | "runtimes": { | "nodejs": [ | { - | "kind": "nodejs:10", + | "kind": "nodejs:20", | "default": true, | "image": { | "prefix": "openwhisk", - | "name": "action-nodejs-v10", + | "name": "action-nodejs-v20", | "tag": "latest" | }, | "deprecated": false, diff --git a/core/standalone/waitready b/core/standalone/waitready index 643d5374ce4..5349459e5e2 100755 --- a/core/standalone/waitready +++ b/core/standalone/waitready @@ -20,7 +20,7 @@ wsk property set --apihost "http://$(hostname):3233" --auth "$AUTH" until wsk action list 2>/dev/null >/dev/null do sleep 1 ; echo server still not ready - retrying done -wsk action update testme <(echo 'function main(){return {"ready":true}}') --kind nodejs:10 +wsk action update testme <(echo 'function main(){return {"ready":true}}') --kind nodejs:20 until wsk action invoke testme -r 2>/dev/null | grep 'ready' do sleep 1 ; echo server initializing... done diff --git a/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerContainerFactoryTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerContainerFactoryTests.scala index 93ccefa34a4..800352d8ed5 100644 --- a/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerContainerFactoryTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/DockerContainerFactoryTests.scala @@ -68,7 +68,7 @@ class DockerContainerFactoryTests it should "set the docker run args based on ContainerArgsConfig" in { - val image = ExecManifest.runtimesManifest.manifests("nodejs:10").image + val image = ExecManifest.runtimesManifest.manifests("nodejs:20").image implicit val tid = TransactionId.testing val dockerApiStub = mock[DockerApiWithFileAccess] diff --git a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala index bb4614b8af0..41a7799c1b6 100644 --- a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala @@ -279,22 +279,22 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { // String: binary: true, main: jsMain val jsAction1 = WhiskAction(namespace, aname(), jsDefault("RHViZWU=", Some("jsMain"))) val jsAction1Content = - Map("exec" -> Map("kind" -> NODEJS10, "code" -> "RHViZWU=", "main" -> "jsMain")).toJson.asJsObject + Map("exec" -> Map("kind" -> NODEJS20, "code" -> "RHViZWU=", "main" -> "jsMain")).toJson.asJsObject val jsAction1ExecMetaData = js10MetaData(Some("jsMain"), true) // String: binary: false, main: jsMain val jsAction2 = WhiskAction(namespace, aname(), jsDefault("", Some("jsMain"))) - val jsAction2Content = Map("exec" -> Map("kind" -> NODEJS10, "code" -> "", "main" -> "jsMain")).toJson.asJsObject + val jsAction2Content = Map("exec" -> Map("kind" -> NODEJS20, "code" -> "", "main" -> "jsMain")).toJson.asJsObject val jsAction2ExecMetaData = js10MetaData(Some("jsMain"), false) // String: binary: true, no main val jsAction3 = WhiskAction(namespace, aname(), jsDefault("RHViZWU=")) - val jsAction3Content = Map("exec" -> Map("kind" -> NODEJS10, "code" -> "RHViZWU=")).toJson.asJsObject + val jsAction3Content = Map("exec" -> Map("kind" -> NODEJS20, "code" -> "RHViZWU=")).toJson.asJsObject val jsAction3ExecMetaData = js10MetaData(None, true) // String: binary: false, no main val jsAction4 = WhiskAction(namespace, aname(), jsDefault("")) - val jsAction4Content = Map("exec" -> Map("kind" -> NODEJS10, "code" -> "")).toJson.asJsObject + val jsAction4Content = Map("exec" -> Map("kind" -> NODEJS20, "code" -> "")).toJson.asJsObject val jsAction4ExecMetaData = js10MetaData(None, false) // Sequence @@ -578,7 +578,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { action.limits, action.version, action.publish, - action.annotations ++ systemAnnotations(NODEJS10))) + action.annotations ++ systemAnnotations(NODEJS20))) } } @@ -695,7 +695,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { deleteAction(action.docid) status should be(OK) val response = responseAs[WhiskAction] - response.exec.kind should be(NODEJS10) + response.exec.kind should be(NODEJS20) response.parameters shouldBe Parameters() } } @@ -714,7 +714,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { deleteAction(action.docid) status should be(OK) val response = responseAs[WhiskAction] - response.exec.kind should be(NODEJS10) + response.exec.kind should be(NODEJS20) response.parameters should be(Parameters("a", "A")) } } @@ -744,7 +744,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { action.limits, action.version, action.publish, - action.annotations ++ systemAnnotations(NODEJS10))) + action.annotations ++ systemAnnotations(NODEJS20))) } } @@ -785,7 +785,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { action.limits, action.version, action.publish, - action.annotations ++ systemAnnotations(NODEJS10))) + action.annotations ++ systemAnnotations(NODEJS20))) } } @@ -794,7 +794,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { val javaAction = WhiskAction(namespace, aname(), javaDefault("ZHViZWU=", Some("hello")), annotations = Parameters("exec", "java")) val nodeAction = WhiskAction(namespace, aname(), jsDefault("??"), Parameters("x", "b")) - val actions = Seq((javaAction, JAVA_DEFAULT), (nodeAction, NODEJS10)) + val actions = Seq((javaAction, JAVA_DEFAULT), (nodeAction, NODEJS20)) actions.foreach { case (action, kind) => @@ -898,7 +898,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { annotations = Parameters("exec", "java")) val nodeAction = WhiskAction(namespace, aname(), jsDefault(nonInlinedCode(entityStore)), Parameters("x", "b")) val bbAction = WhiskAction(namespace, aname(), bb("bb", nonInlinedCode(entityStore), Some("bbMain"))) - val actions = Seq((javaAction, JAVA_DEFAULT), (nodeAction, NODEJS10), (bbAction, BLACKBOX)) + val actions = Seq((javaAction, JAVA_DEFAULT), (nodeAction, NODEJS20), (bbAction, BLACKBOX)) actions.foreach { case (action, kind) => @@ -1074,7 +1074,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { implicit val tid = transid() val nodeAction = WhiskAction(namespace, aname(), jsDefault(nonInlinedCode(entityStore)), Parameters("x", "b")) val bbAction = WhiskAction(namespace, aname(), bb("bb", nonInlinedCode(entityStore), Some("bbMain"))) - val actions = Seq((nodeAction, NODEJS10), (bbAction, BLACKBOX)) + val actions = Seq((nodeAction, NODEJS20), (bbAction, BLACKBOX)) actions.foreach { case (action, kind) => @@ -1124,7 +1124,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { it should "concurrently get an action with attachment that is not cached" in { implicit val tid = transid() val action = WhiskAction(namespace, aname(), jsDefault(nonInlinedCode(entityStore)), Parameters("x", "b")) - val kind = NODEJS10 + val kind = NODEJS20 val content = WhiskActionPut( Some(action.exec), @@ -1180,7 +1180,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { implicit val tid = transid() val nodeAction = WhiskAction(namespace, aname(), jsDefault(nonInlinedCode(entityStore)), Parameters("x", "b")) val bbAction = WhiskAction(namespace, aname(), bb("bb", nonInlinedCode(entityStore), Some("bbMain"))) - val actions = Seq((nodeAction, NODEJS10), (bbAction, BLACKBOX)) + val actions = Seq((nodeAction, NODEJS20), (bbAction, BLACKBOX)) actions.foreach { case (action, kind) => @@ -1287,7 +1287,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { actionOldSchema.limits, actionOldSchema.version.upPatch, actionOldSchema.publish, - actionOldSchema.annotations ++ systemAnnotations(NODEJS10, create = false))) + actionOldSchema.annotations ++ systemAnnotations(NODEJS20, create = false))) } stream.toString should include regex (expectedPutLog) @@ -1312,7 +1312,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { actionOldSchema.limits, actionOldSchema.version.upPatch, actionOldSchema.publish, - actionOldSchema.annotations ++ systemAnnotations(NODEJS10, create = false))) + actionOldSchema.annotations ++ systemAnnotations(NODEJS20, create = false))) } } @@ -1358,7 +1358,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { content.limits.get.logs.get, content.limits.get.concurrency.get), version = action.version.upPatch, - annotations = action.annotations ++ systemAnnotations(NODEJS10, create = false))) + annotations = action.annotations ++ systemAnnotations(NODEJS20, create = false))) } } @@ -1379,7 +1379,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { action.exec, content.parameters.get, version = action.version.upPatch, - annotations = action.annotations ++ systemAnnotations(NODEJS10, false))) + annotations = action.annotations ++ systemAnnotations(NODEJS20, false))) } } diff --git a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackageActionsApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackageActionsApiTests.scala index 374742e0f3c..8f4a2d75c65 100644 --- a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackageActionsApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackageActionsApiTests.scala @@ -221,7 +221,7 @@ class PackageActionsApiTests extends ControllerTestCommon with WhiskActionsApi { action.limits, action.version, action.publish, - action.annotations ++ systemAnnotations(NODEJS10), + action.annotations ++ systemAnnotations(NODEJS20), updated = response.updated)) } }, diff --git a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/migration/SequenceActionApiMigrationTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/migration/SequenceActionApiMigrationTests.scala index c738b5ad4a7..d216a4eb73e 100644 --- a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/migration/SequenceActionApiMigrationTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/migration/SequenceActionApiMigrationTests.scala @@ -127,7 +127,7 @@ class SequenceActionApiMigrationTests deleteAction(action.docid) status should be(OK) val response = responseAs[WhiskAction] - response.exec.kind should be(NODEJS10) + response.exec.kind should be(NODEJS20) response.parameters should be(Parameters("a", "A")) } }, @@ -155,7 +155,7 @@ class SequenceActionApiMigrationTests deleteAction(action.docid) status should be(OK) val response = responseAs[WhiskAction] - response.exec.kind should be(NODEJS10) + response.exec.kind should be(NODEJS20) response.parameters shouldBe Parameters() } }, diff --git a/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecHelpers.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecHelpers.scala index 6907d6ddd72..9aeeae019ed 100644 --- a/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecHelpers.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecHelpers.scala @@ -35,7 +35,7 @@ trait ExecHelpers extends Matchers with WskActorSystem with StreamLogging { private val config = new WhiskConfig(ExecManifest.requiredProperties) ExecManifest.initialize(config) should be a 'success - protected val NODEJS10 = "nodejs:10" + protected val NODEJS20 = "nodejs:20" protected val SWIFT4 = "swift:4.2" protected val BLACKBOX = "blackbox" protected val JAVA_DEFAULT = "java:8" @@ -48,8 +48,8 @@ trait ExecHelpers extends Matchers with WskActorSystem with StreamLogging { protected def js10Old(code: String, main: Option[String] = None) = { CodeExecAsString( RuntimeManifest( - NODEJS10, - imageName(NODEJS10), + NODEJS20, + imageName(NODEJS20), default = Some(true), deprecated = Some(false), stemCells = Some(List(StemCell(2, 256.MB)))), @@ -59,7 +59,7 @@ trait ExecHelpers extends Matchers with WskActorSystem with StreamLogging { protected def js10(code: String, main: Option[String] = None) = { val attachment = attFmt[String].read(code.trim.toJson) - val manifest = ExecManifest.runtimesManifest.resolveDefaultRuntime(NODEJS10).get + val manifest = ExecManifest.runtimesManifest.resolveDefaultRuntime(NODEJS20).get CodeExecAsAttachment(manifest, attachment, main.map(_.trim), Exec.isBinaryCode(code)) } @@ -71,8 +71,8 @@ trait ExecHelpers extends Matchers with WskActorSystem with StreamLogging { protected def js10MetaDataOld(main: Option[String] = None, binary: Boolean) = { CodeExecMetaDataAsString( RuntimeManifest( - NODEJS10, - imageName(NODEJS10), + NODEJS20, + imageName(NODEJS20), default = Some(true), deprecated = Some(false), stemCells = Some(List(StemCell(2, 256.MB)))), @@ -81,7 +81,7 @@ trait ExecHelpers extends Matchers with WskActorSystem with StreamLogging { } protected def js10MetaData(main: Option[String] = None, binary: Boolean) = { - val manifest = ExecManifest.runtimesManifest.resolveDefaultRuntime(NODEJS10).get + val manifest = ExecManifest.runtimesManifest.resolveDefaultRuntime(NODEJS20).get CodeExecMetaDataAsAttachment(manifest, binary, main.map(_.trim)) } diff --git a/tests/src/test/scala/org/apache/openwhisk/core/entity/test/SchemaTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/SchemaTests.scala index ee79fdb78a2..5d398406148 100644 --- a/tests/src/test/scala/org/apache/openwhisk/core/entity/test/SchemaTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/SchemaTests.scala @@ -500,11 +500,11 @@ class SchemaTests extends FlatSpec with BeforeAndAfter with ExecHelpers with Mat val b64Body = """ZnVuY3Rpb24gbWFpbihhcmdzKSB7IHJldHVybiBhcmdzOyB9Cg==""" val json = Seq[JsObject]( - JsObject("kind" -> "nodejs:10".toJson, "code" -> "js1".toJson, "binary" -> false.toJson), - JsObject("kind" -> "nodejs:10".toJson, "code" -> "js2".toJson, "binary" -> false.toJson, "foo" -> "bar".toJson), + JsObject("kind" -> "nodejs:20".toJson, "code" -> "js1".toJson, "binary" -> false.toJson), + JsObject("kind" -> "nodejs:20".toJson, "code" -> "js2".toJson, "binary" -> false.toJson, "foo" -> "bar".toJson), JsObject("kind" -> "swift:4.2".toJson, "code" -> "swift1".toJson, "binary" -> false.toJson), JsObject("kind" -> "swift:4.2".toJson, "code" -> b64Body.toJson, "binary" -> true.toJson), - JsObject("kind" -> "nodejs:10".toJson, "code" -> b64Body.toJson, "binary" -> true.toJson)) + JsObject("kind" -> "nodejs:20".toJson, "code" -> b64Body.toJson, "binary" -> true.toJson)) val execs = json.map { e => Exec.serdes.read(e) @@ -637,8 +637,8 @@ class SchemaTests extends FlatSpec with BeforeAndAfter with ExecHelpers with Mat JsObject.empty, JsNull, JsObject("init" -> "zipfile".toJson), - JsObject("kind" -> "nodejs:10".toJson, "code" -> JsNumber(42)), - JsObject("kind" -> "nodejs:10".toJson, "init" -> "zipfile".toJson), + JsObject("kind" -> "nodejs:20".toJson, "code" -> JsNumber(42)), + JsObject("kind" -> "nodejs:20".toJson, "init" -> "zipfile".toJson), JsObject("kind" -> "turbopascal".toJson, "code" -> "BEGIN1".toJson), JsObject("kind" -> "blackbox".toJson, "code" -> "js".toJson), JsObject("kind" -> "swift".toJson, "swiftcode" -> "swift".toJson)) @@ -666,8 +666,8 @@ class SchemaTests extends FlatSpec with BeforeAndAfter with ExecHelpers with Mat it should "serialize to json" in { val execs = Seq(bb("container"), jsDefault("js"), jsDefault("js"), swift("swift")).map { _.asJson } assert(execs(0) == JsObject("kind" -> "blackbox".toJson, "image" -> "container".toJson, "binary" -> false.toJson)) - assert(execs(1) == JsObject("kind" -> "nodejs:10".toJson, "code" -> "js".toJson, "binary" -> false.toJson)) - assert(execs(2) == JsObject("kind" -> "nodejs:10".toJson, "code" -> "js".toJson, "binary" -> false.toJson)) + assert(execs(1) == JsObject("kind" -> "nodejs:20".toJson, "code" -> "js".toJson, "binary" -> false.toJson)) + assert(execs(2) == JsObject("kind" -> "nodejs:20".toJson, "code" -> "js".toJson, "binary" -> false.toJson)) assert(execs(3) == JsObject("kind" -> "swift:4.2".toJson, "code" -> "swift".toJson, "binary" -> false.toJson)) } diff --git a/tests/src/test/scala/org/apache/openwhisk/core/entity/test/WhiskEntityTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/WhiskEntityTests.scala index 3b10d766333..25bae832c62 100644 --- a/tests/src/test/scala/org/apache/openwhisk/core/entity/test/WhiskEntityTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/WhiskEntityTests.scala @@ -177,7 +177,7 @@ class WhiskEntityTests extends FlatSpec with ExecHelpers with Matchers { | "version": "0.0.2", | "entityType": "action", | "exec": { - | "kind": "nodejs:10", + | "kind": "nodejs:20", | "code": "foo", | "binary": false | }, @@ -205,7 +205,7 @@ class WhiskEntityTests extends FlatSpec with ExecHelpers with Matchers { | "annotations": [], | "version": "0.0.1", | "exec": { - | "kind": "nodejs:10", + | "kind": "nodejs:20", | "code": "foo", | "binary": false | }, diff --git a/tests/src/test/scala/org/apache/openwhisk/core/limits/ActionLimitsTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/limits/ActionLimitsTests.scala index 91a9661b6d5..11a8fcfd128 100644 --- a/tests/src/test/scala/org/apache/openwhisk/core/limits/ActionLimitsTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/limits/ActionLimitsTests.scala @@ -75,7 +75,10 @@ class ActionLimitsTests extends TestHelpers with WskTestHelpers with WskActorSys // * With the introduction of Node.js 10, this was changed from "openFileLimit - 15" to // "openFileLimit - 20". // * With Docker 18.09.3, we observed test failures and changed to "openFileLimit - 24". - val minExpectedOpenFiles = openFileLimit - 24 + // * With github action runner ubuntu-22.04 Version 20231001.1.0 + // (https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20231001.1) + // the maximum number of open files changed to "openFileLimit - 26". + val minExpectedOpenFiles = openFileLimit - 26 val retriesOnTestFailures = 5 val waitBeforeRetry = 1.second