[GitHub] markusthoemmes commented on a change in pull request #2592: Rename CliActivationResponse & CliActivation, and change them from inner classes to classes

2017-08-09 Thread git
markusthoemmes commented on a change in pull request #2592: Rename 
CliActivationResponse & CliActivation, and change them from inner classes to 
classes
URL: 
https://github.com/apache/incubator-openwhisk/pull/2592#discussion_r132219202
 
 

 ##
 File path: tests/src/test/scala/common/WskTestHelpers.scala
 ##
 @@ -31,6 +31,55 @@ import spray.json._
 import java.time.Instant
 
 /**
+ * An arbitrary response of a whisk action. Includes the result as a JsObject 
as the
+ * structure of "result" is not defined.
+ */
+case class activationResponse(result: Option[JsObject], status: String, 
success: Boolean)
+
+object activationResponse extends DefaultJsonProtocol {
+implicit val serdes = jsonFormat3(activationResponse.apply)
+}
+
+/**
+ * Activation record as it is returned by the CLI.
+ */
+ case class activationResult (
+activationId: String,
+logs: Option[List[String]],
+response: activationResponse,
+start: Instant,
+end: Option[Instant], // This field is optional in responses of REST 
calls.
+duration: Option[Long], // This field is optional in responses of REST 
calls.
 
 Review comment:
   That sounds like we should either do the same as the CLI on the API side or 
not make them optional on the API side. To me it seems like this is only valid 
for trigger/rule activations. Should we reflect that in the types?
 

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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] markusthoemmes commented on a change in pull request #2592: Rename CliActivationResponse & CliActivation, and change them from inner classes to classes

2017-08-09 Thread git
markusthoemmes commented on a change in pull request #2592: Rename 
CliActivationResponse & CliActivation, and change them from inner classes to 
classes
URL: 
https://github.com/apache/incubator-openwhisk/pull/2592#discussion_r132115465
 
 

 ##
 File path: tests/src/test/scala/common/WskTestHelpers.scala
 ##
 @@ -258,3 +259,6 @@ trait WskTestHelpers extends Matchers {
 }
 }
 }
+
+
+
 
 Review comment:
   Remove the unnecessary whitespace.
 

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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] markusthoemmes commented on a change in pull request #2592: Rename CliActivationResponse & CliActivation, and change them from inner classes to classes

2017-08-09 Thread git
markusthoemmes commented on a change in pull request #2592: Rename 
CliActivationResponse & CliActivation, and change them from inner classes to 
classes
URL: 
https://github.com/apache/incubator-openwhisk/pull/2592#discussion_r132115340
 
 

 ##
 File path: tests/src/test/scala/common/WskTestHelpers.scala
 ##
 @@ -31,6 +31,55 @@ import spray.json._
 import java.time.Instant
 
 /**
+ * An arbitrary response of a whisk action. Includes the result as a JsObject 
as the
+ * structure of "result" is not defined.
+ */
+case class activationResponse(result: Option[JsObject], status: String, 
success: Boolean)
+
+object activationResponse extends DefaultJsonProtocol {
+implicit val serdes = jsonFormat3(activationResponse.apply)
+}
+
+/**
+ * Activation record as it is returned by the CLI.
+ */
+ case class activationResult (
+activationId: String,
+logs: Option[List[String]],
+response: activationResponse,
+start: Instant,
+end: Option[Instant], // This field is optional in responses of REST 
calls.
+duration: Option[Long], // This field is optional in responses of REST 
calls.
 
 Review comment:
   How come those are optional?
 

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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] markusthoemmes commented on a change in pull request #2592: Rename CliActivationResponse & CliActivation, and change them from inner classes to classes

2017-08-09 Thread git
markusthoemmes commented on a change in pull request #2592: Rename 
CliActivationResponse & CliActivation, and change them from inner classes to 
classes
URL: 
https://github.com/apache/incubator-openwhisk/pull/2592#discussion_r132115394
 
 

 ##
 File path: tests/src/test/scala/common/WskTestHelpers.scala
 ##
 @@ -31,6 +31,55 @@ import spray.json._
 import java.time.Instant
 
 /**
+ * An arbitrary response of a whisk action. Includes the result as a JsObject 
as the
+ * structure of "result" is not defined.
+ */
+case class activationResponse(result: Option[JsObject], status: String, 
success: Boolean)
 
 Review comment:
   Classes start with an uppercase letter.
 

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:
us...@infra.apache.org


With regards,
Apache Git Services