ningyougang commented on code in PR #5290: URL: https://github.com/apache/openwhisk/pull/5290#discussion_r929706322
########## core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerProxy.scala: ########## @@ -1082,25 +1082,28 @@ object ContainerProxy { * @param initArgs set of parameters to treat as initialization arguments * @return A partition of the arguments into an environment variables map and the JsObject argument to the action */ - def partitionArguments(content: Option[JsObject], initArgs: Set[String]): (Map[String, JsValue], JsObject) = { + def partitionArguments(content: Option[JsValue], initArgs: Set[String]): (Map[String, JsValue], JsValue) = { content match { - case None => (Map.empty, JsObject.empty) - case Some(js) if initArgs.isEmpty => (Map.empty, js) - case Some(js) => - val (env, args) = js.fields.partition(k => initArgs.contains(k._1)) + case None => (Map.empty, JsObject.empty) + case Some(JsObject(fields)) if initArgs.isEmpty => (Map.empty, JsObject(fields)) + case Some(JsObject(fields)) => + val (env, args) = JsObject(fields).fields.partition(k => initArgs.contains(k._1)) (env, JsObject(args)) + case Some(JsArray(elements)) => (Map.empty, JsArray(elements)) Review Comment: No, would report error, but there has a optimize point here. Change `JsObject(fields).fields` to `fields` ########## tests/src/test/scala/system/basic/WskSequenceTests.scala: ########## @@ -541,6 +541,31 @@ class WskSequenceTests extends TestHelpers with WskTestHelpers with StreamLoggin } } + it should "invoke a sequence which support array result" in withAssetCleaner(wskprops) { (wp, assetHelper) => Review Comment: Updated accordingly -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org