openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markusthoem...@apache.org
Subject [openwhisk] branch master updated: update to akka-http 10.1.11 (#4759)
Date Tue, 03 Dec 2019 07:34:36 GMT
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/openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 6126a94  update to akka-http 10.1.11 (#4759)
6126a94 is described below

commit 6126a9478f67044a208fbd2cedc0c0274d3ed4c3
Author: tysonnorris <tnorris@adobe.com>
AuthorDate: Mon Dec 2 23:34:24 2019 -0800

    update to akka-http 10.1.11 (#4759)
---
 .../scala/org/apache/openwhisk/core/controller/Actions.scala   |  2 +-
 .../scala/org/apache/openwhisk/core/controller/Entities.scala  |  4 ++--
 settings.gradle                                                |  2 +-
 .../openwhisk/core/controller/test/ActionsApiTests.scala       | 10 +++++-----
 .../openwhisk/core/controller/test/PackagesApiTests.scala      |  6 +++---
 .../apache/openwhisk/core/controller/test/RulesApiTests.scala  |  4 ++--
 .../openwhisk/core/controller/test/TriggersApiTests.scala      |  8 ++++----
 .../openwhisk/core/controller/test/WebActionsApiTests.scala    |  4 ++--
 .../org/apache/openwhisk/core/limits/ActionLimitsTests.scala   |  4 ++--
 9 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala
b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala
index 3cbbb6c..bc044f4 100644
--- a/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala
+++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala
@@ -304,7 +304,7 @@ trait WhiskActionsApi extends WhiskCollectionAPI with PostActionActivation
with
         }
       case Failure(t: RecordTooLargeException) =>
         logging.debug(this, s"[POST] action payload was too large")
-        terminate(RequestEntityTooLarge)
+        terminate(PayloadTooLarge)
       case Failure(RejectRequest(code, message)) =>
         logging.debug(this, s"[POST] action rejected with code $code: $message")
         terminate(code, message)
diff --git a/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Entities.scala
b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Entities.scala
index 6370e2e..5e70f71 100644
--- a/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Entities.scala
+++ b/core/controller/src/main/scala/org/apache/openwhisk/core/controller/Entities.scala
@@ -21,7 +21,7 @@ import scala.concurrent.Future
 import scala.language.postfixOps
 import scala.util.Try
 import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
-import akka.http.scaladsl.model.StatusCodes.RequestEntityTooLarge
+import akka.http.scaladsl.model.StatusCodes.PayloadTooLarge
 import akka.http.scaladsl.model.headers.RawHeader
 import akka.http.scaladsl.server.Directive0
 import akka.http.scaladsl.server.Directives
@@ -46,7 +46,7 @@ protected[controller] trait ValidateRequestSize extends Directives {
     new Directive0 {
       override def tapply(f: Unit => Route) = {
         check map {
-          case e: SizeError => terminate(RequestEntityTooLarge, Messages.entityTooBig(e))
+          case e: SizeError => terminate(PayloadTooLarge, Messages.entityTooBig(e))
         } getOrElse f(None)
       }
     }
diff --git a/settings.gradle b/settings.gradle
index a0c8e2d..ba8b4db 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -47,7 +47,7 @@ gradle.ext.scalafmt = [
 
 gradle.ext.akka = [version : '2.5.26']
 gradle.ext.akka_kafka = [version : '1.1.0']
-gradle.ext.akka_http = [version : '10.1.10']
+gradle.ext.akka_http = [version : '10.1.11']
 
 gradle.ext.curator = [version : '4.0.0']
 gradle.ext.kube_client = [version: '4.4.2']
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 b46a3a4..9a6075e 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
@@ -478,7 +478,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi
{
     val exec: Exec = jsDefault(code)
     val content = JsObject("exec" -> exec.toJson)
     Put(s"$collectionPath/${aname()}", content) ~> Route.seal(routes(creds)) ~> check
{
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(SizeError(WhiskAction.execFieldName, exec.size, Exec.sizeLimit))
       }
@@ -507,7 +507,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi
{
     val content = JsObject("exec" -> exec.toJson)
     put(entityStore, action)
     Put(s"$collectionPath/${action.name}?overwrite=true", content) ~> Route.seal(routes(creds))
~> check {
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(SizeError(WhiskAction.execFieldName, exec.size, Exec.sizeLimit))
       }
@@ -523,7 +523,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi
{
     } reduce (_ ++ _)
     val content = s"""{"exec":{"kind":"nodejs:default","code":"??"},"parameters":$parameters}""".stripMargin
     Put(s"$collectionPath/${aname()}", content.parseJson.asJsObject) ~> Route.seal(routes(creds))
~> check {
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(SizeError(WhiskEntity.paramsFieldName, parameters.size, Parameters.sizeLimit))
       }
@@ -539,7 +539,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi
{
     } reduce (_ ++ _)
     val content = s"""{"exec":{"kind":"nodejs:default","code":"??"},"annotations":$annotations}""".stripMargin
     Put(s"$collectionPath/${aname()}", content.parseJson.asJsObject) ~> Route.seal(routes(creds))
~> check {
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(SizeError(WhiskEntity.annotationsFieldName, annotations.size,
Parameters.sizeLimit))
       }
@@ -551,7 +551,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi
{
     val code = "a" * (allowedActivationEntitySize.toInt + 1)
     val content = s"""{"a":"$code"}""".stripMargin
     Post(s"$collectionPath/${aname()}", content.parseJson.asJsObject) ~> Route.seal(routes(creds))
~> check {
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(
           SizeError(fieldDescriptionForSizeError, (content.length).B, allowedActivationEntitySize.B))
diff --git a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackagesApiTests.scala
b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackagesApiTests.scala
index 5ea915d..36ff016 100644
--- a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackagesApiTests.scala
+++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackagesApiTests.scala
@@ -591,7 +591,7 @@ class PackagesApiTests extends ControllerTestCommon with WhiskPackagesApi
{
     } reduce (_ ++ _)
     val content = s"""{"annotations":$annotations}""".parseJson.asJsObject
     Put(s"$collectionPath/${aname()}", content) ~> Route.seal(routes(creds)) ~> check
{
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(SizeError(WhiskEntity.annotationsFieldName, annotations.size,
Parameters.sizeLimit))
       }
@@ -607,7 +607,7 @@ class PackagesApiTests extends ControllerTestCommon with WhiskPackagesApi
{
     } reduce (_ ++ _)
     val content = s"""{"parameters":$parameters}""".parseJson.asJsObject
     Put(s"$collectionPath/${aname()}", content) ~> Route.seal(routes(creds)) ~> check
{
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(SizeError(WhiskEntity.paramsFieldName, parameters.size, Parameters.sizeLimit))
       }
@@ -625,7 +625,7 @@ class PackagesApiTests extends ControllerTestCommon with WhiskPackagesApi
{
     val content = s"""{"parameters":$parameters}""".parseJson.asJsObject
     put(entityStore, provider)
     Put(s"$collectionPath/${aname()}?overwrite=true", content) ~> Route.seal(routes(creds))
~> check {
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(SizeError(WhiskEntity.paramsFieldName, parameters.size, Parameters.sizeLimit))
       }
diff --git a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/RulesApiTests.scala
b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/RulesApiTests.scala
index 9aee5da..1505305 100644
--- a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/RulesApiTests.scala
+++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/RulesApiTests.scala
@@ -526,7 +526,7 @@ class RulesApiTests extends ControllerTestCommon with WhiskRulesApi {
       val t = get(entityStore, trigger.docid, WhiskTrigger)
       deleteTrigger(t.docid)
 
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(SizeError(WhiskEntity.annotationsFieldName, annotations.size,
Parameters.sizeLimit))
       }
@@ -556,7 +556,7 @@ class RulesApiTests extends ControllerTestCommon with WhiskRulesApi {
       val t = get(entityStore, trigger.docid, WhiskTrigger)
       deleteTrigger(t.docid)
 
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(SizeError(WhiskEntity.annotationsFieldName, annotations.size,
Parameters.sizeLimit))
       }
diff --git a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/TriggersApiTests.scala
b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/TriggersApiTests.scala
index d87751b..58b2fd4 100644
--- a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/TriggersApiTests.scala
+++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/TriggersApiTests.scala
@@ -272,7 +272,7 @@ class TriggersApiTests extends ControllerTestCommon with WhiskTriggersApi
{
     val code = "a" * (allowedActivationEntitySize.toInt + 1)
     val content = s"""{"a":"$code"}""".stripMargin
     Post(s"$collectionPath/${aname()}", content.parseJson.asJsObject) ~> Route.seal(routes(creds))
~> check {
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(
           SizeError(fieldDescriptionForSizeError, (content.length).B, allowedActivationEntitySize.B))
@@ -289,7 +289,7 @@ class TriggersApiTests extends ControllerTestCommon with WhiskTriggersApi
{
     } reduce (_ ++ _)
     val content = s"""{"parameters":$parameters}""".parseJson.asJsObject
     Put(s"$collectionPath/${aname()}", content) ~> Route.seal(routes(creds)) ~> check
{
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(SizeError(WhiskEntity.paramsFieldName, parameters.size, Parameters.sizeLimit))
       }
@@ -305,7 +305,7 @@ class TriggersApiTests extends ControllerTestCommon with WhiskTriggersApi
{
     } reduce (_ ++ _)
     val content = s"""{"annotations":$annotations}""".parseJson.asJsObject
     Put(s"$collectionPath/${aname()}", content) ~> Route.seal(routes(creds)) ~> check
{
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(SizeError(WhiskEntity.annotationsFieldName, annotations.size,
Parameters.sizeLimit))
       }
@@ -323,7 +323,7 @@ class TriggersApiTests extends ControllerTestCommon with WhiskTriggersApi
{
     val content = s"""{"parameters":$parameters}""".parseJson.asJsObject
     put(entityStore, trigger)
     Put(s"$collectionPath/${trigger.name}?overwrite=true", content) ~> Route.seal(routes(creds))
~> check {
-      status should be(RequestEntityTooLarge)
+      status should be(PayloadTooLarge)
       responseAs[String] should include {
         Messages.entityTooBig(SizeError(WhiskEntity.paramsFieldName, parameters.size, Parameters.sizeLimit))
       }
diff --git a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/WebActionsApiTests.scala
b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/WebActionsApiTests.scala
index c91d27c..fcbd460 100644
--- a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/WebActionsApiTests.scala
+++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/WebActionsApiTests.scala
@@ -1497,7 +1497,7 @@ trait WebActionsApiBaseTests extends ControllerTestCommon with BeforeAndAfterEac
 
         val content = s"""{"a":"$largeEntity"}"""
         Post(s"$testRoutePath/$path", content.parseJson.asJsObject) ~> Route.seal(routes(creds))
~> check {
-          status should be(RequestEntityTooLarge)
+          status should be(PayloadTooLarge)
           val expectedErrorMsg = Messages.entityTooBig(
             SizeError(fieldDescriptionForSizeError, (largeEntity.length + 8).B, allowedActivationEntitySize.B))
           confirmErrorWithTid(responseAs[JsObject], Some(expectedErrorMsg))
@@ -1505,7 +1505,7 @@ trait WebActionsApiBaseTests extends ControllerTestCommon with BeforeAndAfterEac
 
         val form = FormData(Map("a" -> largeEntity))
         Post(s"$testRoutePath/$path", form) ~> Route.seal(routes(creds)) ~> check {
-          status should be(RequestEntityTooLarge)
+          status should be(PayloadTooLarge)
           val expectedErrorMsg = Messages.entityTooBig(
             SizeError(fieldDescriptionForSizeError, (largeEntity.length + 2).B, allowedActivationEntitySize.B))
           confirmErrorWithTid(responseAs[JsObject], Some(expectedErrorMsg))
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 e5d7286..b75fb7b 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
@@ -17,7 +17,7 @@
 
 package org.apache.openwhisk.core.limits
 
-import akka.http.scaladsl.model.StatusCodes.RequestEntityTooLarge
+import akka.http.scaladsl.model.StatusCodes.PayloadTooLarge
 import akka.http.scaladsl.model.StatusCodes.BadGateway
 import java.io.File
 import java.io.PrintWriter
@@ -366,7 +366,7 @@ class ActionLimitsTests extends TestHelpers with WskTestHelpers with WskActorSys
     pw.close
 
     assetHelper.withCleaner(wsk.action, name, confirmDelete = false) { (action, _) =>
-      action.create(name, Some(actionCode.getAbsolutePath), expectedExitCode = RequestEntityTooLarge.intValue)
+      action.create(name, Some(actionCode.getAbsolutePath), expectedExitCode = PayloadTooLarge.intValue)
     }
 
     actionCode.delete


Mime
View raw message