rabbah commented on a change in pull request #2218: Port Controller from Spray
to Akka
URL:
https://github.com/apache/incubator-openwhisk/pull/2218#discussion_r132842354
##########
File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
##########
@@ -173,16 +173,20 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
Path.SingleSlash +
rule.action.name.asString
}
}.toString
-
val actionUrl = Path("/api/v1") /
"namespaces" / actionNamespace / "actions"
+ val request = HttpRequest(
+ method = POST,
+ uri = url.withPath(actionUrl +
actionPath),
+ headers =
List(Authorization(BasicHttpCredentials(user.authkey.uuid.asString,
user.authkey.key.asString))),
+ entity =
HttpEntity(MediaTypes.`application/json`,
args.getOrElse(JsObject()).compactPrint))
- pipeline(Post(url.withPath(actionUrl +
actionPath), args)) onComplete {
- case Success(o) =>
- logging.info(this, s"successfully
invoked ${rule.action} -> ${o.fields("activationId")}")
- case Failure(usr:
UnsuccessfulResponseException) if usr.response.status == StatusCodes.NotFound =>
+ Http().singleRequest(request).map {
+ case HttpResponse(StatusCodes.OK,
headers, entity, _) =>
+ logging.info(this, s"successfully
invoked ${rule.action} -> ")
Review comment:
looks like we missed this - was previously logging the activation id.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services