[GitHub] dgrove-oss commented on issue #2828: option to use docker pause/unpause instead of docker-runc pause/unpause

2017-10-13 Thread git
dgrove-oss commented on issue #2828: option to use docker pause/unpause instead 
of docker-runc pause/unpause
URL: 
https://github.com/apache/incubator-openwhisk/pull/2828#issuecomment-336512882
 
 
   PG2 2167 - completed successfully
 

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] dgrove-oss commented on issue #68: Update counchdb image init script to avoid python package installatio?

2017-10-13 Thread git
dgrove-oss commented on issue #68: Update counchdb image init script to avoid 
python package installatio?
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/68#issuecomment-336559299
 
 
   This is one of the images that has kube-specific changes to it (motivating 
my email to the dev list a little while ago).  Can we augment the jenkins job 
to also publish kube-specific images?
 

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] dubeejw commented on a change in pull request #2847: Treat action code as attachments for created/updated actions

2017-10-13 Thread git
dubeejw commented on a change in pull request #2847: Treat action code as 
attachments for created/updated actions
URL: 
https://github.com/apache/incubator-openwhisk/pull/2847#discussion_r144643287
 
 

 ##
 File path: common/scala/src/main/scala/whisk/core/entity/Exec.scala
 ##
 @@ -241,21 +241,33 @@ protected[core] object Exec extends ArgNormalizer[Exec] 
with DefaultJsonProtocol
 
   manifest.attached
 .map { a =>
-  val jar: Attachment[String] = {
-// java actions once stored the attachment in "jar" instead of 
"code"
-obj.fields.get("code").orElse(obj.fields.get("jar"))
+  // java actions once stored the attachment in "jar" instead of 
"code"
+  val code = obj.fields.get("code").orElse(obj.fields.get("jar"))
+
+  val binary: Boolean = code match {
+case Some(JsString(c)) => isBinaryCode(c)
+case _ =>
+  obj.fields.get("binary") match {
+case Some(JsBoolean(b)) => b
+case _  => false
+  }
+  }
+
+  val attachment: Attachment[String] = {
+code
   } map {
 attFmt[String].read(_)
   } getOrElse {
-throw new DeserializationException(
-  s"'code' must be a valid base64 string in 'exec' for '$kind' 
actions")
+throw new DeserializationException(s"'code' must be a string 
defined in 'exec' for '$kind' actions")
 
 Review comment:
   Not sure we will ever get here. Since I think the function in map will work 
even for an empty string.
 

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] dubeejw commented on a change in pull request #2847: Treat action code as attachments for created/updated actions

2017-10-13 Thread git
dubeejw commented on a change in pull request #2847: Treat action code as 
attachments for created/updated actions
URL: 
https://github.com/apache/incubator-openwhisk/pull/2847#discussion_r144643287
 
 

 ##
 File path: common/scala/src/main/scala/whisk/core/entity/Exec.scala
 ##
 @@ -241,21 +241,33 @@ protected[core] object Exec extends ArgNormalizer[Exec] 
with DefaultJsonProtocol
 
   manifest.attached
 .map { a =>
-  val jar: Attachment[String] = {
-// java actions once stored the attachment in "jar" instead of 
"code"
-obj.fields.get("code").orElse(obj.fields.get("jar"))
+  // java actions once stored the attachment in "jar" instead of 
"code"
+  val code = obj.fields.get("code").orElse(obj.fields.get("jar"))
+
+  val binary: Boolean = code match {
+case Some(JsString(c)) => isBinaryCode(c)
+case _ =>
+  obj.fields.get("binary") match {
+case Some(JsBoolean(b)) => b
+case _  => false
+  }
+  }
+
+  val attachment: Attachment[String] = {
+code
   } map {
 attFmt[String].read(_)
   } getOrElse {
-throw new DeserializationException(
-  s"'code' must be a valid base64 string in 'exec' for '$kind' 
actions")
+throw new DeserializationException(s"'code' must be a string 
defined in 'exec' for '$kind' actions")
 
 Review comment:
   Not sure we will ever get here.
 

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] dubeejw commented on a change in pull request #2855: Cache database attachments

2017-10-13 Thread git
dubeejw commented on a change in pull request #2855: Cache database attachments
URL: 
https://github.com/apache/incubator-openwhisk/pull/2855#discussion_r144633130
 
 

 ##
 File path: common/scala/src/main/scala/whisk/core/entity/WhiskAction.scala
 ##
 @@ -275,12 +278,10 @@ object WhiskAction extends DocumentFactory[WhiskAction] 
with WhiskEntityQueries[
   val boas = new ByteArrayOutputStream()
   val b64s = Base64.getEncoder().wrap(boas)
 
-  getAttachment[A](db, action.docinfo, attachmentName, b64s).map { _ =>
+  getAttachment[A](db, action, action.docinfo, attachmentName, b64s, 
Some { a: WhiskAction =>
 b64s.close()
-val newAction = action.copy(exec = exec.inline(boas.toByteArray))
-newAction.revision(action.rev)
-newAction
-  }
+a.copy(exec = exec.inline(boas.toByteArray))
 
 Review comment:
   Need to update revision?
 

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] dubeejw commented on a change in pull request #2855: Cache database attachments

2017-10-13 Thread git
dubeejw commented on a change in pull request #2855: Cache database attachments
URL: 
https://github.com/apache/incubator-openwhisk/pull/2855#discussion_r144642462
 
 

 ##
 File path: 
common/scala/src/main/scala/whisk/core/database/DocumentFactory.scala
 ##
 @@ -245,26 +261,35 @@ trait DocumentFactory[W] extends 
MultipleReadersSingleWriterCache[W, DocInfo] {
 }
   }
 
-  def getAttachment[Wsuper >: W](db: ArtifactStore[Wsuper],
- doc: DocInfo,
- attachmentName: String,
- outputStream: OutputStream)(implicit transid: 
TransactionId): Future[Unit] = {
+  def getAttachment[Wsuper >: W](
+db: ArtifactStore[Wsuper],
+entity: W,
+doc: DocInfo,
+attachmentName: String,
+outputStream: OutputStream,
+postProcess: Option[PostProcessEntity[W]] = None)(implicit transid: 
TransactionId, mw: Manifest[W]): Future[W] = {
 
 implicit val ec = db.executionContext
+implicit val notifier: Option[CacheChangeNotification] = None
 
 Review comment:
   Cache invalidation callback should probably be assigned to the actual 
callback here.
 

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] houshengbo opened a new pull request #606: Add the dependency back to validate packages

2017-10-13 Thread git
houshengbo opened a new pull request #606: Add the dependency back to validate 
packages
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/606
 
 
   
 

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] rabbah commented on issue #68: Update counchdb image init script to avoid python package installatio?

2017-10-13 Thread git
rabbah commented on issue #68: Update counchdb image init script to avoid 
python package installatio?
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/68#issuecomment-336540320
 
 
   @csantanapr has an apache jenkins job that is continuously publishing the 
core images to dockerhub. https://hub.docker.com/u/openwhisk/
 

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] dubeejw commented on a change in pull request #2855: Cache database attachments

2017-10-13 Thread git
dubeejw commented on a change in pull request #2855: Cache database attachments
URL: 
https://github.com/apache/incubator-openwhisk/pull/2855#discussion_r144633130
 
 

 ##
 File path: common/scala/src/main/scala/whisk/core/entity/WhiskAction.scala
 ##
 @@ -275,12 +278,10 @@ object WhiskAction extends DocumentFactory[WhiskAction] 
with WhiskEntityQueries[
   val boas = new ByteArrayOutputStream()
   val b64s = Base64.getEncoder().wrap(boas)
 
-  getAttachment[A](db, action.docinfo, attachmentName, b64s).map { _ =>
+  getAttachment[A](db, action, action.docinfo, attachmentName, b64s, 
Some { a: WhiskAction =>
 b64s.close()
-val newAction = action.copy(exec = exec.inline(boas.toByteArray))
-newAction.revision(action.rev)
-newAction
-  }
+a.copy(exec = exec.inline(boas.toByteArray))
 
 Review comment:
   Need to update revision?
 

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] dgrove-oss commented on issue #68: Update counchdb image init script to avoid python package installatio?

2017-10-13 Thread git
dgrove-oss commented on issue #68: Update counchdb image init script to avoid 
python package installatio?
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/68#issuecomment-336538234
 
 
   Would the general problem be helped if we were routinely rebuilding & 
publishing the images?
 

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] dubeejw opened a new pull request #2855: Cache database attachments

2017-10-13 Thread git
dubeejw opened a new pull request #2855: Cache database attachments
URL: https://github.com/apache/incubator-openwhisk/pull/2855
 
 
   Caches attachments with corresponding actions when an action is 
created/updated. The attachment is also cached on a fetch if it is not already 
cached.
   
   Depends on https://github.com/apache/incubator-openwhisk/pull/2832
 

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] pritidesai opened a new issue #605: How do we prevent Concurrent Access to same OpenWhisk entity?

2017-10-13 Thread git
pritidesai opened a new issue #605: How do we prevent Concurrent Access to same 
OpenWhisk entity?
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/605
 
 
   We have seen couple of concurrency issues with deployment/undeployment when
   
   - triggers and rules
   
   When we try to run `wskdeploy` to with these two manifest files in 
deployment mode, deployment fails with `Error: Error: 
/Users/pritidesai/Documents/goworkspace/src/github.com/apache/incubator-openwhisk-wskdeploy/deployers/servicedeployer.go
 [913]: OpenWhisk Client Error => The requested resource does not exist. 
(code 23582280) Error code: 148.`
   
   package1-manifest.yaml
   
   ```
   packages:
 pacakge1:
 actions:
   helloworld:
 function: actions/helloworld.js
 runtime: nodejs:6
 triggers:
   locationupdate:
 rules:
   myRule:
 trigger: locationupdate
 rule: myRule
   ``` 
   
   package2-manifest.yaml
   
   ```
   packages:
 pacakge2:
 actions:
   helloworld:
 function: actions/helloworld.js
 runtime: nodejs:6
 triggers:
   locationupdate:
 rules:
   myRule:
 trigger: locationupdate
 rule: myRule
   ``` 
   
   - dependency
   
   Its a valid use case of having dependency on same package from different 
manifest files but this leads to the same issue of concurrency and sometimes 
fails with the same error 148 and sometimes fails with `"Error: 
/Users/pritidesai/Documents/goworkspace/src/github.com/apache/incubator-openwhisk-wskdeploy/deployers/servicedeployer.go
 [666]: OpenWhisk Client Error => Sequence component does not exist. (code 
23582010) Error code: 144.\n"})` or `Deployment of dependency myhelloworlds did 
not complete sucessfully. Run `wskdeploy undeploy` to remove partially deployed 
assets.\nError: 
/Users/pritidesai/Documents/goworkspace/src/github.com/apache/incubator-openwhisk-wskdeploy/deployers/servicedeployer.go
 [666]: OpenWhisk Client Error => Concurrent modification to resource 
detected. (code 23549814) Error code: 153.\n"})`
   
   package1-manifest.yaml
   
   ```
   packages:
 package1:
 dependencies:
 myhelloworlds:
   location: 
github.com/apache/incubator-openwhisk-test/packages/helloworlds
 actions:
   hello:
 function: actions/helloworld.js
 runtime: nodejs:6
  sequences:
 helloworldnodejs-series:
   actions: hello, myhelloworlds/hello-js
   ```
   
   package2-manifest.yaml
   
   ```
   packages:
 package2:
 dependencies:
 myhelloworlds:
   location: 
github.com/apache/incubator-openwhisk-test/packages/helloworlds
 actions:
   hello:
 function: actions/helloworld.js
 runtime: nodejs:6
  sequences:
 helloworldnodejs-series:
   actions: hello, myhelloworlds/hello-js
   ```
   
   
   
 

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] houshengbo closed pull request #604: Revert "Add Json support for Input parameters (#601)"

2017-10-13 Thread git
houshengbo closed pull request #604: Revert "Add Json support for Input 
parameters (#601)"
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/604
 
 
   
 

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] houshengbo closed pull request #603: changing rule/trigger names and removing dependency for now

2017-10-13 Thread git
houshengbo closed pull request #603: changing rule/trigger names and removing 
dependency for now
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/603
 
 
   
 

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] houshengbo opened a new pull request #604: Revert "Add Json support for Input parameters (#601)"

2017-10-13 Thread git
houshengbo opened a new pull request #604: Revert "Add Json support for Input 
parameters (#601)"
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/604
 
 
   This reverts commit a079773c5ef4dabc7c09301f79d10ef0562df4cd.
 

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] dgrove-oss commented on issue #69: Do we want to support package deployment using kubectl ?

2017-10-13 Thread git
dgrove-oss commented on issue #69: Do we want to support package deployment 
using kubectl ?
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/issues/69#issuecomment-336522940
 
 
   I think it makes sense to have a batch job to automate the package 
deployment.
   
   It would be nice if we could move some of our custom docker images (dgrove, 
danlavine, daisyycguo, etc.) into a more stable namespace at dockerhub.  I'll 
raise that on the dev list to see if we can easily do something.
 

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] pritidesai opened a new pull request #603: changing rule/trigger names and removing dependency for now

2017-10-13 Thread git
pritidesai opened a new pull request #603: changing rule/trigger names and 
removing dependency for now
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/603
 
 
   this is an attempt to fix build failure on master, this is just a temporary 
fix, we need to address the concurrent access issue by adding lock to an 
individual resource, have to investigate where we can apply such lock in 
`wskdeploy` or go client or `openwhisk` itself.
 

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] dgrove-oss commented on issue #70: disable use of docker-runc by setting INVOKER_USE_RUNC to false

2017-10-13 Thread git
dgrove-oss commented on issue #70: disable use of docker-runc by setting 
INVOKER_USE_RUNC to false
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/70#issuecomment-336515234
 
 
   Enables functionality of 
https://github.com/apache/incubator-openwhisk/pull/2828
   
 

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] dgrove-oss opened a new pull request #70: disable use of docker-runc by setting INVOKER_USE_RUNC to false

2017-10-13 Thread git
dgrove-oss opened a new pull request #70: disable use of docker-runc by setting 
INVOKER_USE_RUNC to false
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/70
 
 
   Set envvar to disable use of docker-runc to pause/resume containers
   (will use docker pause/unpause instead).
 

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] dgrove-oss commented on issue #2828: option to use docker pause/unpause instead of docker-runc pause/unpause

2017-10-13 Thread git
dgrove-oss commented on issue #2828: option to use docker pause/unpause instead 
of docker-runc pause/unpause
URL: 
https://github.com/apache/incubator-openwhisk/pull/2828#issuecomment-336512882
 
 
   PG2 2167 ? 
 

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] dgrove-oss commented on issue #2828: option to use docker pause/unpause instead of docker-runc pause/unpause

2017-10-13 Thread git
dgrove-oss commented on issue #2828: option to use docker pause/unpause instead 
of docker-runc pause/unpause
URL: 
https://github.com/apache/incubator-openwhisk/pull/2828#issuecomment-336499941
 
 
   fixed scoping problem noticed by @markusthoemmes in code review.  Added test 
case.
 

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] houshengbo closed pull request #601: Add Json support for Input parameters

2017-10-13 Thread git
houshengbo closed pull request #601: Add Json support for Input parameters
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/601
 
 
   
 

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] abaruni commented on a change in pull request #217: Add ability to get trigger configuration and status

2017-10-13 Thread git
abaruni commented on a change in pull request #217: Add ability to get trigger 
configuration and status
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/217#discussion_r144573130
 
 

 ##
 File path: tests/src/test/scala/system/packages/MessageHubFeedTests.scala
 ##
 @@ -274,6 +274,67 @@ class MessageHubFeedTests
   assert(matchingActivations.length == 0)
   }
 
+  it should "return correct status and configuration" in 
withAssetCleaner(wskprops) {
+val currentTime = s"${System.currentTimeMillis}"
+
+(wp, assetHelper) =>
+  val triggerName = s"/_/dummyMessageHubTrigger-$currentTime"
+  println(s"Creating trigger ${triggerName}")
+
+  val username = kafkaUtils.getAsJson("user")
+  val password = kafkaUtils.getAsJson("password")
+  val admin_url = kafkaUtils.getAsJson("kafka_admin_url")
+  val brokers = kafkaUtils.getAsJson("brokers")
+
+  createTrigger(assetHelper, triggerName, parameters = Map(
+"user" -> username,
+"password" -> password,
+"api_key" -> kafkaUtils.getAsJson("api_key"),
+"kafka_admin_url" -> admin_url,
+"kafka_brokers_sasl" -> brokers,
+"topic" -> topic.toJson,
+"isBinaryKey" -> false.toJson,
+"isBinaryValue" -> false.toJson
+  ))
+
+  val run = wsk.action.invoke(actionName, parameters = Map(
 
 Review comment:
   right. that is a required parameter for the action itself regardless of the 
value of `lifecycleEvent`
 

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] abaruni commented on a change in pull request #217: Add ability to get trigger configuration and status

2017-10-13 Thread git
abaruni commented on a change in pull request #217: Add ability to get trigger 
configuration and status
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/217#discussion_r144572363
 
 

 ##
 File path: tests/src/test/scala/system/packages/MessageHubFeedTests.scala
 ##
 @@ -274,6 +274,67 @@ class MessageHubFeedTests
   assert(matchingActivations.length == 0)
   }
 
+  it should "return correct status and configuration" in 
withAssetCleaner(wskprops) {
+val currentTime = s"${System.currentTimeMillis}"
+
+(wp, assetHelper) =>
+  val triggerName = s"/_/dummyMessageHubTrigger-$currentTime"
+  println(s"Creating trigger ${triggerName}")
+
+  val username = kafkaUtils.getAsJson("user")
+  val password = kafkaUtils.getAsJson("password")
+  val admin_url = kafkaUtils.getAsJson("kafka_admin_url")
+  val brokers = kafkaUtils.getAsJson("brokers")
+
+  createTrigger(assetHelper, triggerName, parameters = Map(
+"user" -> username,
+"password" -> password,
+"api_key" -> kafkaUtils.getAsJson("api_key"),
+"kafka_admin_url" -> admin_url,
+"kafka_brokers_sasl" -> brokers,
+"topic" -> topic.toJson,
+"isBinaryKey" -> false.toJson,
+"isBinaryValue" -> false.toJson
+  ))
+
+  val run = wsk.action.invoke(actionName, parameters = Map(
+"triggerName" -> triggerName.toJson,
+"lifecycleEvent" -> "READ".toJson,
+"authKey" -> wp.authKey.toJson
+  ))
+
+  withActivation(wsk.activation, run) {
+activation =>
+  activation.response.success shouldBe true
+
+  inside (activation.response.result) {
+case Some(result) =>
+  val config = 
result.getFields("config").head.asInstanceOf[JsObject].fields
+  val status = 
result.getFields("status").head.asInstanceOf[JsObject].fields
+
+  config should contain("brokers" -> brokers)
 
 Review comment:
   passed in as `/_/dummyTrigger-...` returned as `/guest/dummyTrigger-...`
 

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] dubeejw commented on a change in pull request #217: Add ability to get trigger configuration and status

2017-10-13 Thread git
dubeejw commented on a change in pull request #217: Add ability to get trigger 
configuration and status
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/217#discussion_r144567795
 
 

 ##
 File path: tests/src/test/scala/system/packages/MessageHubFeedTests.scala
 ##
 @@ -274,6 +274,67 @@ class MessageHubFeedTests
   assert(matchingActivations.length == 0)
   }
 
+  it should "return correct status and configuration" in 
withAssetCleaner(wskprops) {
+val currentTime = s"${System.currentTimeMillis}"
+
+(wp, assetHelper) =>
+  val triggerName = s"/_/dummyMessageHubTrigger-$currentTime"
+  println(s"Creating trigger ${triggerName}")
+
+  val username = kafkaUtils.getAsJson("user")
+  val password = kafkaUtils.getAsJson("password")
+  val admin_url = kafkaUtils.getAsJson("kafka_admin_url")
+  val brokers = kafkaUtils.getAsJson("brokers")
+
+  createTrigger(assetHelper, triggerName, parameters = Map(
+"user" -> username,
+"password" -> password,
+"api_key" -> kafkaUtils.getAsJson("api_key"),
+"kafka_admin_url" -> admin_url,
+"kafka_brokers_sasl" -> brokers,
+"topic" -> topic.toJson,
+"isBinaryKey" -> false.toJson,
+"isBinaryValue" -> false.toJson
+  ))
+
+  val run = wsk.action.invoke(actionName, parameters = Map(
 
 Review comment:
   I mean the authKey you are passing as a parameter to the action.
 

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] dubeejw commented on a change in pull request #217: Add ability to get trigger configuration and status

2017-10-13 Thread git
dubeejw commented on a change in pull request #217: Add ability to get trigger 
configuration and status
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/217#discussion_r144568866
 
 

 ##
 File path: tests/src/test/scala/system/packages/MessageHubFeedTests.scala
 ##
 @@ -274,6 +274,67 @@ class MessageHubFeedTests
   assert(matchingActivations.length == 0)
   }
 
+  it should "return correct status and configuration" in 
withAssetCleaner(wskprops) {
+val currentTime = s"${System.currentTimeMillis}"
+
+(wp, assetHelper) =>
+  val triggerName = s"/_/dummyMessageHubTrigger-$currentTime"
+  println(s"Creating trigger ${triggerName}")
+
+  val username = kafkaUtils.getAsJson("user")
+  val password = kafkaUtils.getAsJson("password")
+  val admin_url = kafkaUtils.getAsJson("kafka_admin_url")
+  val brokers = kafkaUtils.getAsJson("brokers")
+
+  createTrigger(assetHelper, triggerName, parameters = Map(
+"user" -> username,
+"password" -> password,
+"api_key" -> kafkaUtils.getAsJson("api_key"),
+"kafka_admin_url" -> admin_url,
+"kafka_brokers_sasl" -> brokers,
+"topic" -> topic.toJson,
+"isBinaryKey" -> false.toJson,
+"isBinaryValue" -> false.toJson
+  ))
+
+  val run = wsk.action.invoke(actionName, parameters = Map(
+"triggerName" -> triggerName.toJson,
+"lifecycleEvent" -> "READ".toJson,
+"authKey" -> wp.authKey.toJson
+  ))
+
+  withActivation(wsk.activation, run) {
+activation =>
+  activation.response.success shouldBe true
+
+  inside (activation.response.result) {
+case Some(result) =>
+  val config = 
result.getFields("config").head.asInstanceOf[JsObject].fields
+  val status = 
result.getFields("status").head.asInstanceOf[JsObject].fields
+
+  config should contain("brokers" -> brokers)
 
 Review comment:
   What does the triggerName look like when it is returned here?
 

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] dubeejw commented on a change in pull request #217: Add ability to get trigger configuration and status

2017-10-13 Thread git
dubeejw commented on a change in pull request #217: Add ability to get trigger 
configuration and status
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/217#discussion_r144569084
 
 

 ##
 File path: action/kafkaFeedWeb.js
 ##
 @@ -61,6 +61,35 @@ function main(params) {
 
 resolve(common.webResponse(statusCode, body));
 });
+} else if (params.__ow_method === "get") {
+const triggerURL = common.getTriggerURL(params.authKey, 
params.endpoint, params.triggerName);
+
+return common.verifyTriggerAuth(triggerURL)
+.then(() => {
+db = new Database(params.DB_URL, params.DB_NAME);
+return db.getTrigger(params.triggerName);
+})
+.then((triggerDoc) => {
+var body = {
+config: {
+triggerName: triggerDoc.triggerName,
+topic: triggerDoc.topic,
+isJSONData: triggerDoc.isJSONData,
+isBinaryValue: triggerDoc.isBinaryValue,
+isBinaryKey: triggerDoc.isBinaryKey,
+isMessageHub: triggerDoc.isMessageHub,
+brokers: triggerDoc.brokers,
+kafka_admin_url: triggerDoc.kafka_admin_url,
+username: triggerDoc.username,
+password: triggerDoc.password
 
 Review comment:
   @csantanapr, thoughts on exposing the password here?
 

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] dubeejw commented on a change in pull request #217: Add ability to get trigger configuration and status

2017-10-13 Thread git
dubeejw commented on a change in pull request #217: Add ability to get trigger 
configuration and status
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/217#discussion_r144566377
 
 

 ##
 File path: action/kafkaFeedWeb.js
 ##
 @@ -61,6 +61,35 @@ function main(params) {
 
 resolve(common.webResponse(statusCode, body));
 });
+} else if (params.__ow_method === "get") {
+const triggerURL = common.getTriggerURL(params.authKey, 
params.endpoint, params.triggerName);
+
+return common.verifyTriggerAuth(triggerURL)
+.then(() => {
+db = new Database(params.DB_URL, params.DB_NAME);
+return db.getTrigger(params.triggerName);
+})
+.then((triggerDoc) => {
+var body = {
+config: {
+triggerName: triggerDoc.triggerName,
+topic: triggerDoc.topic,
+isJSONData: triggerDoc.isJSONData,
+isBinaryValue: triggerDoc.isBinaryValue,
+isBinaryKey: triggerDoc.isBinaryKey,
+isMessageHub: triggerDoc.isMessageHub,
+brokers: triggerDoc.brokers,
+kafka_admin_url: triggerDoc.kafka_admin_url,
+username: triggerDoc.username,
+password: triggerDoc.password
 
 Review comment:
   The code is not entirely duplicated. messageHubFeedWeb.js has a different 
method to validate parameters. Most of the shared code there is separated out 
into functions that is shared amongst the new files.
 

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] abaruni commented on a change in pull request #217: Add ability to get trigger configuration and status

2017-10-13 Thread git
abaruni commented on a change in pull request #217: Add ability to get trigger 
configuration and status
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/217#discussion_r144406862
 
 

 ##
 File path: action/kafkaFeedWeb.js
 ##
 @@ -61,6 +61,35 @@ function main(params) {
 
 resolve(common.webResponse(statusCode, body));
 });
+} else if (params.__ow_method === "get") {
 
 Review comment:
   you'll notice the code between messageHubFeedWeb.js and kafkaFeedWeb.js is 
entirely duplicated. i think it's definitely fair to get rid of the 
duplication. but i don't think this is the the place to do it. it should be 
done under a different issue/epic
 

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] sven-lange-last commented on issue #2854: Improve garbage collector out-out-memory handling and debugging

2017-10-13 Thread git
sven-lange-last commented on issue #2854: Improve garbage collector 
out-out-memory handling and debugging
URL: 
https://github.com/apache/incubator-openwhisk/pull/2854#issuecomment-336422984
 
 
   Yes, it makes perfect sense to also apply the same settings to the 
controller JVM. I just didn't want to change the controller right away. But now 
you - @markusthoemmes and @dubeejw - are asking for it... :-)
 

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] misl commented on issue #2466: [Feature request] OpenWhisk Java Client sdk

2017-10-13 Thread git
misl commented on issue #2466: [Feature request] OpenWhisk Java Client sdk
URL: 
https://github.com/apache/incubator-openwhisk/issues/2466#issuecomment-336421628
 
 
   Okay I got another step further. The reason I got a 202 is because I didn't 
tell it to do a blocking request. I figured this out by comparing wsk -v 
results with my own output:
   wsk -v --> 
https://openwhisk.ng.bluemix.net/api/v1/namespaces/waitr_DEV/actions/traeckit.tenants/debug?blocking=true=true
   java api --> 
https://openwhisk.ng.bluemix.net/api/v1/namespaces/waitr_DEV/actions/traeckit.tenants/debug
   
   Modifying the request:
   ```
   openwhisk.actions().invokeAction( namespace, packageName, actionName, 
parameters, null, null, null)
   ```
   into
   ```
   openwhisk.actions().invokeAction( namespace, packageName, actionName, 
parameters, "true", "true", null)
   ```
   Gave me a 200 response, yeah!
   
   The next thing troubling me is the actual response message. The wsk based 
invoke gives response data that I can NOT find in my java api based invoke.
 

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] daisy-ycguo opened a new issue #69: Do we want to support package deployment using kubectl ?

2017-10-13 Thread git
daisy-ycguo opened a new issue #69: Do we want to support package deployment 
using kubectl ?
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/issues/69
 
 
   I have written yaml files to deploy alarm package and catalog package in my 
own [repo](https://github.com/daisy-ycguo/openwhisk-deploy-kube-packages). Do 
we want to include them in this repo ?
   
 

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] sayanh opened a new issue #259: Using API gateway with a redis cluster

2017-10-13 Thread git
sayanh opened a new issue #259: Using API gateway with a redis cluster
URL: https://github.com/apache/incubator-openwhisk-apigateway/issues/259
 
 
   Currently, api gateway works well with a single redis instance. But if we 
use a cluster of 3 redis instances, api gateway fails to work giving the 
following error:
   `wsk api list   
   error: Unable to obtain the API list: Unable to obtain API(s) from the API 
Gateway (status code 500): {"status":500,"message":"Error: Failed to retrieve 
APIs: MOVED 2088 1.2.3.4:6379"}`
 

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