[GitHub] daisy-ycguo commented on issue #716: Some source files are missing Apache license headers

2018-02-08 Thread GitBox
daisy-ycguo commented on issue #716: Some source files are missing Apache 
license headers
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/716#issuecomment-364309959
 
 
   @mrutkows  As mentioned in the section "WHAT FILES IN AN APACHE RELEASE DO 
NOT REQUIRE A LICENSE HEADER?" of [Apache release policy 
document](http://www.apache.org/legal/src-headers.html#faq-exceptions), 
   ```
   A file without any degree of creativity in either its literal elements or 
its structure is not protected by copyright law; therefore, such a file does 
not require a license header. If in doubt about the extent of the file's 
creativity, add the license header to the file.
   
   Other files may make sense to have no license header. Three examples are:
   
   - Short informational text files; for example README, INSTALL files. The 
expectation is that these files make it obvious which product they relate to.
   - Test data for which the addition of a source header would cause the tests 
to fail.
   - 'Snippet' files that are combined as form a larger file where the larger 
file would have duplicate licensing headers.
   
   PMCs should use their judgement, err on having a source header and contact 
legal-discuss@ if unsure.
   ```
   
   So my opinion is to add license headers to all the files created by 
OpenWhisk contributors, and only exclude few files which are
   
   - files copied from third parties or created by tools
   - JSON data files which don't support annotation
   - Test data if annotation will break the tests
   - Few files leading with a dot for configurations
   
   Please refer to 
[.rat-excludes](https://github.com/apache/incubator-openwhisk-wskdeploy/blob/master/.rat-excludes).
 Only below files are excluded from adding license headers.
   
   ```
   # files copied from third parties or created by tools
   gradlew
   gradlew.bat
   Godeps
   i18n_resources.go
   
   # JSON data file doesn't support annotation
   .*json
   
   # Test data 
   
   # others
   .gitignore
   .rat-excludes
   ```


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 commented on issue #716: Some source files are missing Apache license headers

2018-02-08 Thread GitBox
daisy-ycguo commented on issue #716: Some source files are missing Apache 
license headers
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/716#issuecomment-364309959
 
 
   @mrutkows  As said in [Apache release policy 
document](http://www.apache.org/legal/src-headers.html#faq-exceptions), 
   ```
   Other files may make sense to have no license header. Three examples are:
   
   - Short informational text files; for example README, INSTALL files. The 
expectation is that these files make it obvious which product they relate to.
   - Test data for which the addition of a source header would cause the tests 
to fail.
   - 'Snippet' files that are combined as form a larger file where the larger 
file would have duplicate licensing headers.
   PMCs should use their judgement, err on having a source header and contact 
legal-discuss@ if unsure.
   ```
   
   So my opinion is to add license headers to all the files created by 
OpenWhisk contributors, and only exclude few files which are
   
   - files copied from third parties or created by tools
   - JSON data files which don't support annotation
   - Test data if annotation will break the tests
   - Few files leading with a dot for configurations
   
   Please refer to 
[.rat-excludes](https://github.com/apache/incubator-openwhisk-wskdeploy/blob/master/.rat-excludes).
 Only below files are excluded from adding license headers.
   
   ```
   # files copied from third parties or created by tools
   gradlew
   gradlew.bat
   Godeps
   i18n_resources.go
   
   # JSON data file doesn't support annotation
   .*json
   
   # Test data 
   
   # others
   .gitignore
   .rat-excludes
   ```


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] csantanapr commented on issue #681: proper handling of 'default' package name

2018-02-08 Thread GitBox
csantanapr commented on issue #681: proper handling of 'default' package name
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/681#issuecomment-364311287
 
 
   I like the solution ?default? is already reserved package name because of 
web actions uri 
   +1


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 commented on issue #716: Some source files are missing Apache license headers

2018-02-08 Thread GitBox
daisy-ycguo commented on issue #716: Some source files are missing Apache 
license headers
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/716#issuecomment-364310279
 
 
   @mrutkows Thank you for merging PR #709. This issue has been fixed. Now 
wskdeploy can pass the license header audit by running Apache Rat.


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 commented on issue #716: Some source files are missing Apache license headers

2018-02-08 Thread GitBox
daisy-ycguo commented on issue #716: Some source files are missing Apache 
license headers
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/716#issuecomment-364309959
 
 
   @mrutkows Please refer to 
[.rat-excludes](https://github.com/apache/incubator-openwhisk-wskdeploy/blob/master/.rat-excludes).
 Only below files are excluded from adding license headers.
   
   ```
   # files copied from third parties or created by tools
   gradlew
   gradlew.bat
   Godeps
   i18n_resources.go
   
   # JSON data file doesn't support annotation
   .*json
   
   # Test data 
   
   # others
   .gitignore
   .rat-excludes
   ```


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] ScottChapman commented on issue #681: proper handling of 'default' package name

2018-02-08 Thread GitBox
ScottChapman commented on issue #681: proper handling of 'default' package name
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/681#issuecomment-364303316
 
 
   I can live with that.


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] mrutkows commented on issue #709: Add Apache License

2018-02-08 Thread GitBox
mrutkows commented on issue #709: Add Apache License
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/709#issuecomment-364294635
 
 
   @daisy-ycguo next time please label the issue "review" and add me as 
reviewer (or who you feel is appropriate) or I do not know it is "ready" or see 
it on my work report.


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] mrutkows commented on issue #709: Add Apache License

2018-02-08 Thread GitBox
mrutkows commented on issue #709: Add Apache License
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/709#issuecomment-364294439
 
 
   @daisy-ycguo well done!


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 commented on issue #681: proper handling of 'default' package name

2018-02-08 Thread GitBox
pritidesai commented on issue #681: proper handling of 'default' package name
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/681#issuecomment-364292402
 
 
   After talking to Matt and scoping this feature of creating OW entities under 
`namespace/` rather than `namespace/`, its much more feasible (from 
time, complexity, compatibility, and consistency perspective) to add support 
for package name `default` in `wskdeploy`. When a package name is set to 
`default` in manifest/deployment files, `wskdeploy` will generate warnings (1) 
`Package name 'default' is reserved.` and (2) all OW entities specified in 
manifest file under `default` package will be created  under your namespace 
`/`.
   
   For example, action `helloNodejs`, trigger `locationUpdate`, and rule 
`hellorule` in the following example will be created under `/` 
   ```
   packages:
  default:
 actions:
   # helloworld action in NodeJS
   helloNodejs:
 function: actions/hello.js
 triggers:
   locationUpdate:
 rules:
   hellorule:
 trigger: locationUpdate
 action: helloNodejs
   ```
   
   Priority: Critical
   
   Let me know your comments/feedback. Thanks!
   
   


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 commented on issue #681: proper handling of 'default' package name

2018-02-08 Thread GitBox
pritidesai commented on issue #681: proper handling of 'default' package name
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/681#issuecomment-364292402
 
 
   After talking to Matt and scoping this feature of creating OW entities under 
`namespace/` rather than `namespace/`, its much more feasible (from 
time, complexity, compatibility, and consistency perspective) to add support 
for package name `default` in `wskdeploy`. When a package name is set to 
`default` in manifest/deployment files, `wskdeploy` will generate warnings (1) 
`Package name 'default' is reserved.` and (2) all OW entities specified in 
manifest file under `default` package will be created  under your namespace 
`/`.
   
   For example, action `helloNodejs`, trigger `locationUpdate`, and rule 
`hellorule` in the following example will be created under `/` 
   ```
   packages:
  default:
 actions:
   # helloworld action in NodeJS
   helloNodejs:
 function: actions/hello.js
 triggers:
   locationUpdate:
 rules:
   hellorule:
 trigger: locationUpdate
 action: helloNodejs
   ```
   
   Priority: Critical
   
   


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] csantanapr closed issue #15: This is a test issue "ET Phone HOME !!"

2018-02-08 Thread GitBox
csantanapr closed issue #15: This is a test issue "ET Phone HOME !!"
URL: https://github.com/apache/incubator-openwhisk-runtime-docker/issues/15
 
 
   


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] csantanapr commented on issue #15: This is a test issue "ET Phone HOME !!"

2018-02-08 Thread GitBox
csantanapr commented on issue #15: This is a test issue "ET Phone HOME !!"
URL: 
https://github.com/apache/incubator-openwhisk-runtime-docker/issues/15#issuecomment-364282792
 
 
   problem fixed and INFRA ticket closed 
https://issues.apache.org/jira/browse/INFRA-15998
   


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] csantanapr opened a new issue #15: This is a test issue "ET Phone HOME !!"

2018-02-08 Thread GitBox
csantanapr opened a new issue #15: This is a test issue "ET Phone HOME !!"
URL: https://github.com/apache/incubator-openwhisk-runtime-docker/issues/15
 
 
   This is a test issue to see if the email notifications are going to issues@ 
and not dev@ for the Apache OpenWhisk mailing lists.
   


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 #61: Adding placeholder for apigw access token

2018-02-08 Thread GitBox
houshengbo closed pull request #61: Adding placeholder for apigw access token
URL: https://github.com/apache/incubator-openwhisk-client-go/pull/61
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/whisk/client.go b/whisk/client.go
index 6c43cf28..2419da09 100644
--- a/whisk/client.go
+++ b/whisk/client.go
@@ -68,17 +68,18 @@ type Client struct {
 }
 
 type Config struct {
-   Namespace string // NOTE :: Default is "_"
-   Cert  string
-   Key   string
-   AuthToken string
-   Host  string
-   BaseURL   *url.URL // NOTE :: Default is "openwhisk.ng.bluemix.net"
-   Version   string
-   Verbose   bool
-   Debug bool // For detailed tracing
-   Insecure  bool
-   UserAgent string
+   Namespacestring // NOTE :: Default is "_"
+   Cert string
+   Key  string
+   AuthTokenstring
+   Host string
+   BaseURL  *url.URL // NOTE :: Default is 
"openwhisk.ng.bluemix.net"
+   Version  string
+   Verbose  bool
+   Debugbool // For detailed tracing
+   Insecure bool
+   UserAgentstring
+   ApigwAccessToken string
 }
 
 type ObfuscateSet struct {


 


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 commented on issue #173: Added test cases for quoted strings.

2018-02-08 Thread GitBox
houshengbo commented on issue #173: Added test cases for quoted strings.
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/173#issuecomment-364265724
 
 
   @jessealva please take a look at the issue: 
https://github.com/apache/incubator-openwhisk-cli/issues/221 Travis build is 
not happy at this moment, due to async with 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] mrutkows closed pull request #719: Adding examples of web action annotations

2018-02-08 Thread GitBox
mrutkows closed pull request #719: Adding examples of web action annotations
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/719
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/src/integration/webaction/manifest.yml 
b/tests/src/integration/webaction/manifest.yml
index 44568d03..b57871de 100644
--- a/tests/src/integration/webaction/manifest.yml
+++ b/tests/src/integration/webaction/manifest.yml
@@ -26,6 +26,27 @@ packages:
 version: 1.0
 function: src/greeting.js
 runtime: nodejs:6
+greeting-web-action-with-auth:
+web-export: true
+version: 1.0
+function: src/greeting.js
+runtime: nodejs:6
+annotations:
+require-whisk-auth: true
+greeting-web-action-final:
+web-export: true
+version: 1.0
+function: src/greeting.js
+runtime: nodejs:6
+annotations:
+final: true
+greeting-web-action-with-custom-options:
+web-export: true
+version: 1.0
+function: src/greeting.js
+runtime: nodejs:6
+annotations:
+web-custom-options: true
 triggers:
 webActionTrigger:
 rules:


 


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] mrutkows closed issue #712: Action: Web (action): Support the require-whisk-auth annotation

2018-02-08 Thread GitBox
mrutkows closed issue #712: Action: Web (action): Support the 
require-whisk-auth annotation
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/712
 
 
   


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] mrutkows closed issue #710: Actions: Web (export): Support "final" annotation

2018-02-08 Thread GitBox
mrutkows closed issue #710: Actions: Web (export): Support "final" annotation
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/710
 
 
   


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] mrutkows closed issue #711: Action: Web (export): Support web-custom-options annotation

2018-02-08 Thread GitBox
mrutkows closed issue #711: Action: Web (export): Support web-custom-options 
annotation
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/711
 
 
   


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 #3256: Refactor some bits of the triggers API.

2018-02-08 Thread GitBox
markusthoemmes commented on a change in pull request #3256: Refactor some bits 
of the triggers API.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3256#discussion_r167069427
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -372,58 +356,36 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
 // Build the url to invoke an action mapped to the rule
 val actionUrl = baseControllerPath / rule.action.path.root.asString / 
"actions"
 
-val actionPath = {
-  rule.action.path.relativePath.map { pkg =>
-(Path.SingleSlash + pkg.namespace) / rule.action.name.asString
-  } getOrElse {
-Path.SingleSlash + rule.action.name.asString
-  }
-}.toString
+val actionPath = rule.action.path.relativePath
+  .map(pkg => Path / pkg.namespace / rule.action.name.asString)
+  .getOrElse(Path / rule.action.name.asString)
 
 val request = HttpRequest(
   method = POST,
-  uri = url.withPath(actionUrl + actionPath),
+  uri = url.withPath(actionUrl ++ actionPath),
   headers = 
List(Authorization(BasicHttpCredentials(user.authkey.uuid.asString, 
user.authkey.key.asString))),
   entity = HttpEntity(MediaTypes.`application/json`, args.compactPrint))
 
 Http().singleRequest(request)
   }
 
-  /**
-   * Create JSON object containing the pertinent rule activation details.
-   * {
-   *   "rule": "my-rule",
-   *   "action": "my-action",
-   *   "statusCode": 0,
-   *   "status": "success",
-   *   "activationId": "...",  // either this 
field, ...
-   *   "error": "The requested resource does not exist."   // ... or this 
field will be present
-   * }
-   *
-   * @param statusCode one of ActivationResponse values
-   * @param ruleName the name of the rule that was activated
-   * @param actionName the name of the action activated by the rule
-   * @param actionActivationId the activation id, if there is one
-   * @param errorMsg the rror messages otherwise
-   * @return JsObject as formatted above
-   */
-  private def ruleResult(statusCode: Int,
- ruleName: FullyQualifiedEntityName,
- actionName: FullyQualifiedEntityName,
- actionActivationId: Option[JsValue] = None,
- errorMsg: Option[String] = None): JsObject = {
-JsObject(
-  Map(
-"rule" -> JsString(ruleName.asString),
-"action" -> JsString(actionName.asString),
-"statusCode" -> JsNumber(statusCode),
-"success" -> JsBoolean(statusCode == ActivationResponse.Success)) ++
-actionActivationId.map("activationId" -> _.toJson) ++
-errorMsg.map("error" -> JsString(_)))
+  /** Contains the result of invoking a rule */
+  case class RuleActivationResult(statusCode: Int,
+  ruleName: FullyQualifiedEntityName,
+  actionName: FullyQualifiedEntityName,
+  response: Either[String, ActivationId]) {
 
 Review comment:
   Well, let's write code for today!


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] mdeuser commented on a change in pull request #3256: Refactor some bits of the triggers API.

2018-02-08 Thread GitBox
mdeuser commented on a change in pull request #3256: Refactor some bits of the 
triggers API.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3256#discussion_r167068356
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -372,58 +356,36 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
 // Build the url to invoke an action mapped to the rule
 val actionUrl = baseControllerPath / rule.action.path.root.asString / 
"actions"
 
-val actionPath = {
-  rule.action.path.relativePath.map { pkg =>
-(Path.SingleSlash + pkg.namespace) / rule.action.name.asString
-  } getOrElse {
-Path.SingleSlash + rule.action.name.asString
-  }
-}.toString
+val actionPath = rule.action.path.relativePath
+  .map(pkg => Path / pkg.namespace / rule.action.name.asString)
+  .getOrElse(Path / rule.action.name.asString)
 
 val request = HttpRequest(
   method = POST,
-  uri = url.withPath(actionUrl + actionPath),
+  uri = url.withPath(actionUrl ++ actionPath),
   headers = 
List(Authorization(BasicHttpCredentials(user.authkey.uuid.asString, 
user.authkey.key.asString))),
   entity = HttpEntity(MediaTypes.`application/json`, args.compactPrint))
 
 Http().singleRequest(request)
   }
 
-  /**
-   * Create JSON object containing the pertinent rule activation details.
-   * {
-   *   "rule": "my-rule",
-   *   "action": "my-action",
-   *   "statusCode": 0,
-   *   "status": "success",
-   *   "activationId": "...",  // either this 
field, ...
-   *   "error": "The requested resource does not exist."   // ... or this 
field will be present
-   * }
-   *
-   * @param statusCode one of ActivationResponse values
-   * @param ruleName the name of the rule that was activated
-   * @param actionName the name of the action activated by the rule
-   * @param actionActivationId the activation id, if there is one
-   * @param errorMsg the rror messages otherwise
-   * @return JsObject as formatted above
-   */
-  private def ruleResult(statusCode: Int,
- ruleName: FullyQualifiedEntityName,
- actionName: FullyQualifiedEntityName,
- actionActivationId: Option[JsValue] = None,
- errorMsg: Option[String] = None): JsObject = {
-JsObject(
-  Map(
-"rule" -> JsString(ruleName.asString),
-"action" -> JsString(actionName.asString),
-"statusCode" -> JsNumber(statusCode),
-"success" -> JsBoolean(statusCode == ActivationResponse.Success)) ++
-actionActivationId.map("activationId" -> _.toJson) ++
-errorMsg.map("error" -> JsString(_)))
+  /** Contains the result of invoking a rule */
+  case class RuleActivationResult(statusCode: Int,
+  ruleName: FullyQualifiedEntityName,
+  actionName: FullyQualifiedEntityName,
+  response: Either[String, ActivationId]) {
 
 Review comment:
   today these values are mutually exclusive, but perhaps it may be possible 
for a trigger response to include the activation id as well as an error 
message..?


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 #3262: Handle trigger activations with inactive rules

2018-02-08 Thread GitBox
rabbah commented on issue #3262: Handle trigger activations with inactive rules
URL: 
https://github.com/apache/incubator-openwhisk/pull/3262#issuecomment-364245062
 
 
   @mdeuser can you take a look at #3256 I think we should get that one in 
first as it will benefit the enhancement in this PR.


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] mrutkows closed pull request #723: Add the integration test back to the Travis build

2018-02-08 Thread GitBox
mrutkows closed pull request #723: Add the integration test back to the Travis 
build
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/723
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tools/travis/script.sh b/tools/travis/script.sh
index e33dc106..f44de1cb 100755
--- a/tools/travis/script.sh
+++ b/tools/travis/script.sh
@@ -38,4 +38,4 @@ $ANSIBLE_CMD openwhisk.yml -e 
'{"openwhisk_cli":{"installation_mode":"remote","r
 export OPENWHISK_HOME="$(dirname "$TRAVIS_BUILD_DIR")/openwhisk"
 
 cd $TRAVIS_BUILD_DIR
-#make integration_test
+make integration_test


 


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 a change in pull request #3256: Refactor some bits of the triggers API.

2018-02-08 Thread GitBox
rabbah commented on a change in pull request #3256: Refactor some bits of the 
triggers API.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3256#discussion_r167062871
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -305,59 +292,56 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
   private def activateRules(user: Identity,
 args: JsObject,
 rulesToActivate: Map[FullyQualifiedEntityName, 
ReducedRule])(
-implicit transid: TransactionId): Iterable[Future[JsObject]] = {
-rulesToActivate.map {
+implicit transid: TransactionId): Future[Iterable[RuleActivationResult]] = 
{
+val ruleResults = rulesToActivate.map {
   case (ruleName, rule) =>
 // Invoke the action. Retain action results for inclusion in the 
trigger activation record
-val actionActivationResult: Future[JsObject] = postActivation(user, 
rule, args)
+postActivation(user, rule, args)
   .flatMap { response =>
 response.status match {
   case OK | Accepted =>
 Unmarshal(response.entity).to[JsObject].map { 
activationResponse =>
-  val activationId: JsValue = 
activationResponse.fields("activationId")
+  val activationId = 
activationResponse.fields("activationId").convertTo[ActivationId]
   logging.debug(this, s"trigger-fired action '${rule.action}' 
invoked with activation $activationId")
-  ruleResult(ActivationResponse.Success, ruleName, 
rule.action, Some(activationId))
+  RuleActivationResult(ActivationResponse.Success, ruleName, 
rule.action, Right(activationId))
 }
 
-  // all proper controller responses are JSON objects that 
deserialize to an ErrorResponse instance
-  case code if (response.entity.contentType == 
ContentTypes.`application/json`) =>
-Unmarshal(response.entity).to[ErrorResponse].map { e =>
-  val statusCode =
-if (code != InternalServerError) {
-  logging
-.debug(
-  this,
-  s"trigger-fired action '${rule.action}' failed to 
invoke with ${e.error}, ${e.code}")
-  ActivationResponse.ApplicationError
-} else {
+  case code =>
+Unmarshal(response.entity).to[String].map { error =>
+  val failureType = code match {
+case _: ServerError => ActivationResponse.WhiskError // 
all 500s are to be considered whisk errors
+case _  => ActivationResponse.ApplicationError
+  }
+  val errorMessage: String = 
Try(error.parseJson.convertTo[ErrorResponse])
+.map { e =>
+  def logMsg = s"trigger-fired action '${rule.action}' 
failed to invoke with ${e.error}, ${e.code}"
 
 Review comment:
   You are right - this is just for the log message not the response logged in 
the activation. Sorry about the confusion.


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 a change in pull request #3256: Refactor some bits of the triggers API.

2018-02-08 Thread GitBox
rabbah commented on a change in pull request #3256: Refactor some bits of the 
triggers API.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3256#discussion_r167063189
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -305,59 +292,56 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
   private def activateRules(user: Identity,
 args: JsObject,
 rulesToActivate: Map[FullyQualifiedEntityName, 
ReducedRule])(
-implicit transid: TransactionId): Iterable[Future[JsObject]] = {
-rulesToActivate.map {
+implicit transid: TransactionId): Future[Iterable[RuleActivationResult]] = 
{
+val ruleResults = rulesToActivate.map {
   case (ruleName, rule) =>
 // Invoke the action. Retain action results for inclusion in the 
trigger activation record
-val actionActivationResult: Future[JsObject] = postActivation(user, 
rule, args)
+postActivation(user, rule, args)
   .flatMap { response =>
 response.status match {
   case OK | Accepted =>
 Unmarshal(response.entity).to[JsObject].map { 
activationResponse =>
-  val activationId: JsValue = 
activationResponse.fields("activationId")
+  val activationId = 
activationResponse.fields("activationId").convertTo[ActivationId]
 
 Review comment:
   OK - sold ? 


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 #3256: Refactor some bits of the triggers API.

2018-02-08 Thread GitBox
markusthoemmes commented on a change in pull request #3256: Refactor some bits 
of the triggers API.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3256#discussion_r167062270
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -305,59 +292,56 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
   private def activateRules(user: Identity,
 args: JsObject,
 rulesToActivate: Map[FullyQualifiedEntityName, 
ReducedRule])(
-implicit transid: TransactionId): Iterable[Future[JsObject]] = {
-rulesToActivate.map {
+implicit transid: TransactionId): Future[Iterable[RuleActivationResult]] = 
{
+val ruleResults = rulesToActivate.map {
   case (ruleName, rule) =>
 // Invoke the action. Retain action results for inclusion in the 
trigger activation record
-val actionActivationResult: Future[JsObject] = postActivation(user, 
rule, args)
+postActivation(user, rule, args)
   .flatMap { response =>
 response.status match {
   case OK | Accepted =>
 Unmarshal(response.entity).to[JsObject].map { 
activationResponse =>
-  val activationId: JsValue = 
activationResponse.fields("activationId")
+  val activationId = 
activationResponse.fields("activationId").convertTo[ActivationId]
   logging.debug(this, s"trigger-fired action '${rule.action}' 
invoked with activation $activationId")
-  ruleResult(ActivationResponse.Success, ruleName, 
rule.action, Some(activationId))
+  RuleActivationResult(ActivationResponse.Success, ruleName, 
rule.action, Right(activationId))
 }
 
-  // all proper controller responses are JSON objects that 
deserialize to an ErrorResponse instance
-  case code if (response.entity.contentType == 
ContentTypes.`application/json`) =>
-Unmarshal(response.entity).to[ErrorResponse].map { e =>
-  val statusCode =
-if (code != InternalServerError) {
-  logging
-.debug(
-  this,
-  s"trigger-fired action '${rule.action}' failed to 
invoke with ${e.error}, ${e.code}")
-  ActivationResponse.ApplicationError
-} else {
+  case code =>
+Unmarshal(response.entity).to[String].map { error =>
+  val failureType = code match {
+case _: ServerError => ActivationResponse.WhiskError // 
all 500s are to be considered whisk errors
+case _  => ActivationResponse.ApplicationError
+  }
+  val errorMessage: String = 
Try(error.parseJson.convertTo[ErrorResponse])
+.map { e =>
+  def logMsg = s"trigger-fired action '${rule.action}' 
failed to invoke with ${e.error}, ${e.code}"
 
 Review comment:
   Note this is a refactor. This is copied from the current code.


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] sciabarracom commented on issue #19: support go actions

2018-02-08 Thread GitBox
sciabarracom commented on issue #19: support go actions
URL: 
https://github.com/apache/incubator-openwhisk/issues/19#issuecomment-364242226
 
 
   I am looking to the implementation of the nodejs runner. I wonder if the 
right implementation of a go action should not be instead of requiring an http 
server listening for the runCode post, and implement the initCode replacing the 
binary with the provided one. Or even create a .so library. 


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] sciabarracom commented on issue #19: support go actions

2018-02-08 Thread GitBox
sciabarracom commented on issue #19: support go actions
URL: 
https://github.com/apache/incubator-openwhisk/issues/19#issuecomment-364242226
 
 
   I am looking to the implementation of the nodejs runner. I wonder if the 
right implementation of a go action should not be instead of requiring an http 
server listening for the runCode post, and implement the unit code replacing 
the binary with the provided one. Or even create a .so library. 


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 #723: Add the integration test back to the Travis build

2018-02-08 Thread GitBox
houshengbo opened a new pull request #723: Add the integration test back to the 
Travis build
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/723
 
 
   


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 commented on a change in pull request #715: Adding support for export managed project back to manifest

2018-02-08 Thread GitBox
pritidesai commented on a change in pull request #715: Adding support for 
export managed project back to manifest
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/715#discussion_r167048358
 
 

 ##
 File path: cmd/export.go
 ##
 @@ -0,0 +1,266 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package cmd
+
+import (
+   "errors"
+   "fmt"
+   "os"
+   "path/filepath"
+   "strings"
+
+   "github.com/apache/incubator-openwhisk-client-go/whisk"
+   "github.com/apache/incubator-openwhisk-wskdeploy/deployers"
+   "github.com/apache/incubator-openwhisk-wskdeploy/parsers"
+   "github.com/apache/incubator-openwhisk-wskdeploy/utils"
+   "github.com/apache/incubator-openwhisk-wskdeploy/wskderrors"
+   "github.com/spf13/cobra"
+)
+
+var exportCmd = {
+   Use:"export",
+   SuggestFor: []string{"capture"},
+   Short:  "Export project assets from OpenWhisk",
+   Long:   `Exports managed project assets from OpenWhisk to manifest 
and function files`,
+   RunE:   ExportCmdImp,
+}
+
+var config *whisk.Config
+
+func ExportAction(actionName string, packageName string, maniyaml 
*parsers.YAML) error {
+
+   pkg := maniyaml.Packages[packageName]
+   if pkg.Actions == nil {
+   pkg.Actions = make(map[string]parsers.Action)
+   maniyaml.Packages[packageName] = pkg
+   }
+
+   wskAction, _, err := client.Actions.Get(actionName)
+   if err != nil {
+   return err
+   }
+   if wskAction.Exec.Kind == "sequence" {
+   seq := new(parsers.Sequence)
+   for _, component := range wskAction.Exec.Components {
+   // must ommit namespace from seq component name
+   ExportAction(strings.SplitN(component, "/", 3)[2], 
packageName, maniyaml)
+   slices := strings.Split(component, "/")
+
+   // save in the seq list only action names
+   if len(seq.Actions) > 0 {
+   seq.Actions += ","
+   }
+
+   seq.Actions += slices[len(slices)-1]
+   }
+
+   pkg = maniyaml.Packages[packageName]
+   if pkg.Sequences == nil {
+   pkg.Sequences = make(map[string]parsers.Sequence)
+   }
+
+   pkg.Sequences[wskAction.Name] = *seq
+   } else {
+   parsedAction := *maniyaml.ComposeParsersAction(*wskAction)
+
+   // get the action file extension according to action kind (e.g. 
js for nodejs)
+   ext := utils.FileRuntimeExtensionsMap[wskAction.Exec.Kind]
+
+   manifestDir := filepath.Dir(utils.Flags.ManifestPath)
+
+   // store function file under action package name subdirectory 
in the specified manifest folder
+   functionDir := filepath.Join(manifestDir, packageName)
+   os.MkdirAll(functionDir, os.ModePerm)
+
+   // store function in manifest under path relative to manifest 
root
+   functionFile := filepath.Join(packageName, wskAction.Name) + 
"." + ext
+   parsedAction.Function = functionFile
+
+   // create function file at the full path
+   functionFile = filepath.Join(manifestDir, functionFile)
+   f, err := os.Create(functionFile)
+   if err != nil {
+   return wskderrors.NewFileReadError(functionFile, 
err.Error())
+   }
+
+   defer f.Close()
+
+   // store action function in the filesystem next to the 
manifest.yml
+   // TODO: consider to name files by namespace + action to make 
function file names uniqueue
+   f.Write([]byte(*wskAction.Exec.Code))
+   pkg.Actions[wskAction.Name] = parsedAction
+   }
+
+   maniyaml.Packages[packageName] = pkg
+   return nil
+}
+
+func ExportCmdImp(cmd *cobra.Command, args []string) error {
+
+   projectName := utils.Flags.ProjectPath
+   maniyaml := {}
+   maniyaml.Project.Name = projectName
+
+   config, _ = 

[GitHub] pritidesai commented on a change in pull request #715: Adding support for export managed project back to manifest

2018-02-08 Thread GitBox
pritidesai commented on a change in pull request #715: Adding support for 
export managed project back to manifest
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/715#discussion_r167052402
 
 

 ##
 File path: cmd/export.go
 ##
 @@ -0,0 +1,266 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package cmd
+
+import (
+   "errors"
+   "fmt"
+   "os"
+   "path/filepath"
+   "strings"
+
+   "github.com/apache/incubator-openwhisk-client-go/whisk"
+   "github.com/apache/incubator-openwhisk-wskdeploy/deployers"
+   "github.com/apache/incubator-openwhisk-wskdeploy/parsers"
+   "github.com/apache/incubator-openwhisk-wskdeploy/utils"
+   "github.com/apache/incubator-openwhisk-wskdeploy/wskderrors"
+   "github.com/spf13/cobra"
+)
+
+var exportCmd = {
+   Use:"export",
+   SuggestFor: []string{"capture"},
+   Short:  "Export project assets from OpenWhisk",
+   Long:   `Exports managed project assets from OpenWhisk to manifest 
and function files`,
+   RunE:   ExportCmdImp,
+}
+
+var config *whisk.Config
+
+func ExportAction(actionName string, packageName string, maniyaml 
*parsers.YAML) error {
+
+   pkg := maniyaml.Packages[packageName]
+   if pkg.Actions == nil {
+   pkg.Actions = make(map[string]parsers.Action)
+   maniyaml.Packages[packageName] = pkg
+   }
+
+   wskAction, _, err := client.Actions.Get(actionName)
+   if err != nil {
+   return err
+   }
+   if wskAction.Exec.Kind == "sequence" {
+   seq := new(parsers.Sequence)
+   for _, component := range wskAction.Exec.Components {
+   // must ommit namespace from seq component name
+   ExportAction(strings.SplitN(component, "/", 3)[2], 
packageName, maniyaml)
+   slices := strings.Split(component, "/")
+
+   // save in the seq list only action names
+   if len(seq.Actions) > 0 {
+   seq.Actions += ","
+   }
+
+   seq.Actions += slices[len(slices)-1]
+   }
+
+   pkg = maniyaml.Packages[packageName]
+   if pkg.Sequences == nil {
+   pkg.Sequences = make(map[string]parsers.Sequence)
+   }
+
+   pkg.Sequences[wskAction.Name] = *seq
+   } else {
+   parsedAction := *maniyaml.ComposeParsersAction(*wskAction)
+
+   // get the action file extension according to action kind (e.g. 
js for nodejs)
+   ext := utils.FileRuntimeExtensionsMap[wskAction.Exec.Kind]
+
+   manifestDir := filepath.Dir(utils.Flags.ManifestPath)
+
+   // store function file under action package name subdirectory 
in the specified manifest folder
+   functionDir := filepath.Join(manifestDir, packageName)
+   os.MkdirAll(functionDir, os.ModePerm)
+
+   // store function in manifest under path relative to manifest 
root
+   functionFile := filepath.Join(packageName, wskAction.Name) + 
"." + ext
+   parsedAction.Function = functionFile
+
+   // create function file at the full path
+   functionFile = filepath.Join(manifestDir, functionFile)
+   f, err := os.Create(functionFile)
+   if err != nil {
+   return wskderrors.NewFileReadError(functionFile, 
err.Error())
+   }
+
+   defer f.Close()
+
+   // store action function in the filesystem next to the 
manifest.yml
+   // TODO: consider to name files by namespace + action to make 
function file names uniqueue
+   f.Write([]byte(*wskAction.Exec.Code))
+   pkg.Actions[wskAction.Name] = parsedAction
+   }
+
+   maniyaml.Packages[packageName] = pkg
+   return nil
+}
+
+func ExportCmdImp(cmd *cobra.Command, args []string) error {
+
+   projectName := utils.Flags.ProjectPath
+   maniyaml := {}
+   maniyaml.Project.Name = projectName
+
+   config, _ = 

[GitHub] mrutkows closed pull request #722: Add the correct api key

2018-02-08 Thread GitBox
mrutkows closed pull request #722: Add the correct api key
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/722
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index c4e91631..f4181077 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,7 +31,7 @@ after_success:
 export GIT_TAG="latest";
 git tag -d $GIT_TAG;
 git tag $GIT_TAG -a -m "Generated tag from Travis CI build 
$TRAVIS_BUILD_NUMBER";
-git push -f -q https://$api_...@github.com/apache/incubator-openwhisk-cli 
$GIT_TAG;
+git push -f -q 
https://$api_...@github.com/apache/incubator-openwhisk-wskdeploy $GIT_TAG;
   fi
 after_script:
 - make clean
@@ -75,4 +75,5 @@ env:
   - secure: 
R9bjVMNFBHgT3MhdN9e9aVP9jcOa99vN+XtYNBSiVP2gAfC+dFHA3U8wGj2Scho3rJI/Wd8KKNn2Lo5Wlc2tDFXVcKeLjF7nIHf74D5hLGdn6SNuvVPKCYSvnpA3QswfnHz7Y9wbYaQkjkHHkXktl4TwbsuKvMVso3Qgrc1KkQ6X8zzOtEdE9F0Md3Y508yfqxYat0qOOogN32brItJkp/9WMsLTtSZs/7iSFkRxKNCWctJx5mQ26tU/1b9NTCIipoyA+jmbrZNpot0M8b5nJ+8777FaBHhDdKayvQDcsAUpdSFzVOTby32+8Yk4E4PA2F2Q2BxEXe38GK7C3kRpYqHEkQ4lbF0LVjXwiSmEDe5tpdCn3U46/7f45v8JP1eRVearhHISOgwxM7v80S7k0fa0+xWFX0BCce05Rc6sxQzmUP/oRsqtYoBKovS4DK0cYA0dIMkJeJIoNKeyDaHn0tmSnaDxPxLQJz296Ffklyay6j8XIhWMyV0edpgu0rxq2ou+7f7zUL3Fld0ui3Bseb8MkXOIq10hR0hErLnhgKVT1jtYcz5qJ6nwS051rKJXrgnmSiAqQHtrSMRILC90xWxW9UoJt0roPhdW2+tbaaOM+JXZ7U0krw9rI0oAY+jiSX7LY7ESxMaL0Alhe7lFqk3DeRp5QWVMCmMoeG2vWOQ=
   - secure: 
AA8dirvhPlK/pdm6hzanSkYnLi/b6loEAPrSMc/mNa7ZkNrTPyPBq3B/GkNW1AEmoTOr7JGGfLk33FuffqvqIXGam3bUtVWqZdNpa1pvR9MM4laaWSfBk5fakM6rOdq5UtoYHzr00NlIjz0g/CmTn4DRbGNa43F1CkXgH1XypoBUhZZGYkcMdWMX8qYm3e32kutKUFR2GUd0xoTR91EBgIxRh8sq6wkRlfNFOwrghldYMrLP4VlUTqC/usG5G0lU+U21PlW/k3QEOxe00K46W3qAQIWTFBl3q9fX912HJZwvTC29t5hDS9zsG4Vhj93O9mwHzTfjAE/+vkXRkvnx0FPVOHqSepAAffd4rAD3N4aLGVHpGqWobg5daKegbJmCeoSaknaodNrPYq6YjTUEz4n/ckjaB/RHECkutLZh1wtJgR1joQVfAdvn3WpIYRD3CkNN6v5y5sWnX4fkVL9tCcMcukTzk6U/mEtJr6f+RC8suSw0X1c6tr+rCyXJY6a4o5ZoIXxJ52LtQaKrEbFH6fkRC4aCVuLYUAIyYoeqauXqsGpNfhmkS36DLvx5ojfpXnBdTWwwJMflm24Ec9FdOnQCkRhKiZLIxu1jJS6gy0Pe4/Vt15WiRnt1t2I9F6wIk895G0Qz2yiIQ1MmpjCnMnY8BoT9Nqs78YOfnNtgax8=
 # API_KEY used to generate the "latest" tag automatically
-  - secure: 
eC8DivnzwXxicUmfKXZIMcoPZtSK50WBpMOjn1XvkdKxBlSK1qaaDcyUz8qv71MiTB0dzrk03v4ntEhLkNIzE2RCfmcXMy/Swc6gItzT4wm4iyehG/qcya9YQXM39GwySfo/zm0P+zaS0xn2M8gBxU/E0Nbex29834jm5Ho++EuynKaqnDkwDZabo7W171wNrmEjPwWcLI4Dd3bxgqTXV3eRpBPq41XXGyVzTggY9coy8DlVViPHlqpNjYGxW2+WTtxql7hLGWvr5YXK1ONxor4F0FzI/uTIWPOVWCNPu9tkk2QmT7a5DT81WGl5Liz+//4D1hAnz7dVI08U+YZBAHYxXhWYOb2CwCedB31ReMLqHYe789lMpVUkAwiyvmNUmcOlgEba4xW+aPiJGPysSTJuT3WoAqUZHXkVmV4r/zmczm6d4XJQ+o7copCEqHTzONDuOUFEinQFuU7AII/XccUELGQ31Cpny8lK1j/4IbNcSdNJbNTGu1D97lk7dL8QhX95ln8EDh5UCBfv9us+C81nEk+93jncEjAqwQ+Ns1CtoUobqqvj3DlStFwacFBQ+BsP1pyhF1byReONmIsZTe6OXVvZw9aP8cfZCQZyD+lwVO+ldpi74J9SjY/quxWK0g/grMkFElyovnqT0DlooJh4RiIM3p6/AQsQI73nXgw=
+  - secure: 
CHEYJanoGBV2W9LqBbnG312cOBj4FIWeiLLjfult/VDcjBlAQ71EzpBEv+H9c5J5ZmeRouQ3+dUC2wCJTCeTdzAOIi9Qci7tvTT8yYPShqGS3R1q+Hx1VBaGZhEDpxDcUDDGETBOQD6du7OTKOy+4bW0EdgZA6XENcIQNp5lCPVA2BMp8wI4vUgydbK3Po1vbj4KauBtk+XPU7cUkTxtw/QUyC5Eih6QphVovBIIngBSP917sO0ENwQHjOOkCb0rG1b5OnrAMOQSbpQsVgblv8caKINqnLG5aePN3YJCB5AFzXtQI515RQ9Tf8mX1XSceFtPwAfJhqLw8kHCoiu/ptLi/rxhuv1DTD+t+Y7413bMg/qIP08KKjyj+ScyeMRVnPEfNRC+z98Ka55FDhid9+FDx0uQ7ICDpi/TkCv8GDStk55vkSp3tYfNbORk453y4K6Yf7eS041ugfC3KejlmU2IPulwxQCFjFDZl7JMZo5NMOqBj6RUStWiF3DlxcM2M0I97B2cycwL6jTOlvFJUEFPoU9UIN9ICEYRdY33nxyG5qr+ymq0YgmZqmcjK3dGd5j32xXMqsDO+vrG+CnEpwht7uo6IQWYD44qsixe8J4HcoSYkm901mQYqT7VpNy6BXqHjPBSFUYkHaV/whT6QtCxKaaa7dg0s/jqi/zAnQY=
+


 


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] mrutkows opened a new issue #27: Please list Stage 1 release plan includes "source TAR only" and list included repos.

2018-02-08 Thread GitBox
mrutkows opened a new issue #27: Please list Stage 1 release plan includes 
"source TAR only" and list included repos.
URL: https://github.com/apache/incubator-openwhisk-release/issues/27
 
 
   On the main README.md, we need to clearly say what is in Stage 1 release.
   
   That is, it includes source TAR(ZIP) only (no binaries) and list all repos. 
we intend to include.
   
   We should likely also say that we plan a Stage 2 that includes convenience 
binaries once Stage 1 is fully completed (automation and all Steps completed to 
community satisfaction).


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] mrutkows closed pull request #721: Comment out the integration tests

2018-02-08 Thread GitBox
mrutkows closed pull request #721: Comment out the integration tests
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/721
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tools/travis/script.sh b/tools/travis/script.sh
index f44de1cb..e33dc106 100755
--- a/tools/travis/script.sh
+++ b/tools/travis/script.sh
@@ -38,4 +38,4 @@ $ANSIBLE_CMD openwhisk.yml -e 
'{"openwhisk_cli":{"installation_mode":"remote","r
 export OPENWHISK_HOME="$(dirname "$TRAVIS_BUILD_DIR")/openwhisk"
 
 cd $TRAVIS_BUILD_DIR
-make integration_test
+#make integration_test


 


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 #721: Comment out the integration tests

2018-02-08 Thread GitBox
houshengbo opened a new pull request #721: Comment out the integration tests
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/721
 
 
   


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 closed pull request #3261: Pin docker engine version on ubuntu

2018-02-08 Thread GitBox
rabbah closed pull request #3261: Pin docker engine version on ubuntu
URL: https://github.com/apache/incubator-openwhisk/pull/3261
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tools/ubuntu-setup/docker.sh b/tools/ubuntu-setup/docker.sh
index 08f53bb507..337c5cf97a 100755
--- a/tools/ubuntu-setup/docker.sh
+++ b/tools/ubuntu-setup/docker.sh
@@ -15,6 +15,7 @@ sudo apt-get -y install linux-image-extra-$(uname -r)
 
 # DOCKER
 sudo apt-get install -y --force-yes docker-engine=1.12.0-0~trusty
+sudo apt-mark hold docker-engine
 
 # enable (security - use 127.0.0.1)
 sudo -E bash -c 'echo '\''DOCKER_OPTS="-H tcp://0.0.0.0:4243 -H 
unix:///var/run/docker.sock --storage-driver=aufs"'\'' >> /etc/default/docker'


 


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 a change in pull request #3262: Handle trigger activations with inactive rules

2018-02-08 Thread GitBox
rabbah commented on a change in pull request #3262: Handle trigger activations 
with inactive rules
URL: 
https://github.com/apache/incubator-openwhisk/pull/3262#discussion_r167034972
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -129,7 +129,7 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
 
   if (activeRules.nonEmpty) {
 val args: JsObject = 
trigger.parameters.merge(payload).getOrElse(JsObject())
-val actionLogList: Iterable[Future[JsObject]] = 
activateRules(user, args, activeRules)
+val actionLogList: Iterable[Future[JsObject]] = 
activateRules(user, args, trigger.rules.get)
 
 Review comment:
   I can't be absolutely certain here that trigger.rules.get is safe.
   @markusthoemmes in your refactoring, I think this becomes avoidable. Should 
I merge that first?


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 a change in pull request #3256: Refactor some bits of the triggers API.

2018-02-08 Thread GitBox
rabbah commented on a change in pull request #3256: Refactor some bits of the 
triggers API.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3256#discussion_r167033685
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -305,59 +292,56 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
   private def activateRules(user: Identity,
 args: JsObject,
 rulesToActivate: Map[FullyQualifiedEntityName, 
ReducedRule])(
-implicit transid: TransactionId): Iterable[Future[JsObject]] = {
-rulesToActivate.map {
+implicit transid: TransactionId): Future[Iterable[RuleActivationResult]] = 
{
+val ruleResults = rulesToActivate.map {
   case (ruleName, rule) =>
 // Invoke the action. Retain action results for inclusion in the 
trigger activation record
-val actionActivationResult: Future[JsObject] = postActivation(user, 
rule, args)
+postActivation(user, rule, args)
   .flatMap { response =>
 response.status match {
   case OK | Accepted =>
 Unmarshal(response.entity).to[JsObject].map { 
activationResponse =>
-  val activationId: JsValue = 
activationResponse.fields("activationId")
+  val activationId = 
activationResponse.fields("activationId").convertTo[ActivationId]
 
 Review comment:
   not sure it's worth it here to convert to ActivationId only to convert it 
back to json.


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 a change in pull request #3256: Refactor some bits of the triggers API.

2018-02-08 Thread GitBox
rabbah commented on a change in pull request #3256: Refactor some bits of the 
triggers API.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3256#discussion_r167034113
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -305,59 +292,56 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
   private def activateRules(user: Identity,
 args: JsObject,
 rulesToActivate: Map[FullyQualifiedEntityName, 
ReducedRule])(
-implicit transid: TransactionId): Iterable[Future[JsObject]] = {
-rulesToActivate.map {
+implicit transid: TransactionId): Future[Iterable[RuleActivationResult]] = 
{
+val ruleResults = rulesToActivate.map {
   case (ruleName, rule) =>
 // Invoke the action. Retain action results for inclusion in the 
trigger activation record
-val actionActivationResult: Future[JsObject] = postActivation(user, 
rule, args)
+postActivation(user, rule, args)
   .flatMap { response =>
 response.status match {
   case OK | Accepted =>
 Unmarshal(response.entity).to[JsObject].map { 
activationResponse =>
-  val activationId: JsValue = 
activationResponse.fields("activationId")
+  val activationId = 
activationResponse.fields("activationId").convertTo[ActivationId]
   logging.debug(this, s"trigger-fired action '${rule.action}' 
invoked with activation $activationId")
-  ruleResult(ActivationResponse.Success, ruleName, 
rule.action, Some(activationId))
+  RuleActivationResult(ActivationResponse.Success, ruleName, 
rule.action, Right(activationId))
 }
 
-  // all proper controller responses are JSON objects that 
deserialize to an ErrorResponse instance
-  case code if (response.entity.contentType == 
ContentTypes.`application/json`) =>
-Unmarshal(response.entity).to[ErrorResponse].map { e =>
-  val statusCode =
-if (code != InternalServerError) {
-  logging
-.debug(
-  this,
-  s"trigger-fired action '${rule.action}' failed to 
invoke with ${e.error}, ${e.code}")
-  ActivationResponse.ApplicationError
-} else {
+  case code =>
+Unmarshal(response.entity).to[String].map { error =>
+  val failureType = code match {
+case _: ServerError => ActivationResponse.WhiskError // 
all 500s are to be considered whisk errors
+case _  => ActivationResponse.ApplicationError
+  }
+  val errorMessage: String = 
Try(error.parseJson.convertTo[ErrorResponse])
+.map { e =>
+  def logMsg = s"trigger-fired action '${rule.action}' 
failed to invoke with ${e.error}, ${e.code}"
 
 Review comment:
   I'd prefer not to expose the `tid` here since that's an artifact of the 
current implementation and will go away. If there is a code, the error response 
should be sufficiently informative.


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] mdeuser commented on a change in pull request #3262: Handle trigger activations with inactive rules

2018-02-08 Thread GitBox
mdeuser commented on a change in pull request #3262: Handle trigger activations 
with inactive rules
URL: 
https://github.com/apache/incubator-openwhisk/pull/3262#discussion_r167031517
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -300,13 +305,21 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
   }
 
   /**
-   * Iterates through each active rule and invoke each mapped action.
+   * Iterates through each rule and invoking each active rule's mapped action.
*/
   private def activateRules(user: Identity,
 args: JsObject,
 rulesToActivate: Map[FullyQualifiedEntityName, 
ReducedRule])(
 implicit transid: TransactionId): Iterable[Future[JsObject]] = {
 rulesToActivate.map {
+  case (ruleName, rule) if (rule.status != Status.ACTIVE) =>
 
 Review comment:
   possibly.  since the prior filter used `status == Status.ACTIVE`, i was 
thinking all rules without an _active_ status would be handled by this case.  
that said, i see that rules only have two statuses currently defined - ACTIVE 
and INACTIVE.  so either will work, with the former automatically handling any 
other non-active state - either for good or for bad.


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] ScottChapman commented on issue #705: Unable to use ENV VARS in input JSON

2018-02-08 Thread GitBox
ScottChapman commented on issue #705: Unable to use ENV VARS in input JSON
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/705#issuecomment-364207364
 
 
   I think the issue isn't what syntax is used for injecting env vars, the 
issue is that right now the text associated with a JSON object is taken as a 
literal and not interpreted.
   
   SO interpreting the text would be a new feature, and would need to preserve 
existing behavior.
   
   (I suspect) 


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 a change in pull request #3262: Handle trigger activations with inactive rules

2018-02-08 Thread GitBox
rabbah commented on a change in pull request #3262: Handle trigger activations 
with inactive rules
URL: 
https://github.com/apache/incubator-openwhisk/pull/3262#discussion_r167026849
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -300,13 +305,21 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
   }
 
   /**
-   * Iterates through each active rule and invoke each mapped action.
+   * Iterates through each rule and invoking each active rule's mapped action.
*/
   private def activateRules(user: Identity,
 args: JsObject,
 rulesToActivate: Map[FullyQualifiedEntityName, 
ReducedRule])(
 implicit transid: TransactionId): Iterable[Future[JsObject]] = {
 rulesToActivate.map {
+  case (ruleName, rule) if (rule.status != Status.ACTIVE) =>
 
 Review comment:
   could be `rule.status == Status.INACTIVE`.


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 a change in pull request #3262: Handle trigger activations with inactive rules

2018-02-08 Thread GitBox
rabbah commented on a change in pull request #3262: Handle trigger activations 
with inactive rules
URL: 
https://github.com/apache/incubator-openwhisk/pull/3262#discussion_r167027116
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -300,13 +305,21 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
   }
 
   /**
-   * Iterates through each active rule and invoke each mapped action.
+   * Iterates through each rule and invoking each active rule's mapped action.
*/
   private def activateRules(user: Identity,
 args: JsObject,
 rulesToActivate: Map[FullyQualifiedEntityName, 
ReducedRule])(
 implicit transid: TransactionId): Iterable[Future[JsObject]] = {
 rulesToActivate.map {
+  case (ruleName, rule) if (rule.status != Status.ACTIVE) =>
+Future {
+  ruleResult(
+ActivationResponse.ApplicationError,
+ruleName,
+rule.action,
+errorMsg = Some(s"Rule ${ruleName.asString} is inactive; action 
${rule.action.asString} was not activated"))
 
 Review comment:
   should move this error message to `whisk.http.Messages`.


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 a change in pull request #3262: Handle trigger activations with inactive rules

2018-02-08 Thread GitBox
rabbah commented on a change in pull request #3262: Handle trigger activations 
with inactive rules
URL: 
https://github.com/apache/incubator-openwhisk/pull/3262#discussion_r167026849
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -300,13 +305,21 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
   }
 
   /**
-   * Iterates through each active rule and invoke each mapped action.
+   * Iterates through each rule and invoking each active rule's mapped action.
*/
   private def activateRules(user: Identity,
 args: JsObject,
 rulesToActivate: Map[FullyQualifiedEntityName, 
ReducedRule])(
 implicit transid: TransactionId): Iterable[Future[JsObject]] = {
 rulesToActivate.map {
+  case (ruleName, rule) if (rule.status != Status.ACTIVE) =>
 
 Review comment:
   could be `rule.status == Status.INACTIVE` no?


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] lionelvillard commented on issue #705: Unable to use ENV VARS in input JSON

2018-02-08 Thread GitBox
lionelvillard commented on issue #705: Unable to use ENV VARS in input JSON
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/705#issuecomment-364205529
 
 
   Looking at k8s and helm, templating is based on go templates (`{{ .username 
}}`). Maybe we could have the same for wskdeploy?
   


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] csantanapr commented on issue #84: make travis more efficient

2018-02-08 Thread GitBox
csantanapr commented on issue #84: make travis more efficient
URL: 
https://github.com/apache/incubator-openwhisk-package-pushnotifications/pull/84#issuecomment-364203880
 
 
   @drcariel abandoned PR? Can I close 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] csantanapr closed pull request #86: Do not hard code API host of push notification service

2018-02-08 Thread GitBox
csantanapr closed pull request #86: Do not hard code API host of push 
notification service
URL: 
https://github.com/apache/incubator-openwhisk-package-pushnotifications/pull/86
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/README.md b/README.md
index 43a4dc6..b96f1c3 100644
--- a/README.md
+++ b/README.md
@@ -9,8 +9,8 @@ The package includes the following action and feed:
 
 | Entity | Type | Parameters | Description |
 | --- | --- | --- | --- |
-| `/whisk.system/pushnotifications` | package | appId, appSecret  | Work with 
the Push Service |
-| `/whisk.system/pushnotifications/sendMessage` | action | text, url, 
deviceIds, platforms, userIds, tagNames, gcmCollapseKey, gcmCategory, gcmIcon, 
gcmDelayWhileIdle, gcmSync, gcmVisibility, gcmPayload, gcmPriority, gcmSound, 
gcmTimeToLive, gcmStyleType, gcmStyleTitle, gcmStyleUrl, gcmStyleText, 
gcmStyleLines, gcmLightsLedArgb, gcmLightsLedOnMs, gcmLightsLedOffMs, 
apnsBadge, apnsCategory, apnsIosActionKey, apnsPayload, apnsType, apnsSound, 
apnsTitleLocKey, apnsLocKey, apnsLaunchImage, apnsTitleLocArgs, apnsLocArgs, 
apnstitle, apnsSubtitle, apnsAttachmentUrl, fireFoxTitle, fireFoxIconUrl, 
fireFoxTimeToLive, fireFoxPayload, safariTitle, safariUrlArgs, safariAction, 
chromeTitle, chromeIconUrl, chromeTimeToLive, chromePayload, chromeAppExtTitle, 
chromeAppExtCollapseKey, chromeAppExtDelayWhileIdle, chromeAppExtIconUrl, 
chromeAppExtTimeToLive, chromeAppExtPayload | Send push notification to one or 
more specified devices |
+| `/whisk.system/pushnotifications` | package | appId, appSecret, admin_url  | 
Work with the Push Service |
+| `/whisk.system/pushnotifications/sendMessage` | action | text, url, apiHost, 
deviceIds, platforms, userIds, tagNames, gcmCollapseKey, gcmCategory, gcmIcon, 
gcmDelayWhileIdle, gcmSync, gcmVisibility, gcmPayload, gcmPriority, gcmSound, 
gcmTimeToLive, gcmStyleType, gcmStyleTitle, gcmStyleUrl, gcmStyleText, 
gcmStyleLines, gcmLightsLedArgb, gcmLightsLedOnMs, gcmLightsLedOffMs, 
apnsBadge, apnsCategory, apnsIosActionKey, apnsPayload, apnsType, apnsSound, 
apnsTitleLocKey, apnsLocKey, apnsLaunchImage, apnsTitleLocArgs, apnsLocArgs, 
apnstitle, apnsSubtitle, apnsAttachmentUrl, fireFoxTitle, fireFoxIconUrl, 
fireFoxTimeToLive, fireFoxPayload, safariTitle, safariUrlArgs, safariAction, 
chromeTitle, chromeIconUrl, chromeTimeToLive, chromePayload, chromeAppExtTitle, 
chromeAppExtCollapseKey, chromeAppExtDelayWhileIdle, chromeAppExtIconUrl, 
chromeAppExtTimeToLive, chromeAppExtPayload | Send push notification to one or 
more specified devices |
 | `/whisk.system/pushnotifications/webhook` | feed | events | Fire trigger 
events on device activities (device registration, unregistration, subscription, 
or unsubscription) on the Push service |
 Creating a package binding with the `appId` and `appSecret` values is 
suggested. This way, you don't need to specify these credentials every time you 
invoke the actions in the package.
 
@@ -54,6 +54,7 @@ The `/whisk.system/pushnotifications/sendMessage` action 
sends push notification
 
 - `text`: The notification message to be shown to the user. For example: `-p 
text "Hi ,OpenWhisk send a notification"`.
 - `url`: An optional URL that can be sent along with the alert. For example: 
`-p url "https:\\www.w3.ibm.com"`.
+- `apiHost`: An optional string that specifies the API host.  The default is 
'mobile.ng.bluemix.net'.  For example: `-p apiHost "mobile.eu-gb.bluemix.net"`.
 - `deviceIds` The list of specified devices. For example: `-p deviceIds 
"[\"deviceID1\"]"`.
 - `platforms` Send notification to the devices of the specified platforms. 'A' 
for apple (iOS) devices and 'G' for google (Android) devices. For example `-p 
platforms ["A"]`.
 - `userIds` - Send notification to the devices of the specified users. For 
example: `-p userIds "[\"testUser\"]"`
diff --git a/packages/actions/sendMessage.js b/packages/actions/sendMessage.js
index c3c39ab..4ee1584 100644
--- a/packages/actions/sendMessage.js
+++ b/packages/actions/sendMessage.js
@@ -21,6 +21,7 @@
 *  @param {string} appGuid - appGuid to create webhook
 *  @param {string} appSecret - appSecret of the application
 *  @param {string} url - An optional URL that can be sent along with the 
alert. Eg : -p url "https:\\www.mycompany.com".
+*  @param {string} apiHost - An optional string that specifies the API host.  
The default is 'mobile.ng.bluemix.net'.  Eg : -p apiHost 
"mobile.eu-gb.bluemix.net".
 *  @param {object} text - The notification message to be shown to the user. 
Eg: -p text "Hi ,OpenWhisk send a notification"
 *  @param {string} deviceIds - Send notification to the list of specified 
devices. Eg: -p deviceIds "["deviceID1"]"
 *  @param {object} platforms - Send notification to the devices of 

[GitHub] mdeuser opened a new pull request #3262: Handle trigger activations with inactive rules

2018-02-08 Thread GitBox
mdeuser opened a new pull request #3262: Handle trigger activations with 
inactive rules
URL: https://github.com/apache/incubator-openwhisk/pull/3262
 
 
   - log trigger activation entry for disabled rules (but at least one active 
rule is needed to create a trigger activation record)
   - if trigger has no associated active rule(s); return a 204.  also no 
trigger activation record is created


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] mrutkows opened a new pull request #23: WIP: Add support for a minified ASF license that uses # hash prefix.

2018-02-08 Thread GitBox
mrutkows opened a new pull request #23: WIP: Add support for a minified ASF 
license that uses # hash prefix.
URL: https://github.com/apache/incubator-openwhisk-utilities/pull/23
 
 
   


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] csantanapr closed pull request #720: Add the support to generate the "latest" tag automatically

2018-02-08 Thread GitBox
csantanapr closed pull request #720: Add the support to generate the "latest" 
tag automatically
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/720
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index 3c24eebb..c4e91631 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,6 +24,15 @@ script:
 - "./tools/travis/script.sh"
 after_success:
 - DEPLOY_BUILD_READY=true
+# This tag is automatically generated for the latest merged commit in master 
branch.
+- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_EVENT_TYPE" == "push" ] && 
[ "$TRAVIS_OS_NAME" == "linux" ] ; then
+git config --global user.email "bui...@travis-ci.com";
+git config --global user.name "Travis CI";
+export GIT_TAG="latest";
+git tag -d $GIT_TAG;
+git tag $GIT_TAG -a -m "Generated tag from Travis CI build 
$TRAVIS_BUILD_NUMBER";
+git push -f -q https://$api_...@github.com/apache/incubator-openwhisk-cli 
$GIT_TAG;
+  fi
 after_script:
 - make clean
 before_deploy:
@@ -65,3 +74,5 @@ env:
 # DockerHub
   - secure: 
R9bjVMNFBHgT3MhdN9e9aVP9jcOa99vN+XtYNBSiVP2gAfC+dFHA3U8wGj2Scho3rJI/Wd8KKNn2Lo5Wlc2tDFXVcKeLjF7nIHf74D5hLGdn6SNuvVPKCYSvnpA3QswfnHz7Y9wbYaQkjkHHkXktl4TwbsuKvMVso3Qgrc1KkQ6X8zzOtEdE9F0Md3Y508yfqxYat0qOOogN32brItJkp/9WMsLTtSZs/7iSFkRxKNCWctJx5mQ26tU/1b9NTCIipoyA+jmbrZNpot0M8b5nJ+8777FaBHhDdKayvQDcsAUpdSFzVOTby32+8Yk4E4PA2F2Q2BxEXe38GK7C3kRpYqHEkQ4lbF0LVjXwiSmEDe5tpdCn3U46/7f45v8JP1eRVearhHISOgwxM7v80S7k0fa0+xWFX0BCce05Rc6sxQzmUP/oRsqtYoBKovS4DK0cYA0dIMkJeJIoNKeyDaHn0tmSnaDxPxLQJz296Ffklyay6j8XIhWMyV0edpgu0rxq2ou+7f7zUL3Fld0ui3Bseb8MkXOIq10hR0hErLnhgKVT1jtYcz5qJ6nwS051rKJXrgnmSiAqQHtrSMRILC90xWxW9UoJt0roPhdW2+tbaaOM+JXZ7U0krw9rI0oAY+jiSX7LY7ESxMaL0Alhe7lFqk3DeRp5QWVMCmMoeG2vWOQ=
   - secure: 
AA8dirvhPlK/pdm6hzanSkYnLi/b6loEAPrSMc/mNa7ZkNrTPyPBq3B/GkNW1AEmoTOr7JGGfLk33FuffqvqIXGam3bUtVWqZdNpa1pvR9MM4laaWSfBk5fakM6rOdq5UtoYHzr00NlIjz0g/CmTn4DRbGNa43F1CkXgH1XypoBUhZZGYkcMdWMX8qYm3e32kutKUFR2GUd0xoTR91EBgIxRh8sq6wkRlfNFOwrghldYMrLP4VlUTqC/usG5G0lU+U21PlW/k3QEOxe00K46W3qAQIWTFBl3q9fX912HJZwvTC29t5hDS9zsG4Vhj93O9mwHzTfjAE/+vkXRkvnx0FPVOHqSepAAffd4rAD3N4aLGVHpGqWobg5daKegbJmCeoSaknaodNrPYq6YjTUEz4n/ckjaB/RHECkutLZh1wtJgR1joQVfAdvn3WpIYRD3CkNN6v5y5sWnX4fkVL9tCcMcukTzk6U/mEtJr6f+RC8suSw0X1c6tr+rCyXJY6a4o5ZoIXxJ52LtQaKrEbFH6fkRC4aCVuLYUAIyYoeqauXqsGpNfhmkS36DLvx5ojfpXnBdTWwwJMflm24Ec9FdOnQCkRhKiZLIxu1jJS6gy0Pe4/Vt15WiRnt1t2I9F6wIk895G0Qz2yiIQ1MmpjCnMnY8BoT9Nqs78YOfnNtgax8=
+# API_KEY used to generate the "latest" tag automatically
+  - secure: 
eC8DivnzwXxicUmfKXZIMcoPZtSK50WBpMOjn1XvkdKxBlSK1qaaDcyUz8qv71MiTB0dzrk03v4ntEhLkNIzE2RCfmcXMy/Swc6gItzT4wm4iyehG/qcya9YQXM39GwySfo/zm0P+zaS0xn2M8gBxU/E0Nbex29834jm5Ho++EuynKaqnDkwDZabo7W171wNrmEjPwWcLI4Dd3bxgqTXV3eRpBPq41XXGyVzTggY9coy8DlVViPHlqpNjYGxW2+WTtxql7hLGWvr5YXK1ONxor4F0FzI/uTIWPOVWCNPu9tkk2QmT7a5DT81WGl5Liz+//4D1hAnz7dVI08U+YZBAHYxXhWYOb2CwCedB31ReMLqHYe789lMpVUkAwiyvmNUmcOlgEba4xW+aPiJGPysSTJuT3WoAqUZHXkVmV4r/zmczm6d4XJQ+o7copCEqHTzONDuOUFEinQFuU7AII/XccUELGQ31Cpny8lK1j/4IbNcSdNJbNTGu1D97lk7dL8QhX95ln8EDh5UCBfv9us+C81nEk+93jncEjAqwQ+Ns1CtoUobqqvj3DlStFwacFBQ+BsP1pyhF1byReONmIsZTe6OXVvZw9aP8cfZCQZyD+lwVO+ldpi74J9SjY/quxWK0g/grMkFElyovnqT0DlooJh4RiIM3p6/AQsQI73nXgw=


 


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] jasonpet opened a new pull request #126: optionally limit cron fields to 5 instead of 6

2018-02-08 Thread GitBox
jasonpet opened a new pull request #126: optionally limit cron fields to 5 
instead of 6
URL: https://github.com/apache/incubator-openwhisk-package-alarms/pull/126
 
 
   This allows vendors to limit the finest granularity to 1 minute instead of 1 
second.


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 #720: Add the support to generate the "latest" tag automatically

2018-02-08 Thread GitBox
houshengbo opened a new pull request #720: Add the support to generate the 
"latest" tag automatically
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/720
 
 
   


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] michaelmarth commented on issue #716: Some source files are missing Apache license headers

2018-02-08 Thread GitBox
michaelmarth commented on issue #716: Some source files are missing Apache 
license headers
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/716#issuecomment-364165889
 
 
   @bdelacretaz do you happen to have input on  the above?


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] jasonpet commented on a change in pull request #86: Do not hard code API host of push notification service

2018-02-08 Thread GitBox
jasonpet commented on a change in pull request #86: Do not hard code API host 
of push notification service
URL: 
https://github.com/apache/incubator-openwhisk-package-pushnotifications/pull/86#discussion_r166982594
 
 

 ##
 File path: packages/actions/sendMessage.js
 ##
 @@ -426,10 +427,22 @@ function main(params) {
 
   var bodyData = JSON.stringify(sendMessage);
   var request = require('request');
+  var apiHost;
+  if (params.apiHost) {
+apiHost = params.apiHost;
+  }
+  else if (params.admin_url) {
+var adminURL = require('url').parse(`https:${params.admin_url}`);
 
 Review comment:
   good idea


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] mrutkows commented on issue #716: Some source files are missing Apache license headers

2018-02-08 Thread GitBox
mrutkows commented on issue #716: Some source files are missing Apache license 
headers
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/716#issuecomment-364156898
 
 
   @daisy-ycguo  
   So other Apache projects have ASF headers for:
   - .md
   - .yaml (config files)
   
   but what about the following types? Is there a precedent (example) in other 
projects for:
   - Dockerfile
   - Makefile
   - hosts (file)
   - travis.yml
   - .sh (Bash)
   - .wskprops (any file with a leading "." dot)
   
   If so, can you confirm and link at least 1 example that ASF approved as part 
of another release?


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] tardieu opened a new pull request #3261: Pin docker engine version on ubuntu

2018-02-08 Thread GitBox
tardieu opened a new pull request #3261: Pin docker engine version on ubuntu
URL: https://github.com/apache/incubator-openwhisk/pull/3261
 
 
   We require a specific docker engine version on ubuntu. We should pin the 
package so that it does not get automatically updated when running system-wide 
updates. 
   


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 #3240: Add a loadbalancer with local state and horizontal invoker sharding.

2018-02-08 Thread GitBox
markusthoemmes commented on a change in pull request #3240: Add a loadbalancer 
with local state and horizontal invoker sharding.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3240#discussion_r166954536
 
 

 ##
 File path: common/scala/src/main/scala/whisk/common/ForcableSemaphore.scala
 ##
 @@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package whisk.common
+
+import java.util.concurrent.locks.AbstractQueuedSynchronizer
+
+import scala.annotation.tailrec
+
+/**
+ * A Semaphore, which in addition to the usual features has means to force 
more clients to get permits.
+ *
+ * Like any usual Semaphore, this implementation will give away at most 
`maxAllowed` permits when used the "usual" way.
+ * In addition to that, it also has a `forceAcquire` method which will push 
the Semaphore's remaining permits into a
+ * negative value. Getting permits using `tryAcquire` will only be possible 
once the permits value is in a positive
+ * state again.
+ *
+ * As this is (now) only used for the loadbalancer's scheduling, this does not 
implement the "whole" Java Semaphore's
+ * interface but only the methods needed.
+ *
+ * @param maxAllowed maximum number of permits given away by `tryAcquire`
+ */
+class ForcableSemaphore(maxAllowed: Int) {
+  class Sync extends AbstractQueuedSynchronizer {
 
 Review comment:
   It's nested to hide the innerts of `AbstractQueuedSynchronizer` (which are 
nasty) from the general interface.


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 #3254: Do not disable rule when it is updated

2018-02-08 Thread GitBox
dubeejw commented on a change in pull request #3254: Do not disable rule when 
it is updated
URL: 
https://github.com/apache/incubator-openwhisk/pull/3254#discussion_r166935522
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Rules.scala
 ##
 @@ -313,7 +314,7 @@ trait WhiskRulesApi extends WhiskCollectionAPI with 
ReferencedEntities {
 WhiskTrigger.put(entityStore, oldTrigger.removeRule(ruleName))
   }
 
-  val triggerLink = ReducedRule(actionName, Status.INACTIVE)
+  val triggerLink = ReducedRule(actionName, status)
 
 Review comment:
   `create()` calls `update()` in the controller. We would only check the rule 
status during an update.


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 #3241: Impossible the see usage of a shared package

2018-02-08 Thread GitBox
rabbah commented on issue #3241: Impossible the see usage of a shared package
URL: 
https://github.com/apache/incubator-openwhisk/issues/3241#issuecomment-364100745
 
 
   A related thought - today when you invoke an action through a binding, the 
resolution to the package happens fairly early on. The activation record that's 
created does not note that the activation came through a binding.
   
   The activation count for an action in a package is owned by the caller. It 
may be useful to provide metrics that show the owner of a package how often 
their actions are  @invoked by others (through binding or directly).
   
   I can see that being useful - and for a catalog of packages/actions that are 
public, could serve as a way of providing meaningful information; eventually 
coupled with "stars" and recommendations in a curated catalog.


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 #3241: Impossible the see usage of a shared package

2018-02-08 Thread GitBox
rabbah commented on issue #3241: Impossible the see usage of a shared package
URL: 
https://github.com/apache/incubator-openwhisk/issues/3241#issuecomment-364100745
 
 
   A related thought - today when you invoke an action through a binding, the 
resolution to the package happens fairly early on. The activation record that's 
created does not note that the activation came through a binding.
   
   The activation count for an action in a package is owned by the caller. It 
may be useful to provide metrics that show the owner of a package how often 
their actions are  @invoked by others (through binding or directly).
   
   I can see that being useful - and for a catalog of packages/actions that are 
public, could serve as a way of providing meaningful information; eventually 
coupled with "stars" and recommendations.


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 #3241: Impossible the see usage of a shared package

2018-02-08 Thread GitBox
rabbah commented on issue #3241: Impossible the see usage of a shared package
URL: 
https://github.com/apache/incubator-openwhisk/issues/3241#issuecomment-364100745
 
 
   A related thought - today when you invoke an action through a binding, the 
resolution to the package happens fairly early on. The activation record that's 
created does not note that the activation came through a binding.
   
   The activation count for an action in a package is owned by the caller. It 
may be useful to provide metrics that show the owner of a package how often 
their actions are invoked by others (through binding or directly).
   
   I can that being useful - and for a catalog of packages/actions that are 
public, could serve as a way of providing meaningful information; eventually 
coupled with "stars" and recommendations.


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 #3241: Impossible the see usage of a shared package

2018-02-08 Thread GitBox
rabbah commented on issue #3241: Impossible the see usage of a shared package
URL: 
https://github.com/apache/incubator-openwhisk/issues/3241#issuecomment-364100745
 
 
   A related thought - today when you invoke an action through a binding, the 
resolution to the package happens fairly early on. The activation record that's 
created does not note that the activation came through a binding.
   
   The activation count for an action in a package is owned by the caller. It 
may be useful to provide metrics that show the owner of a package how often 
their actions are invokes by others (through binding or directly).
   
   I can that being useful - and for a catalog of packages/actions that are 
public, could serve as a way of providing meaningful information; eventually 
coupled with "stars" and recommendations.


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 #3241: Impossible the see usage of a shared package

2018-02-08 Thread GitBox
rabbah commented on issue #3241: Impossible the see usage of a shared package
URL: 
https://github.com/apache/incubator-openwhisk/issues/3241#issuecomment-364099128
 
 
   If the goal is to prevent breaking changes, then versioning is the preferred 
route. 
   We could provide a count of references that exist - but providing the 
namespaces could be a reason for concern. Also note that actions in a public 
package may be called directly without a binding.


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] mhaack commented on issue #3241: Impossible the see usage of a shared package

2018-02-08 Thread GitBox
mhaack commented on issue #3241: Impossible the see usage of a shared package
URL: 
https://github.com/apache/incubator-openwhisk/issues/3241#issuecomment-364093548
 
 
   I agree on the package versioning, that is and idea we are currently looking 
into. Copying is out of scope, if some copies an action he is on his own.
   
   For example can I delete an action in a shared package or the entire 
package? For such a case it would be nice if I can see who uses "my" public 
shared package. 


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 commented on issue #709: Add Apache License

2018-02-08 Thread GitBox
daisy-ycguo commented on issue #709: Add Apache License
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/709#issuecomment-364091569
 
 
   I added more Apache license before those source files which are missing 
headers. Below files are exceptions which are tracked by `.rat-excludes` in the 
root folder.
   
   ```
   # files copied from third parties or created by tools
   gradlew
   gradlew.bat
   Godeps
   i18n_resources.go
   
   # JSON data file doesn't support annotation
   .*json
   
   # Test data 
   
   # others
   .gitignore
   .rat-excludes
   ```
   
   After applying this PR, when I run 
   ```
   java -jar apache-rat/target/apache-rat-0.9-SNAPSHOT.jar -d . -E 
./.rat-excludes
   ```
   I will get a 100% compliance report.
   ```
   ---
   Generated at: 2018-02-08T19:51:34+08:00
   Notes: 1
   Binaries: 15
   Archives: 6
   Standards: 314
   
   Apache Licensed: 314
   Generated Documents: 0
   
   JavaDocs are generated and so license header is optional
   Generated files do not required license headers
   
   0 Unknown Licenses
   
   ***
   
   Unapproved licenses:
   
   
   ***
   ```


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 #3241: Impossible the see usage of a shared package

2018-02-08 Thread GitBox
rabbah commented on issue #3241: Impossible the see usage of a shared package
URL: 
https://github.com/apache/incubator-openwhisk/issues/3241#issuecomment-364082032
 
 
   For this kind of thing why not use versioning; it would be a better 
approach. You could add a version to the package name (version at user level) 
and follow semver protocol.
   
   Since a package is entirely public someone who wants to protect against a 
breaking change without versioning would/could make a copy of the code. It 
isn?t possible to know who made a copy.


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 a change in pull request #3240: Add a loadbalancer with local state and horizontal invoker sharding.

2018-02-08 Thread GitBox
rabbah commented on a change in pull request #3240: Add a loadbalancer with 
local state and horizontal invoker sharding.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3240#discussion_r166900059
 
 

 ##
 File path: 
core/controller/src/main/scala/whisk/core/loadBalancer/ShardingContainerPoolBalancer.scala
 ##
 @@ -0,0 +1,439 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package whisk.core.loadBalancer
+
+import java.nio.charset.StandardCharsets
+import java.util.concurrent.atomic.LongAdder
+import java.util.concurrent.ThreadLocalRandom
+
+import akka.actor.{Actor, ActorSystem, Props}
+import akka.cluster.ClusterEvent._
+import akka.cluster.{Cluster, Member, MemberStatus}
+import akka.event.Logging.InfoLevel
+import akka.stream.ActorMaterializer
+import org.apache.kafka.clients.producer.RecordMetadata
+import pureconfig._
+import whisk.common.{ForcableSemaphore, Logging, LoggingMarkers, TransactionId}
+import whisk.core.WhiskConfig._
+import whisk.core.connector._
+import whisk.core.entity._
+import whisk.core.{ConfigKeys, WhiskConfig}
+import whisk.spi.SpiLoader
+
+import scala.annotation.tailrec
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, Future, Promise}
+import scala.util.{Failure, Success}
+
+/**
+ * A loadbalancer that uses "horizontal" sharding to not collide with fellow 
loadbalancers.
+ *
+ * Horizontal sharding means, that each invoker's capacity is evenly divided 
between the loadbalancers. If an invoker
+ * has at most 16 slots available, those will be divided to 8 slots for each 
loadbalancer (if there are 2).
+ */
+class ShardingContainerPoolBalancer(config: WhiskConfig, controllerInstance: 
InstanceId)(
+  implicit val actorSystem: ActorSystem,
+  logging: Logging,
+  materializer: ActorMaterializer)
+extends LoadBalancer {
+
+  private implicit val executionContext: ExecutionContext = 
actorSystem.dispatcher
+
+  /** Build a cluster of all loadbalancers */
+  val seedNodesProvider = new 
StaticSeedNodesProvider(config.controllerSeedNodes, actorSystem.name)
+  val cluster = Cluster(actorSystem)
+  cluster.joinSeedNodes(seedNodesProvider.getSeedNodes())
+
+  /** Used to manage an action for testing invoker health */
+  private val entityStore = WhiskEntityStore.datastore(config)
+
+  /** State related to invocations and throttling */
+  private val activations = TrieMap[ActivationId, ActivationEntry]()
+  private val activationsPerNamespace = TrieMap[UUID, LongAdder]()
+  private val totalActivations = new LongAdder()
+
+  /** State needed for scheduling. */
+  private val schedulingState = ShardingContainerPoolBalancerState()()
+
+  /**
+   * Monitors invoker supervision and the cluster to update the state 
sequentially
+   *
+   * All state updates should go through this actor to guarantee, that 
`updateState` and `updateCluster` are called
+   * mutually exclusive and not concurrently.
+   */
+  private val monitor = actorSystem.actorOf(Props(new Actor {
+override def preStart(): Unit = {
+  cluster.subscribe(self, classOf[MemberEvent], classOf[ReachabilityEvent])
+}
+
+// all members of the cluster that are available
+var availableMembers = Set.empty[Member]
+
+override def receive: Receive = {
+  case CurrentInvokerPoolState(newState) =>
+schedulingState.updateInvokers(newState)
+
+  // State of the cluster as it is right now
+  case CurrentClusterState(members, _, _, _, _) =>
+availableMembers = members.filter(_.status == MemberStatus.Up)
+schedulingState.updateCluster(availableMembers.size)
+
+  // General lifecycle events and events concerning the reachability of 
members. Split-brain is not a huge concern
+  // in this case as only the invoker-threshold is adjusted according to 
the perceived cluster-size.
+  // Taking the unreachable member out of the cluster from that 
point-of-view results in a better experience
+  // even under split-brain-conditions, as that (in the worst-case) 
results in premature overloading of invokers vs.
+  // going into overflow mode prematurely.
+  case event: ClusterDomainEvent =>
+

[GitHub] rabbah commented on a change in pull request #3240: Add a loadbalancer with local state and horizontal invoker sharding.

2018-02-08 Thread GitBox
rabbah commented on a change in pull request #3240: Add a loadbalancer with 
local state and horizontal invoker sharding.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3240#discussion_r166899101
 
 

 ##
 File path: common/scala/src/main/scala/whisk/common/ForcableSemaphore.scala
 ##
 @@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package whisk.common
+
+import java.util.concurrent.locks.AbstractQueuedSynchronizer
+
+import scala.annotation.tailrec
+
+/**
+ * A Semaphore, which in addition to the usual features has means to force 
more clients to get permits.
+ *
+ * Like any usual Semaphore, this implementation will give away at most 
`maxAllowed` permits when used the "usual" way.
+ * In addition to that, it also has a `forceAcquire` method which will push 
the Semaphore's remaining permits into a
+ * negative value. Getting permits using `tryAcquire` will only be possible 
once the permits value is in a positive
+ * state again.
+ *
+ * As this is (now) only used for the loadbalancer's scheduling, this does not 
implement the "whole" Java Semaphore's
+ * interface but only the methods needed.
+ *
+ * @param maxAllowed maximum number of permits given away by `tryAcquire`
+ */
+class ForcableSemaphore(maxAllowed: Int) {
+  class Sync extends AbstractQueuedSynchronizer {
 
 Review comment:
   Nesting this class seems unnecessary, but fine. 


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 a change in pull request #3240: Add a loadbalancer with local state and horizontal invoker sharding.

2018-02-08 Thread GitBox
rabbah commented on a change in pull request #3240: Add a loadbalancer with 
local state and horizontal invoker sharding.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3240#discussion_r166897507
 
 

 ##
 File path: common/scala/src/main/scala/whisk/common/ForcableSemaphore.scala
 ##
 @@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package whisk.common
+
+import java.util.concurrent.locks.AbstractQueuedSynchronizer
+
+import scala.annotation.tailrec
+
+/**
+ * A Semaphore, which in addition to the usual features has means to force 
more clients to get permits.
+ *
+ * Like any usual Semaphore, this implementation will give away at most 
`maxAllowed` permits when used the "usual" way.
+ * In addition to that, it also has a `forceAcquire` method which will push 
the Semaphore's remaining permits into a
+ * negative value. Getting permits using `tryAcquire` will only be possible 
once the permits value is in a positive
+ * state again.
+ *
+ * As this is (now) only used for the loadbalancer's scheduling, this does not 
implement the "whole" Java Semaphore's
+ * interface but only the methods needed.
+ *
+ * @param maxAllowed maximum number of permits given away by `tryAcquire`
+ */
+class ForcableSemaphore(maxAllowed: Int) {
+  class Sync extends AbstractQueuedSynchronizer {
 
 Review comment:
   Why is this class nested) 


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 a change in pull request #3240: Add a loadbalancer with local state and horizontal invoker sharding.

2018-02-08 Thread GitBox
rabbah commented on a change in pull request #3240: Add a loadbalancer with 
local state and horizontal invoker sharding.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3240#discussion_r166901098
 
 

 ##
 File path: 
core/controller/src/main/scala/whisk/core/loadBalancer/ShardingContainerPoolBalancer.scala
 ##
 @@ -0,0 +1,439 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package whisk.core.loadBalancer
+
+import java.nio.charset.StandardCharsets
+import java.util.concurrent.atomic.LongAdder
+import java.util.concurrent.ThreadLocalRandom
+
+import akka.actor.{Actor, ActorSystem, Props}
+import akka.cluster.ClusterEvent._
+import akka.cluster.{Cluster, Member, MemberStatus}
+import akka.event.Logging.InfoLevel
+import akka.stream.ActorMaterializer
+import org.apache.kafka.clients.producer.RecordMetadata
+import pureconfig._
+import whisk.common.{ForcableSemaphore, Logging, LoggingMarkers, TransactionId}
+import whisk.core.WhiskConfig._
+import whisk.core.connector._
+import whisk.core.entity._
+import whisk.core.{ConfigKeys, WhiskConfig}
+import whisk.spi.SpiLoader
+
+import scala.annotation.tailrec
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, Future, Promise}
+import scala.util.{Failure, Success}
+
+/**
+ * A loadbalancer that uses "horizontal" sharding to not collide with fellow 
loadbalancers.
+ *
+ * Horizontal sharding means, that each invoker's capacity is evenly divided 
between the loadbalancers. If an invoker
+ * has at most 16 slots available, those will be divided to 8 slots for each 
loadbalancer (if there are 2).
+ */
+class ShardingContainerPoolBalancer(config: WhiskConfig, controllerInstance: 
InstanceId)(
+  implicit val actorSystem: ActorSystem,
+  logging: Logging,
+  materializer: ActorMaterializer)
+extends LoadBalancer {
+
+  private implicit val executionContext: ExecutionContext = 
actorSystem.dispatcher
+
+  /** Build a cluster of all loadbalancers */
+  val seedNodesProvider = new 
StaticSeedNodesProvider(config.controllerSeedNodes, actorSystem.name)
+  val cluster = Cluster(actorSystem)
+  cluster.joinSeedNodes(seedNodesProvider.getSeedNodes())
+
+  /** Used to manage an action for testing invoker health */
+  private val entityStore = WhiskEntityStore.datastore(config)
+
+  /** State related to invocations and throttling */
+  private val activations = TrieMap[ActivationId, ActivationEntry]()
+  private val activationsPerNamespace = TrieMap[UUID, LongAdder]()
+  private val totalActivations = new LongAdder()
+
+  /** State needed for scheduling. */
+  private val schedulingState = ShardingContainerPoolBalancerState()()
+
+  /**
+   * Monitors invoker supervision and the cluster to update the state 
sequentially
+   *
+   * All state updates should go through this actor to guarantee, that 
`updateState` and `updateCluster` are called
+   * mutually exclusive and not concurrently.
+   */
+  private val monitor = actorSystem.actorOf(Props(new Actor {
+override def preStart(): Unit = {
+  cluster.subscribe(self, classOf[MemberEvent], classOf[ReachabilityEvent])
+}
+
+// all members of the cluster that are available
+var availableMembers = Set.empty[Member]
+
+override def receive: Receive = {
+  case CurrentInvokerPoolState(newState) =>
+schedulingState.updateInvokers(newState)
+
+  // State of the cluster as it is right now
+  case CurrentClusterState(members, _, _, _, _) =>
+availableMembers = members.filter(_.status == MemberStatus.Up)
+schedulingState.updateCluster(availableMembers.size)
+
+  // General lifecycle events and events concerning the reachability of 
members. Split-brain is not a huge concern
+  // in this case as only the invoker-threshold is adjusted according to 
the perceived cluster-size.
+  // Taking the unreachable member out of the cluster from that 
point-of-view results in a better experience
+  // even under split-brain-conditions, as that (in the worst-case) 
results in premature overloading of invokers vs.
+  // going into overflow mode prematurely.
+  case event: ClusterDomainEvent =>
+

[GitHub] mhaack commented on issue #3241: Impossible the see usage of a shared package

2018-02-08 Thread GitBox
mhaack commented on issue #3241: Impossible the see usage of a shared package
URL: 
https://github.com/apache/incubator-openwhisk/issues/3241#issuecomment-364059971
 
 
   I think that's a list of namespaces that have bindings to my public 
packages. The intention is to get at least a list of namespaces using my public 
packages, for example if I plan to update the actions in a public package they 
might be affected by the changes I make.
   
   For example:
   ```
   ?  wsk package list-bindings
   packages
   /my-namespace/package1   used by namespace 
/other-namespace-a
   /my-namespace/package2   used by namespace 
/other-namespace-b
   ```
   
   This could be a the minimum information without exposing to much details 
about the namespaces consuming my shared packages.


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] mhaack commented on issue #3241: Impossible the see usage of a shared package

2018-02-08 Thread GitBox
mhaack commented on issue #3241: Impossible the see usage of a shared package
URL: 
https://github.com/apache/incubator-openwhisk/issues/3241#issuecomment-364059971
 
 
   I think of a list of namespaces that have bindings to my public packages. 
The intention is to get at least a list of namespaces using my public packages, 
for example if I plan to update the actions in a public package they might be 
affected by the changes I make.
   
   For example:
   ```
   ?  wsk package list-bindings
   packages
   /my-namespace/package1   used by namespace 
/other-namespace-a
   /my-namespace/package2   used by namespace 
/other-namespace-b
   ```
   
   This could be a the minimum information without exposing to much details 
about the namespaces consuming my shared packages.


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 #3260: Enhance the RestResult with more information to debug failing tests e?

2018-02-08 Thread GitBox
markusthoemmes commented on a change in pull request #3260: Enhance the 
RestResult with more information to debug failing tests e?
URL: 
https://github.com/apache/incubator-openwhisk/pull/3260#discussion_r166878476
 
 

 ##
 File path: tests/src/test/scala/common/rest/WskRest.scala
 ##
 @@ -1531,6 +1531,13 @@ class RestResult(var statusCode: StatusCode, var 
respData: String = "", blocking
   respData,
   RestResult.convertHttpResponseToStderr(respData)) {
 
+  override def toString: String = {
+s"""${super.toString}statusCode: $statusCode
+respData: $respData
+blocking: $blocking
+"""
+  }
 
 Review comment:
   How about:
   
   ```scala
   override def toString: String = {
 s"""${super.toString}
 |statusCode: $statusCode
 |respData: $respData
 |blocking: $blocking""".stripMargin
   }
   ```


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] cbickel opened a new pull request #3260: Enhance the RestResult with more information to debug failing tests e?

2018-02-08 Thread GitBox
cbickel opened a new pull request #3260: Enhance the RestResult with more 
information to debug failing tests e?
URL: https://github.com/apache/incubator-openwhisk/pull/3260
 
 
   ?asier.
   
   I had to debug a failing test case. But most information from the RestResult 
was hidden. Only the information of the parent (RunResult) was shown.


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