[GitHub] mrutkows opened a new pull request #291: ADjust colors for yaml and bash; add bash highlighting

2018-08-08 Thread GitBox
mrutkows opened a new pull request #291: ADjust colors for yaml and bash; add 
bash highlighting
URL: https://github.com/apache/incubator-openwhisk-website/pull/291
 
 
   


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 closed pull request #288: Importing code from scripts instead of hardcoding in html file

2018-08-08 Thread GitBox
pritidesai closed pull request #288: Importing code from scripts instead of 
hardcoding in html file
URL: https://github.com/apache/incubator-openwhisk-website/pull/288
 
 
   

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/_layouts/documentation.html b/_layouts/documentation.html
index 09ce439..39e774c 100644
--- a/_layouts/documentation.html
+++ b/_layouts/documentation.html
@@ -461,9 +461,9 @@ Creating and Invoking NodeJS actions
 
 Create a file named 
hello.js:
 
-function main() {
-return {payload: 'Hello world'};
-}
+{% highlight javascript linenos %}
+{% remotefile 
https://raw.githubusercontent.com/apache/incubator-openwhisk-website/master/code/hello.js
 %}
+{% endhighlight %}
 
 Create an action 
called helloJS using hello.js:
 
@@ -493,24 +493,16 @@ Creating and Invoking NodeJS actions
 
 Create manifest.yaml with the following 
YAML content:
 
-packages:
-helloworld:
-actions:
-helloJS:
-function: hello.js
+{% highlight yaml linenos %}
+{% remotefile 
https://raw.githubusercontent.com/apache/incubator-openwhisk-website/master/code/manifest-for-helloJS-1.yaml
 %}
+{% endhighlight %}
 
 Or
 
 
-packages:
-helloworld:
-actions:
-helloJS:
-code: |
-function main() {
-return {payload: 'Hello world'};
-}
-runtime: nodejs:6
+{% highlight yaml linenos %}
+{% remotefile 
https://raw.githubusercontent.com/apache/incubator-openwhisk-website/master/code/manifest-for-helloJS-2.yaml
 %}
+{% endhighlight %}
 
 Run deployment with wskdeploy:
 
@@ -558,15 +550,9 @@ Creating And Invoking Python actions
 
 Create a file named 
hello.py:
 
-import sys
-def main(dict):
-if 'name' in dict:
-name = dict['name']
-else:
-name = "stranger"
-greeting = "Hello " + name + "!"
-print(greeting)
-return {"greeting": greeting}
+{% highlight python linenos %}
+{% remotefile 
https://raw.githubusercontent.com/apache/incubator-openwhisk-website/master/code/hello.py
 %}
+{% endhighlight %}
 
 Create an action 
called helloPy using hello.py:
 
@@ -592,30 +578,16 @@ Creating And Invoking Python actions
 
 Create manifest.yaml with the following 
YAML content:
 
-packages:
-helloworld:
-actions:
-helloPy:
-function: hello.py
+{% highlight yaml linenos %}
+{% remotefile 
https://raw.githubusercontent.com/apache/incubator-openwhisk-website/master/code/manifest-for-helloPy-1.yaml
 %}
+{% endhighlight %}
 
 Or
 
 
-packages:
-helloworld:
-actions:
-helloPy:
-code: |
-import sys
-def main(dict):
-if 'name' in dict:
-name = dict['name']
-else:
-name = "stranger"
-greeting = "Hello " + name + "!"
-print(greeting)
-return {"greeting": greeting}
-runtime: python:2
+{% highlight yaml linenos %}
+{% remotefile 
https://raw.githubusercontent.com/apache/incubator-openwhisk-website/master/code/manifest-for-helloPy-2.yaml
 %}
+{% endhighlight %}
 
 Run deployment with wskdeploy:
 
@@ -662,31 +634,9 @@ Creating And Invoking Go actions
 
 Create a file named 
hello.go:
 
-package main
-
-import "encoding/json"
-import "fmt"
-import "os"
-
-func main() {
-//program receives one argument: the JSON object as a string
-arg := os.Args[1]
-
-// unmarshal the string to a JSON object
-var obj map[string]interface{}
-json.Unmarshal([]byte(arg), )
-
-// can optionally log to stdout (or stderr)
-fmt.Println("hello Go action")
-
-name, ok := obj["name"].(string)
-if !ok { name = "Stranger" }
-
-// last line of stdout is the result JSON object as a string
-msg := map[string]string{"msg": ("Hello, " + name + "!")}
-res, _ := 

[GitHub] mrutkows closed pull request #289: an attempt to download latest css

2018-08-08 Thread GitBox
mrutkows closed pull request #289: an attempt to download latest css
URL: https://github.com/apache/incubator-openwhisk-website/pull/289
 
 
   

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/_layouts/default.html b/_layouts/default.html
index e6d49ea..ef63f70 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -19,7 +19,7 @@
 {% include head/favicon.html %}
 {{ page_title }}
 https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i;
 rel="stylesheet">
-
+
 
 

[GitHub] pritidesai opened a new pull request #289: an attempt to download latest css

2018-08-08 Thread GitBox
pritidesai opened a new pull request #289: an attempt to download latest css
URL: https://github.com/apache/incubator-openwhisk-website/pull/289
 
 
   


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 closed pull request #287: Fix terminal style and add code syntax highlighting support

2018-08-08 Thread GitBox
pritidesai closed pull request #287: Fix terminal style and add code syntax 
highlighting support
URL: https://github.com/apache/incubator-openwhisk-website/pull/287
 
 
   

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/_scss/_base.scss b/_scss/_base.scss
index 257136f..55c353c 100644
--- a/_scss/_base.scss
+++ b/_scss/_base.scss
@@ -39,14 +39,6 @@ footer {
   padding: $whisk-footer-base-padding-base;
 }
 
-// Note: options: white-space: normal|nowrap|pre|pre-line|pre-wrap
-// Note: non-std. options:  white-space: -moz-pre-wrap | -o-pre-wrap;
-pre {
-  white-space: pre;
-  display: inline;
-  margin: 0px;
-}
-
 .header {
   display: flex;
   justify-content: space-evenly;
@@ -145,21 +137,6 @@ pre {
   padding: 0px;
 }
 
-// TODO: move sizes to variables.
-.terminal {
-  background: $color-terminal-bg;
-  color: $color-terminal-fg;
-  border: 1px solid $color-terminal-border;
-  font-family: $font-family-code;
-  font-weight: 300;
-  font-size: 14px;
-  line-height: 140%;
-  // top right bottom left
-  padding: 4px 4px 4px 8px;
-  max-width: 700px;
-  margin-bottom: 10px;
-}
-
 // Header is only shown on the "home" page
 #whiskHeader {
   background-color: $color-blue-dark;
diff --git a/_scss/_highlite-syntax-colors.scss 
b/_scss/_highlite-syntax-colors.scss
new file mode 100644
index 000..b6fa748
--- /dev/null
+++ b/_scss/_highlite-syntax-colors.scss
@@ -0,0 +1,69 @@
+.highlight .hll { background-color: inherit; font-family: inherit; }
+.highlight  { background: inherit; font-family: inherit;}
+.highlight .c { color: #99AA8A } /* Comment */
+.highlight .err { color: #960050; background-color: inherit } /* Error */
+.highlight .k { color: #93C763; font-weight: 400 } /* Keyword */
+.highlight .o { color: #E8E2B7 } /* Operator */
+.highlight .ch { color: #99AA8A } /* Comment.Hashbang */
+.highlight .cm { color: #99AA8A } /* Comment.Multiline */
+.highlight .cp { color: #99AA8A } /* Comment.Preproc */
+.highlight .cpf { color: #99AA8A } /* Comment.PreprocFile */
+.highlight .c1 { color: #99AA8A } /* Comment.Single */
+.highlight .cs { color: #99AA8A; font-weight: 400 } /* Comment.Special */
+.highlight .gd { color: #A0 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gr { color: #FF } /* Generic.Error */
+.highlight .gh { color: #80; font-weight: 400 } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #99AA8A } /* Generic.Output */
+.highlight .gp { color: #c65d09; font-weight: 400 } /* Generic.Prompt */
+.highlight .gs { font-weight: 400 } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: 400 } /* Generic.Subheading */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
+.highlight .kc { color: #93C763; font-weight: 400 } /* Keyword.Constant */
+.highlight .kd { color: #93C763; font-weight: 400 } /* Keyword.Declaration */
+.highlight .kn { color: #E8E2B7; font-weight: 400 } /* Keyword.Namespace */
+.highlight .kp { color: #003388; font-weight: 400 } /* Keyword.Pseudo */
+.highlight .kr { color: #93C763; font-weight: 400 } /* Keyword.Reserved */
+.highlight .kt { color: #83D8E1; font-weight: 400 } /* Keyword.Type */
+.highlight .m { color: #6600EE; font-weight: 400 } /* Literal.Number */
+.highlight .s { color: #EC7600; background-color: inherit } /* Literal.String 
*/
+.highlight .na { color: #678CB1 } /* Name.Attribute */
+.highlight .nb { color: #007020 } /* Name.Builtin */
+.highlight .nc { color: #678CB1; font-weight: 400 } /* Name.Class */
+.highlight .no { color: #003366; font-weight: 400 } /* Name.Constant */
+.highlight .nd { color: #55; font-weight: 400 } /* Name.Decorator */
+.highlight .ni { color: #88; font-weight: 400 } /* Name.Entity */
+.highlight .ne { color: #FF; font-weight: 400 } /* Name.Exception */
+.highlight .nf { color: #0066BB; font-weight: 400 } /* Name.Function */
+.highlight .nl { color: #997700; font-weight: 400 } /* Name.Label */
+.highlight .nn { color: #0e84b5; font-weight: 400 } /* Name.Namespace */
+.highlight .nt { color: #007700 } /* Name.Tag */
+.highlight .nv { color: #996633 } /* Name.Variable */
+.highlight .ow { color: #00; font-weight: 400 } /* Operator.Word */
+.highlight .w { color: #bb } /* Text.Whitespace */
+.highlight .mb { color: #6600EE; font-weight: 400 } /* Literal.Number.Bin */
+.highlight .mf { color: #6600EE; font-weight: 400 } /* Literal.Number.Float */
+.highlight .mh { color: #005588; font-weight: 400 } /* Literal.Number.Hex */
+.highlight .mi { color: #DD; font-weight: 400 } /* Literal.Number.Integer 
*/
+.highlight .mo { color: #4400EE; font-weight: 400 } /* Literal.Number.Oct */
+.highlight .sa { background-color: inherit } /* Literal.String.Affix */

[GitHub] pritidesai opened a new pull request #288: Importing code from scripts instead of hardcoding in html file

2018-08-08 Thread GitBox
pritidesai opened a new pull request #288: Importing code from scripts instead 
of hardcoding in html file
URL: https://github.com/apache/incubator-openwhisk-website/pull/288
 
 
   


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 #287: Fix terminal style and add code syntax highlighting support

2018-08-08 Thread GitBox
mrutkows opened a new pull request #287: Fix terminal style and add code syntax 
highlighting support
URL: https://github.com/apache/incubator-openwhisk-website/pull/287
 
 
   


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] Juice10 opened a new pull request #286: Fix spacing between logo and buttons in header

2018-08-08 Thread GitBox
Juice10 opened a new pull request #286: Fix spacing between logo and buttons in 
header
URL: https://github.com/apache/incubator-openwhisk-website/pull/286
 
 
   Currently the spacing between the logo on the left and the social icons on 
the right is not the same. This pull request fixes that and adds equal spacing 
to all elements in the header.
   
   As a bonus it also gives the terminals (code example blocks) a max-width 
making sure they don't invoke a horizontal scroll on lower screen resolutions.
   
   First original website, then my fix shown below.
   
![compare-header1](https://user-images.githubusercontent.com/4106/43866049-715c9e0e-9b32-11e8-95c5-031181eb3674.gif)
   [High res version of video 
above](https://monosnap.com/file/f0G1PxwDUmac7fVrlT82BWLEFhzMmW)
   


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] ddragosd commented on issue #139: Meet minio file access denied when waiting for the controller

2018-08-08 Thread GitBox
ddragosd commented on issue #139: Meet minio file access denied when waiting 
for the controller
URL: 
https://github.com/apache/incubator-openwhisk-devtools/issues/139#issuecomment-411557644
 
 
   > the message "Access Denied" persists
   
   This is actually OK, as the script waits for docker container to come up and 
there's a curl command that waits until the container responds with 200. See 
https://github.com/apache/incubator-openwhisk-devtools/blob/master/docker-compose/Makefile#L181
 
   It's unfortunately confusing when debugging errors b/c this one pops up. 
Probably another option would be to `sleep 5` first, and then to the `curl`, 
hoping that in most of the cases the system is fast enough to start the 
container within `5s` ...


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] ddragosd commented on issue #2: integrate the openwhisk apigateway docker container

2018-08-08 Thread GitBox
ddragosd commented on issue #2: integrate the openwhisk apigateway docker 
container
URL: 
https://github.com/apache/incubator-openwhisk-devtools/issues/2#issuecomment-411555984
 
 
   Yes. And thanks for cleaning the issues @chetanmeh !


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] ddragosd closed issue #2: integrate the openwhisk apigateway docker container

2018-08-08 Thread GitBox
ddragosd closed issue #2: integrate the openwhisk apigateway docker container
URL: https://github.com/apache/incubator-openwhisk-devtools/issues/2
 
 
   


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] dubee commented on issue #3798: Allow for activation store to accept user and request information

2018-08-08 Thread GitBox
dubee commented on issue #3798: Allow for activation store to accept user and 
request information
URL: 
https://github.com/apache/incubator-openwhisk/pull/3798#issuecomment-411554929
 
 
   PG4 2057  


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 #77: update Changelogs for PR #73

2018-08-08 Thread GitBox
csantanapr closed pull request #77: update Changelogs for PR #73
URL: https://github.com/apache/incubator-openwhisk-runtime-nodejs/pull/77
 
 
   

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/core/nodejs6Action/CHANGELOG.md b/core/nodejs6Action/CHANGELOG.md
index 369a5b9..e986414 100644
--- a/core/nodejs6Action/CHANGELOG.md
+++ b/core/nodejs6Action/CHANGELOG.md
@@ -19,6 +19,11 @@
 
 # NodeJS 6 OpenWhisk Runtime Container
 
+## 1.11.1
+Change: Update runtime to put runtime npm modules at root level, user npm 
modules at container invocation level
+
+- Don't override runtime npm packages when user provides their own 
[#73](https://github.com/apache/incubator-openwhisk-runtime-nodejs/pull/73/files)
+
 ## 1.11.0
 Change: Update runtime to work in concurrent mode
 
diff --git a/core/nodejs8Action/CHANGELOG.md b/core/nodejs8Action/CHANGELOG.md
index 9cb6d84..b947b26 100644
--- a/core/nodejs8Action/CHANGELOG.md
+++ b/core/nodejs8Action/CHANGELOG.md
@@ -19,6 +19,11 @@
 
 # NodeJS 8 OpenWhisk Runtime Container
 
+## 1.8.1
+Change: Update runtime to put runtime npm modules at root level, user npm 
modules at container invocation level
+
+- Don't override runtime npm packages when user provides their own 
[#73](https://github.com/apache/incubator-openwhisk-runtime-nodejs/pull/73/files)
+
 ## 1.8.0
 Change: Update runtime to work in concurrent mode
 


 


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 closed pull request #285: adding scripts/manifest

2018-08-08 Thread GitBox
pritidesai closed pull request #285: adding scripts/manifest
URL: https://github.com/apache/incubator-openwhisk-website/pull/285
 
 
   

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/code/Hello.java b/code/Hello.java
new file mode 100644
index 000..516c1d0
--- /dev/null
+++ b/code/Hello.java
@@ -0,0 +1,19 @@
+package hello;
+
+import com.google.gson.JsonObject;
+
+public class Hello {
+public static JsonObject main(JsonObject args)
+String name;
+
+try {
+name = args.getAsJsonPrimitive("name").getAsString();
+} catch(Exception e) {
+name = "stranger";
+}
+
+JsonObject response = new JsonObject();
+response.addProperty("greeting", "Hello " + name + "!");
+return response;
+}
+}
diff --git a/code/hello-with-params.js b/code/hello-with-params.js
new file mode 100644
index 000..6fb00e3
--- /dev/null
+++ b/code/hello-with-params.js
@@ -0,0 +1,3 @@
+function main(params) {
+return {payload: 'Hello, ' + params.name + ' from ' + params.place};
+}
diff --git a/code/hello.go b/code/hello.go
new file mode 100644
index 000..149c22b
--- /dev/null
+++ b/code/hello.go
@@ -0,0 +1,25 @@
+package main
+
+import "encoding/json"
+import "fmt"
+import "os"
+
+func main() {
+//program receives one argument: the JSON object as a string
+arg := os.Args[1]
+
+// unmarshal the string to a JSON object
+var obj map[string]interface{}
+json.Unmarshal([]byte(arg), )
+
+// can optionally log to stdout (or stderr)
+fmt.Println("hello Go action")
+
+name, ok := obj["name"].(string)
+if !ok { name = "Stranger" }
+
+// last line of stdout is the result JSON object as a string
+msg := map[string]string{"msg": ("Hello, " + name + "!")}
+res, _ := json.Marshal(msg)
+fmt.Println(string(res))
+}
diff --git a/code/hello.js b/code/hello.js
new file mode 100644
index 000..685fd4e
--- /dev/null
+++ b/code/hello.js
@@ -0,0 +1,3 @@
+function main() {
+return {payload: 'Hello world'};
+}
diff --git a/code/hello.php b/code/hello.php
new file mode 100644
index 000..ce75126
--- /dev/null
+++ b/code/hello.php
@@ -0,0 +1,8 @@
+ $greeting];
+}
diff --git a/code/hello.py b/code/hello.py
new file mode 100644
index 000..eb436b7
--- /dev/null
+++ b/code/hello.py
@@ -0,0 +1,8 @@
+def main(dict):
+if 'name' in dict:
+name = dict['name']
+else:
+name = "stranger"
+greeting = "Hello " + name + "!"
+print(greeting)
+return {"greeting": greeting}
diff --git a/code/manifest-for-helloJS-1.yaml b/code/manifest-for-helloJS-1.yaml
new file mode 100644
index 000..c5a2d5a
--- /dev/null
+++ b/code/manifest-for-helloJS-1.yaml
@@ -0,0 +1,5 @@
+packages:
+default:
+actions:
+helloJS:
+function: hello.js
diff --git a/code/manifest-for-helloJS-2.yaml b/code/manifest-for-helloJS-2.yaml
new file mode 100644
index 000..e01efb1
--- /dev/null
+++ b/code/manifest-for-helloJS-2.yaml
@@ -0,0 +1,10 @@
+packages:
+default:
+actions:
+helloJS:
+code: |
+function main() {
+return {payload: 'Hello world'};
+}
+runtime: nodejs:6
+
diff --git a/code/manifest-for-helloPhp-1.yaml 
b/code/manifest-for-helloPhp-1.yaml
new file mode 100644
index 000..aa84921
--- /dev/null
+++ b/code/manifest-for-helloPhp-1.yaml
@@ -0,0 +1,5 @@
+packages:
+default:
+actions:
+helloPHP:
+function: hello.php
diff --git a/code/manifest-for-helloPhp-2.yaml 
b/code/manifest-for-helloPhp-2.yaml
new file mode 100644
index 000..55d2e2e
--- /dev/null
+++ b/code/manifest-for-helloPhp-2.yaml
@@ -0,0 +1,14 @@
+packages:
+default:
+actions:
+helloPHP:
+code: |
+ $greeting];
+}
+runtime: php:7.1
diff --git a/code/manifest-for-helloPy-1.yaml b/code/manifest-for-helloPy-1.yaml
new file mode 100644
index 000..baf767b
--- /dev/null
+++ b/code/manifest-for-helloPy-1.yaml
@@ -0,0 +1,5 @@
+packages:
+default:
+actions:
+helloPy:
+function: hello.py
diff --git a/code/manifest-for-helloPy-2.yaml b/code/manifest-for-helloPy-2.yaml
new file mode 100644
index 000..ed10e9f
--- /dev/null
+++ b/code/manifest-for-helloPy-2.yaml
@@ -0,0 +1,15 @@
+packages:
+default:
+actions:
+helloPy:
+code: |
+import sys
+def main(dict):
+if 'name' in dict:
+name = dict['name']
+else:
+name = 

[GitHub] csantanapr closed pull request #3954: Add Twitter badge

2018-08-08 Thread GitBox
csantanapr closed pull request #3954: Add Twitter badge
URL: https://github.com/apache/incubator-openwhisk/pull/3954
 
 
   

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 35e99f1d7c..821d0773e0 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,7 @@
 
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
 [![Join 
Slack](https://img.shields.io/badge/join-slack-9B69A0.svg)](http://slack.openwhisk.org/)
 
[![codecov](https://codecov.io/gh/apache/incubator-openwhisk/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/incubator-openwhisk)
+[![Twitter](https://img.shields.io/twitter/follow/openwhisk.svg?style=social=twitter)](https://twitter.com/intent/follow?screen_name=openwhisk)
 
 OpenWhisk is a cloud-first distributed event-based programming service. It 
provides a programming model to upload event handlers to a cloud service, and 
register the handlers to respond to various events. Learn more at 
[http://openwhisk.incubator.apache.org](http://openwhisk.incubator.apache.org).
 


 


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] codecov-io commented on issue #3954: Add Twitter badge

2018-08-08 Thread GitBox
codecov-io commented on issue #3954: Add Twitter badge
URL: 
https://github.com/apache/incubator-openwhisk/pull/3954#issuecomment-411529587
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954?src=pr=h1)
 Report
   > Merging 
[#3954](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-openwhisk/commit/b1a70b7219fb040d8116f278726e86efc7330071?src=pr=desc)
 will **decrease** coverage by `4.69%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954/graphs/tree.svg?src=pr=650=l0YmsiSAso=150)](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954?src=pr=tree)
   
   ```diff
   @@Coverage Diff@@
   ##   master#3954 +/-   ##
   =
   - Coverage   85.46%   80.77%   -4.7% 
   =
 Files 146  146 
 Lines7057 7057 
 Branches  420  420 
   =
   - Hits 6031 5700-331 
   - Misses   1026 1357+331
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[...core/database/cosmosdb/RxObservableImplicits.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvUnhPYnNlcnZhYmxlSW1wbGljaXRzLnNjYWxh)
 | `0% <0%> (-100%)` | :arrow_down: |
   | 
[...core/database/cosmosdb/CosmosDBArtifactStore.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJBcnRpZmFjdFN0b3JlLnNjYWxh)
 | `0% <0%> (-95.1%)` | :arrow_down: |
   | 
[...sk/core/database/cosmosdb/CosmosDBViewMapper.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJWaWV3TWFwcGVyLnNjYWxh)
 | `0% <0%> (-92.6%)` | :arrow_down: |
   | 
[...whisk/core/database/cosmosdb/CosmosDBSupport.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJTdXBwb3J0LnNjYWxh)
 | `0% <0%> (-81.82%)` | :arrow_down: |
   | 
[...abase/cosmosdb/CosmosDBArtifactStoreProvider.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJBcnRpZmFjdFN0b3JlUHJvdmlkZXIuc2NhbGE=)
 | `0% <0%> (-58.83%)` | :arrow_down: |
   | 
[...la/whisk/core/database/cosmosdb/CosmosDBUtil.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJVdGlsLnNjYWxh)
 | `92% <0%> (-4%)` | :arrow_down: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954?src=pr=footer).
 Last update 
[b1a70b7...e012412](https://codecov.io/gh/apache/incubator-openwhisk/pull/3954?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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] dubee commented on a change in pull request #3941: to address #3918, reuse a container on applicationError

2018-08-08 Thread GitBox
dubee commented on a change in pull request #3941: to address #3918, reuse a 
container on applicationError
URL: 
https://github.com/apache/incubator-openwhisk/pull/3941#discussion_r208698819
 
 

 ##
 File path: 
core/invoker/src/main/scala/whisk/core/containerpool/ContainerProxy.scala
 ##
 @@ -419,9 +419,10 @@ class ContainerProxy(
 
 // Disambiguate activation errors and transform the Either into a 
failed/successful Future respectively.
 activationWithLogs.flatMap {
-  case Right(act) if !act.response.isSuccess => 
Future.failed(ActivationUnsuccessfulError(act))
-  case Left(error)   => Future.failed(error)
-  case Right(act)=> Future.successful(act)
+  case Right(act) if !act.response.isSuccess && 
!act.response.isApplicationError =>
 
 Review comment:
   @tysonnorris, is it possible to just check for 
`!act.response.isApplicationError` here instead? Not sure if 
`!act.response.isSuccess` is needed.


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] dubee commented on a change in pull request #3941: to address #3918, reuse a container on applicationError

2018-08-08 Thread GitBox
dubee commented on a change in pull request #3941: to address #3918, reuse a 
container on applicationError
URL: 
https://github.com/apache/incubator-openwhisk/pull/3941#discussion_r208698819
 
 

 ##
 File path: 
core/invoker/src/main/scala/whisk/core/containerpool/ContainerProxy.scala
 ##
 @@ -419,9 +419,10 @@ class ContainerProxy(
 
 // Disambiguate activation errors and transform the Either into a 
failed/successful Future respectively.
 activationWithLogs.flatMap {
-  case Right(act) if !act.response.isSuccess => 
Future.failed(ActivationUnsuccessfulError(act))
-  case Left(error)   => Future.failed(error)
-  case Right(act)=> Future.successful(act)
+  case Right(act) if !act.response.isSuccess && 
!act.response.isApplicationError =>
 
 Review comment:
   @tysonnorris, is it possible to just check for 
`!act.response.isApplicationError` here instead? Not sure if 
`!act.response.isSuccess` is needed.


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] dubee commented on a change in pull request #3941: to address #3918, reuse a container on applicationError

2018-08-08 Thread GitBox
dubee commented on a change in pull request #3941: to address #3918, reuse a 
container on applicationError
URL: 
https://github.com/apache/incubator-openwhisk/pull/3941#discussion_r208698819
 
 

 ##
 File path: 
core/invoker/src/main/scala/whisk/core/containerpool/ContainerProxy.scala
 ##
 @@ -419,9 +419,10 @@ class ContainerProxy(
 
 // Disambiguate activation errors and transform the Either into a 
failed/successful Future respectively.
 activationWithLogs.flatMap {
-  case Right(act) if !act.response.isSuccess => 
Future.failed(ActivationUnsuccessfulError(act))
-  case Left(error)   => Future.failed(error)
-  case Right(act)=> Future.successful(act)
+  case Right(act) if !act.response.isSuccess && 
!act.response.isApplicationError =>
 
 Review comment:
   @tysonnorris, is it possible to just check for 
`!act.response.isApplicationError` here instead?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eweiter opened a new pull request #77: update Changelogs for PR #73

2018-08-08 Thread GitBox
eweiter opened a new pull request #77: update Changelogs for PR #73
URL: https://github.com/apache/incubator-openwhisk-runtime-nodejs/pull/77
 
 
   This updates the Changelog files to document the change that occurred in 
pull request #73 


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] dubee opened a new pull request #3954: Add Twitter badge

2018-08-08 Thread GitBox
dubee opened a new pull request #3954: Add Twitter badge
URL: https://github.com/apache/incubator-openwhisk/pull/3954
 
 
   
   
   ## Description
   
   
   Adds a twitter badge to the README that shows number of follows. When the 
badge is clicked, the user will be redirect to a follow page.
   
   ## Related issue and scope
   
   - [ ] I opened an issue to propose and discuss this change (#)
   
   ## My changes affect the following components
   
   
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   
   - [ ] Bug fix (generally a non-breaking change which closes an issue).
   - [ ] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing 
behavior).
   
   ## Checklist:
   
   
   - [ ] I signed an [Apache 
CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [ ] I reviewed the [style 
guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness)
 and followed the recommendations (Travis CI will check :).
   - [ ] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   
   


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] dubee opened a new issue #3953: Improve README

2018-08-08 Thread GitBox
dubee opened a new issue #3953: Improve README
URL: https://github.com/apache/incubator-openwhisk/issues/3953
 
 
   Here are some ideas to improve the README:
   - Add demo gifs and/or videos
   - Add a twitter badge


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] codecov-io edited a comment on issue #3798: Allow for activation store to accept user and request information

2018-08-08 Thread GitBox
codecov-io edited a comment on issue #3798: Allow for activation store to 
accept user and request information
URL: 
https://github.com/apache/incubator-openwhisk/pull/3798#issuecomment-399226990
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798?src=pr=h1)
 Report
   > Merging 
[#3798](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-openwhisk/commit/92a4a0c314821681043716cc601b64d543f61e80?src=pr=desc)
 will **decrease** coverage by `4.65%`.
   > The diff coverage is `93.54%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798/graphs/tree.svg?token=l0YmsiSAso=150=pr=650)](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798?src=pr=tree)
   
   ```diff
   @@Coverage Diff@@
   ##   master   #3798  +/-   ##
   =
   - Coverage   85.46%   80.8%   -4.66% 
   =
 Files 146 146  
 Lines70577066   +9 
 Branches  420 426   +6 
   =
   - Hits 60315710 -321 
   - Misses   10261356 +330
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[...core/containerpool/logging/LogDriverLogStore.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvY29udGFpbmVycG9vbC9sb2dnaW5nL0xvZ0RyaXZlckxvZ1N0b3JlLnNjYWxh)
 | `25% <ø> (ø)` | :arrow_up: |
   | 
[...sk/core/containerpool/logging/SplunkLogStore.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvY29udGFpbmVycG9vbC9sb2dnaW5nL1NwbHVua0xvZ1N0b3JlLnNjYWxh)
 | `86.95% <ø> (ø)` | :arrow_up: |
   | 
[.../whisk/core/database/ArtifactActivationStore.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvQXJ0aWZhY3RBY3RpdmF0aW9uU3RvcmUuc2NhbGE=)
 | `92.85% <ø> (ø)` | :arrow_up: |
   | 
[...ainerpool/logging/DockerToActivationLogStore.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvY29udGFpbmVycG9vbC9sb2dnaW5nL0RvY2tlclRvQWN0aXZhdGlvbkxvZ1N0b3JlLnNjYWxh)
 | `100% <ø> (ø)` | :arrow_up: |
   | 
[.../containerpool/logging/ElasticSearchLogStore.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvY29udGFpbmVycG9vbC9sb2dnaW5nL0VsYXN0aWNTZWFyY2hMb2dTdG9yZS5zY2FsYQ==)
 | `96.15% <100%> (ø)` | :arrow_up: |
   | 
[...hisk/core/controller/actions/SequenceActions.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798/diff?src=pr=tree#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvY29udHJvbGxlci9hY3Rpb25zL1NlcXVlbmNlQWN0aW9ucy5zY2FsYQ==)
 | `94.49% <100%> (+0.05%)` | :arrow_up: |
   | 
[...cala/whisk/core/containerpool/ContainerProxy.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798/diff?src=pr=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQcm94eS5zY2FsYQ==)
 | `93.82% <100%> (+0.07%)` | :arrow_up: |
   | 
[...ain/scala/whisk/core/invoker/InvokerReactive.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798/diff?src=pr=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvaW52b2tlci9JbnZva2VyUmVhY3RpdmUuc2NhbGE=)
 | `74.16% <100%> (+0.21%)` | :arrow_up: |
   | 
[...isk/core/controller/actions/PrimitiveActions.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798/diff?src=pr=tree#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvY29udHJvbGxlci9hY3Rpb25zL1ByaW1pdGl2ZUFjdGlvbnMuc2NhbGE=)
 | `89.31% <85.71%> (+0.16%)` | :arrow_up: |
   | 
[...main/scala/whisk/core/controller/Activations.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798/diff?src=pr=tree#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvY29udHJvbGxlci9BY3RpdmF0aW9ucy5zY2FsYQ==)
 | `96.66% <87.5%> (+0.05%)` | :arrow_up: |
   | ... and [8 
more](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-openwhisk/pull/3798?src=pr=footer).
 Last update 

[GitHub] pritidesai opened a new pull request #285: adding scripts/manifest

2018-08-08 Thread GitBox
pritidesai opened a new pull request #285: adding scripts/manifest
URL: https://github.com/apache/incubator-openwhisk-website/pull/285
 
 
   Partially fixing issue #269 


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 #3946: update documentation for nodejs runtime

2018-08-08 Thread GitBox
csantanapr closed pull request #3946: update documentation for nodejs runtime
URL: https://github.com/apache/incubator-openwhisk/pull/3946
 
 
   

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/docs/actions-node.md b/docs/actions-node.md
index 961834ef8e..7dfefbe368 100644
--- a/docs/actions-node.md
+++ b/docs/actions-node.md
@@ -358,7 +358,7 @@ The following packages are available to be used in the 
Node.js 6.14.2 environmen
 - [node-uuid v1.4.7](https://www.npmjs.com/package/node-uuid) - Deprecated 
UUID packaged.
 - [nodemailer v2.6.4](https://www.npmjs.com/package/nodemailer) - Send e-mails 
from Node.js – easy as cake!
 - [oauth2-server v2.4.1](https://www.npmjs.com/package/oauth2-server) - 
Complete, compliant, and well tested module for implementing an OAuth2 
Server/Provider with express in Node.js.
-- [openwhisk v3.15.0](https://www.npmjs.com/package/openwhisk) - JavaScript 
client library for the OpenWhisk platform. Provides a wrapper around the 
OpenWhisk APIs.
+- [openwhisk v3.16.0](https://www.npmjs.com/package/openwhisk) - JavaScript 
client library for the OpenWhisk platform. Provides a wrapper around the 
OpenWhisk APIs.
 - [pkgcloud v1.4.0](https://www.npmjs.com/package/pkgcloud) - pkgcloud is a 
standard library for Node.js that abstracts away differences among multiple 
cloud providers.
 - [process v0.11.9](https://www.npmjs.com/package/process) - 
Require('process'); just like any other module.
 - [pug v2.0.0-beta6](https://www.npmjs.com/package/pug) - Implements the Pug 
templating language.
@@ -391,7 +391,7 @@ The Node.js version 8.11.2 environment is used if the 
`--kind` flag is explicitl
 
 The following packages are pre-installed in the Node.js version 8.11.2 
environment:
 
-- [openwhisk v3.15.0](https://www.npmjs.com/package/openwhisk) - JavaScript 
client library for the OpenWhisk platform. Provides a wrapper around the 
OpenWhisk APIs.
+- [openwhisk v3.16.0](https://www.npmjs.com/package/openwhisk) - JavaScript 
client library for the OpenWhisk platform. Provides a wrapper around the 
OpenWhisk APIs.
 
 ### Packaging npm packages with your actions
 For any `npm` packages that are not pre-installed in the Node.js environment, 
you can bundle them as dependencies when you create or update your action.


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] tysonnorris commented on issue #3687: Concurrency limit per action

2018-08-08 Thread GitBox
tysonnorris commented on issue #3687: Concurrency limit per action
URL: 
https://github.com/apache/incubator-openwhisk/pull/3687#issuecomment-411498213
 
 
   Closing this PR, and rolling these changes into #2795 (since these changes 
are required in any case, to make concurrency configs useful)


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] asteed commented on a change in pull request #3661: Restrict allowed namespaces when creating action of certain kinds

2018-08-08 Thread GitBox
asteed commented on a change in pull request #3661: Restrict allowed namespaces 
when creating action of certain kinds
URL: 
https://github.com/apache/incubator-openwhisk/pull/3661#discussion_r208672247
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Actions.scala
 ##
 @@ -118,15 +118,19 @@ trait WhiskActionsApi extends WhiskCollectionAPI with 
PostActionActivation with
   protected override def innerRoutes(user: Identity, ns: EntityPath)(implicit 
transid: TransactionId) = {
 (entityPrefix & entityOps & requestMethod) { (segment, m) =>
   entityname(segment) { outername =>
-pathEnd {
+(pathEnd & put & entity(as[WhiskActionPut])) { (content) =>
 
 Review comment:
   @rabbah the issue at hand was to be able to extract the request payload 
(specifically for the `kind` property) and marshall it into 
`entitlementProvider.checkResource` so that it can be used to determine the 
kind at the time of action creation. I'd appreciate any guidance if you know of 
any alternatives to this approach


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 #73: Don't override runtime npm packages when user provides their own

2018-08-08 Thread GitBox
csantanapr closed pull request #73: Don't override runtime npm packages when 
user provides their own
URL: https://github.com/apache/incubator-openwhisk-runtime-nodejs/pull/73
 
 
   

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/.gitignore b/.gitignore
index 52f108d..0bc5144 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,6 +65,7 @@ ansible/roles/nginx/files/*cert.pem
 *.zip
 !tests/dat/actions/blackbox.zip
 !tests/dat/actions/helloSwift.zip
+!tests/dat/actions/nodejs-test.zip
 !tests/dat/actions/python.zip
 !tests/dat/actions/python2_virtualenv.zip
 !tests/dat/actions/python3_virtualenv.zip
diff --git a/core/nodejs6Action/Dockerfile b/core/nodejs6Action/Dockerfile
index 3cb7ac0..bd55807 100644
--- a/core/nodejs6Action/Dockerfile
+++ b/core/nodejs6Action/Dockerfile
@@ -33,9 +33,9 @@ WORKDIR /nodejsAction
 
 # Install app dependencies
 RUN rm -rf .project .settings build.xml Dockerfile README node_modules logs
-RUN npm install .
-
-RUN npm install \
+RUN cd / && npm install .
+# In nodejsActionBase we copied the package.json file to the root of the 
container, this is what we are installing here, as to not be overriden by user 
set packages
+RUN cd / && npm install --no-package-lock \
 apn@2.1.2 \
 async@2.1.4 \
 body-parser@1.15.2 \
diff --git a/core/nodejs8Action/Dockerfile b/core/nodejs8Action/Dockerfile
index 3f56b96..c497a56 100644
--- a/core/nodejs8Action/Dockerfile
+++ b/core/nodejs8Action/Dockerfile
@@ -22,7 +22,9 @@ RUN apt-get update && apt-get install -y \
 && rm -rf /var/lib/apt/lists/*
 WORKDIR /nodejsAction
 COPY . .
-RUN npm install \
+# COPY the package.json to root container, so we can install npm packages a 
level up from user's packages, so user's packages take precedence
+COPY ./package.json /
+RUN cd / && npm install --no-package-lock \
 && npm cache clean --force
 EXPOSE 8080
 CMD node --expose-gc app.js
diff --git a/core/nodejsActionBase/.dockerignore 
b/core/nodejsActionBase/.dockerignore
deleted file mode 100644
index 6df164e..000
--- a/core/nodejsActionBase/.dockerignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Dockerfile
-build.gradle
diff --git a/core/nodejsActionBase/Dockerfile b/core/nodejsActionBase/Dockerfile
index a46360e..2c8c04d 100644
--- a/core/nodejsActionBase/Dockerfile
+++ b/core/nodejsActionBase/Dockerfile
@@ -23,3 +23,5 @@ ENV DEBIAN_FRONTEND noninteractive
 RUN apt-get update && apt-get install -y imagemagick && apt-get install -y 
unzip
 
 ADD . /nodejsAction
+# COPY the package.json to root container, so we can install npm packages a 
level up from user's packages, so user's packages take precedence
+COPY ./package.json /
diff --git a/settings.gradle b/settings.gradle
index c2bf195..e0f26b4 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -19,8 +19,9 @@ include 'tests'
 
 include 'core:nodejsActionBase'
 include 'core:nodejs6Action'
-
 include 'core:nodejs8Action'
+include 'tests:dat:docker:nodejs6docker'
+include 'tests:dat:docker:nodejs8docker'
 
 rootProject.name = 'runtime-nodejs'
 
diff --git a/tests/dat/actions/nodejs-test.zip 
b/tests/dat/actions/nodejs-test.zip
new file mode 100644
index 000..a0bfa23
Binary files /dev/null and b/tests/dat/actions/nodejs-test.zip differ
diff --git a/tests/dat/docker/nodejs6docker/Dockerfile 
b/tests/dat/docker/nodejs6docker/Dockerfile
new file mode 100644
index 000..63a26e1
--- /dev/null
+++ b/tests/dat/docker/nodejs6docker/Dockerfile
@@ -0,0 +1,3 @@
+FROM nodejs6action
+COPY package.json .
+RUN npm install --production
\ No newline at end of file
diff --git a/tests/dat/docker/nodejs6docker/build.gradle 
b/tests/dat/docker/nodejs6docker/build.gradle
new file mode 100644
index 000..4e4b018
--- /dev/null
+++ b/tests/dat/docker/nodejs6docker/build.gradle
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+
+ext.dockerImageName = 'nodejs6docker'
+apply from: '../../../../gradle/docker.gradle'
diff --git a/tests/dat/docker/nodejs6docker/package.json 
b/tests/dat/docker/nodejs6docker/package.json
new file 

[GitHub] dubee commented on issue #3798: Allow for activation store to accept user and request information

2018-08-08 Thread GitBox
dubee commented on issue #3798: Allow for activation store to accept user and 
request information
URL: 
https://github.com/apache/incubator-openwhisk/pull/3798#issuecomment-411488668
 
 
   Added UserContext in the third commit. The case class definition should 
probably be moved elsewhere though.


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 issue #3906: Correct documentation to setup database.

2018-08-08 Thread GitBox
mdeuser commented on issue #3906: Correct documentation to setup database.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3906#issuecomment-411476656
 
 
   @cbickel - i also believe the cloudant instances will not have the `_users` 
database defined.  i ran into this and had to manually create the `_users` 
database.  i suppose ansible could create that if it does not exist.
   
   
https://stackoverflow.com/questions/18039704/cloudant-auth-lacks-users-database


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] dubee commented on issue #3798: Allow for activation store to accept user and request information

2018-08-08 Thread GitBox
dubee commented on issue #3798: Allow for activation store to accept user and 
request information
URL: 
https://github.com/apache/incubator-openwhisk/pull/3798#issuecomment-411457977
 
 
   @chetanmeh, where do you think the UserContext case class should live?


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] chetanmeh opened a new issue #3952: Update Scala to 2.12

2018-08-08 Thread GitBox
chetanmeh opened a new issue #3952: Update Scala to 2.12
URL: https://github.com/apache/incubator-openwhisk/issues/3952
 
 
   Currently OpenWhisk uses Scala 2.11.11. We should switch to [Scala 
2.12.6][1] which is current latest stable release. See [here][3] for details on 
all changes.
   
   This change would require some coordination as we would need to move all 
other modules to move to Scala 2.12 at same time
   
   ## TODO
   
   - [ ] - `mesos-actor` needs to have a version based on 2.12
   - [ ] - Create PR for all other modules which depend on core module
   
   
   [1]: https://github.com/scala/scala/releases/tag/v2.12.6
   [2]: https://github.com/scala/scala/releases/v2.12.0
   [3]: https://www.scala-lang.org/news/2.12.0/


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] codecov-io edited a comment on issue #3698: Make amount of parallel docker runs configurable.

2018-08-08 Thread GitBox
codecov-io edited a comment on issue #3698: Make amount of parallel docker runs 
configurable.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3698#issuecomment-392048718
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698?src=pr=h1)
 Report
   > Merging 
[#3698](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698?src=pr=desc)
 into 
[master](https://codecov.io/gh/apache/incubator-openwhisk/commit/92a4a0c314821681043716cc601b64d543f61e80?src=pr=desc)
 will **decrease** coverage by `4.69%`.
   > The diff coverage is `90.9%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698/graphs/tree.svg?src=pr=650=l0YmsiSAso=150)](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698?src=pr=tree)
   
   ```diff
   @@Coverage Diff@@
   ##   master#3698 +/-   ##
   =
   - Coverage   85.46%   80.77%   -4.7% 
   =
 Files 146  146 
 Lines7057 7057 
 Branches  420  422  +2 
   =
   - Hits 6031 5700-331 
   - Misses   1026 1357+331
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[.../scala/src/main/scala/whisk/core/WhiskConfig.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvV2hpc2tDb25maWcuc2NhbGE=)
 | `94.26% <100%> (ø)` | :arrow_up: |
   | 
[...whisk/core/containerpool/docker/DockerClient.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698/diff?src=pr=tree#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvY29udGFpbmVycG9vbC9kb2NrZXIvRG9ja2VyQ2xpZW50LnNjYWxh)
 | `95.74% <90%> (ø)` | :arrow_up: |
   | 
[...core/database/cosmosdb/RxObservableImplicits.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvUnhPYnNlcnZhYmxlSW1wbGljaXRzLnNjYWxh)
 | `0% <0%> (-100%)` | :arrow_down: |
   | 
[...core/database/cosmosdb/CosmosDBArtifactStore.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJBcnRpZmFjdFN0b3JlLnNjYWxh)
 | `0% <0%> (-95.1%)` | :arrow_down: |
   | 
[...sk/core/database/cosmosdb/CosmosDBViewMapper.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJWaWV3TWFwcGVyLnNjYWxh)
 | `0% <0%> (-92.6%)` | :arrow_down: |
   | 
[...whisk/core/database/cosmosdb/CosmosDBSupport.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJTdXBwb3J0LnNjYWxh)
 | `0% <0%> (-81.82%)` | :arrow_down: |
   | 
[...abase/cosmosdb/CosmosDBArtifactStoreProvider.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJBcnRpZmFjdFN0b3JlUHJvdmlkZXIuc2NhbGE=)
 | `0% <0%> (-58.83%)` | :arrow_down: |
   | 
[...la/whisk/core/database/cosmosdb/CosmosDBUtil.scala](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698/diff?src=pr=tree#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL3doaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJVdGlsLnNjYWxh)
 | `92% <0%> (-4%)` | :arrow_down: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698?src=pr=footer).
 Last update 
[92a4a0c...34e098a](https://codecov.io/gh/apache/incubator-openwhisk/pull/3698?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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 commented on a change in pull request #3747: Memory based loadbalancing

2018-08-08 Thread GitBox
cbickel commented on a change in pull request #3747: Memory based loadbalancing
URL: 
https://github.com/apache/incubator-openwhisk/pull/3747#discussion_r208618430
 
 

 ##
 File path: common/scala/src/main/scala/whisk/core/entity/Size.scala
 ##
 @@ -69,6 +69,23 @@ case class ByteSize(size: Long, unit: SizeUnits.Unit) 
extends Ordered[ByteSize]
 ByteSize(commonSize, commonUnit)
   }
 
+  def *(other: Int): ByteSize = {
+ByteSize(toBytes * other, SizeUnits.BYTE)
+  }
+
+  def /(other: ByteSize): Double = {
+// Without throwing the exception the result would be `Infinity` here
 
 Review comment:
   What are the reasons for using a Try here?
   On dividing `Int`s, you also get the response directly, instead of a `Try`, 
don't you?


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 issue #3950: Extend system testsuite

2018-08-08 Thread GitBox
markusthoemmes commented on issue #3950: Extend system testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#issuecomment-411428155
 
 
   @mgencur As far as I'm aware, the API level tests (ActionsApiTests.scala for 
example) are heavily stubbed out through `ControllerTestCommon`. For example, 
for the activations API you can just write a couple of activations to the 
database and then assert that the skip parameter works correctly. For the 
actions API, the loadbalancer is stubbed out and it's responses are 
controllable from the test.
   
   It is true that we don't have many unit tests in the true sense but believe 
we should always test the least amount of components needed. Invoking multiple 
actions to be able to assert that activations can be skipped while listing only 
adds to the (already too long) duration of our tests for no apparent benefit.


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 closed pull request #3942: make error count and percentage configurable for gatling tests

2018-08-08 Thread GitBox
markusthoemmes closed pull request #3942: make error count and percentage 
configurable for gatling tests
URL: https://github.com/apache/incubator-openwhisk/pull/3942
 
 
   

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/performance/README.md b/tests/performance/README.md
index f09d91be17..dd780c3761 100644
--- a/tests/performance/README.md
+++ b/tests/performance/README.md
@@ -70,11 +70,13 @@ The test is doing as many requests as possible for the 
given amount of time (`SE
 Available environment variables:
 
 ```
-OPENWHISK_HOST  (required)
-CONNECTIONS (required)
-SECONDS (default: 10)
-REQUESTS_PER_SEC(required)
-MIN_REQUESTS_PER_SEC(default: REQUESTS_PER_SEC)
+OPENWHISK_HOST(required)
+CONNECTIONS   (required)
+SECONDS   (default: 10)
+REQUESTS_PER_SEC  (required)
+MIN_REQUESTS_PER_SEC  (default: REQUESTS_PER_SEC)
+MAX_ERRORS_ALLOWED(default: 0)
+MAX_ERRORS_ALLOWED_PERCENTAGE (default: 0)
 ```
 
 You can run the simulation with (in OPENWHISK_HOME)
@@ -101,14 +103,20 @@ The comparison of the thresholds is against the mean 
response times of the warm
 Available environment variables:
 
 ```
-OPENWHISK_HOST  (required)
-API_KEY (required, format: UUID:KEY)
-PAUSE_BETWEEN_INVOKES   (default: 0)
-MEAN_RESPONSE_TIME  (required)
-MAX_MEAN_RESPONSE_TIME  (default: MEAN_RESPONSE_TIME)
-EXCLUDED_KINDS  (default: "", format: 
"python:default,java:default,swift:default")
+OPENWHISK_HOST(required)
+API_KEY   (required, format: UUID:KEY)
+PAUSE_BETWEEN_INVOKES (default: 0)
+MEAN_RESPONSE_TIME(required)
+MAX_MEAN_RESPONSE_TIME(default: MEAN_RESPONSE_TIME)
+EXCLUDED_KINDS(default: "", format: 
"python:default,java:default,swift:default")
+MAX_ERRORS_ALLOWED(default: 0)
+MAX_ERRORS_ALLOWED_PERCENTAGE (default: 0)
 ```
 
+It is possible to override the `MEAN_RESPONSE_TIME`, `MAX_MEAN_RESPONSE_TIME`, 
`MAX_ERRORS_ALLOWED` and `MAX_ERRORS_ALLOWED_PERCENTAGE`
+for each kind by adding the kind as prefix in upper case, like 
`JAVA_MEAN_RESPONSE_TIME`.
+
+
 You can run the simulation with (in OPENWHISK_HOME)
 ```
 OPENWHISK_HOST="openwhisk.mydomain.com" MEAN_RESPONSE_TIME="20" 
API_KEY="UUID:KEY" ./gradlew gatlingRun-LatencySimulation
@@ -130,12 +138,14 @@ The test is doing as many requests as possible for the 
given amount of time (`SE
 
 Available environment variables:
 ```
-OPENWHISK_HOST  (required)
-API_KEY (required, format: UUID:KEY)
-CONNECTIONS (required)
-SECONDS (default: 10)
-REQUESTS_PER_SEC(required)
-MIN_REQUESTS_PER_SEC(default: REQUESTS_PER_SEC)
+OPENWHISK_HOST(required)
+API_KEY   (required, format: UUID:KEY)
+CONNECTIONS   (required)
+SECONDS   (default: 10)
+REQUESTS_PER_SEC  (required)
+MIN_REQUESTS_PER_SEC  (default: REQUESTS_PER_SEC)
+MAX_ERRORS_ALLOWED(default: 0)
+MAX_ERRORS_ALLOWED_PERCENTAGE (default: 0)
 ```
 
 You can run the simulation with
@@ -160,11 +170,13 @@ The test is doing as many requests as possible for the 
given amount of time (`SE
 
 Available environment variables:
 ```
-OPENWHISK_HOST  (required)
-USERS   (required)
-SECONDS (default: 10)
-REQUESTS_PER_SEC(required)
-MIN_REQUESTS_PER_SEC(default: REQUESTS_PER_SEC)
+OPENWHISK_HOST(required)
+USERS (required)
+SECONDS   (default: 10)
+REQUESTS_PER_SEC  (required)
+MIN_REQUESTS_PER_SEC  (default: REQUESTS_PER_SEC)
+MAX_ERRORS_ALLOWED(default: 0)
+MAX_ERRORS_ALLOWED_PERCENTAGE (default: 0)
 ```
 
 You can run the simulation with
diff --git 
a/tests/performance/gatling_tests/src/gatling/scala/ApiV1Simulation.scala 
b/tests/performance/gatling_tests/src/gatling/scala/ApiV1Simulation.scala
index 91c5302e8b..9fa760445a 100644
--- a/tests/performance/gatling_tests/src/gatling/scala/ApiV1Simulation.scala
+++ b/tests/performance/gatling_tests/src/gatling/scala/ApiV1Simulation.scala
@@ -30,6 +30,8 @@ class ApiV1Simulation extends Simulation {
   // Specify thresholds
   val requestsPerSec = sys.env("REQUESTS_PER_SEC").toInt
   val minimalRequestsPerSec = sys.env.getOrElse("MIN_REQUESTS_PER_SEC", 
requestsPerSec.toString).toInt
+  val maxErrorsAllowed: Int = sys.env.getOrElse("MAX_ERRORS_ALLOWED", 
"0").toInt
+  val maxErrorsAllowedPercentage: Double = 
sys.env.getOrElse("MAX_ERRORS_ALLOWED_PERCENTAGE", "0.1").toDouble
 
   // Generate the 

[GitHub] mgencur commented on issue #3950: Extend system testsuite

2018-08-08 Thread GitBox
mgencur commented on issue #3950: Extend system testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#issuecomment-411408315
 
 
   @markusthoemmes thanks for the quick review. I will address most of the 
concerns. But I'd like to know what you mean by "API level" tests and how they 
differ from the system-level tests from your POV. 
   My view is that most of the tests from whisk.core (API level as you say) 
need the whole system to be running. The tests there create and invoke actions 
like those in the system.basic package. So I don't see a different aside from 
different package naming.
   I'd be happy to move some tests from system.basic to whisk.core as long as 
their requirements for running components were different. Otherwise it would be 
nice to have most of the tests in a single package - system.basic, IMO. 
(actually, I suggested this change in 
https://github.com/apache/incubator-openwhisk/issues/3737). Having very similar 
tests in different places is confusing and makes it more difficult to run a 
subset of the test suite.
   What's your view?


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] mgencur commented on a change in pull request #3950: Extend system testsuite

2018-08-08 Thread GitBox
mgencur commented on a change in pull request #3950: Extend system testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r208580980
 
 

 ##
 File path: tests/src/test/scala/system/basic/WskActionTests.scala
 ##
 @@ -210,6 +253,32 @@ class WskActionTests extends TestHelpers with 
WskTestHelpers with JsHelpers with
 }
   }
 
+  it should "update an action with different language and check preserving 
params" in withAssetCleaner(wskprops) {
+(wp, assetHelper) =>
+  val name = "updatedAction"
+
+  assetHelper.withCleaner(wsk.action, name, false) { (action, _) =>
+wsk.action.create(
+  name,
+  Some(TestUtils.getTestActionFilename("hello.js")),
+  parameters = Map("name" -> testString.toJson)) //unused in the first 
function
+  }
+
+  val run1 = wsk.action.invoke(name, Map("payload" -> testString.toJson))
+  withActivation(wsk.activation, run1) { activation =>
+activation.response.status shouldBe "success"
+activation.logs.get.mkString(" ") should include(s"hello, $testString")
+  }
+
+  wsk.action.create(name, 
Some(TestUtils.getTestActionFilename("hello.py")), update = true)
+
+  val run2 = wsk.action.invoke(name)
+  withActivation(wsk.activation, run2) { activation =>
+activation.response.status shouldBe "success"
+activation.logs.get.mkString(" ") should include(s"Hello $testString")
+  }
 
 Review comment:
   Perhaps we don't need to invoke it first time but we need it the second time 
in order to verify that the function can correctly consume the params even if 
it's a different runtime/language. This is more like end-to-end 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] mgencur commented on a change in pull request #3950: Extend system testsuite

2018-08-08 Thread GitBox
mgencur commented on a change in pull request #3950: Extend system testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r208573813
 
 

 ##
 File path: tests/src/test/scala/system/basic/WskActionTests.scala
 ##
 @@ -71,6 +71,49 @@ class WskActionTests extends TestHelpers with 
WskTestHelpers with JsHelpers with
 }
   }
 
+  it should "invoke an action that throws an uncaught exception and returns 
correct status code" in withAssetCleaner(
+wskprops) { (wp, assetHelper) =>
+val name = "throwExceptionAction"
+assetHelper.withCleaner(wsk.action, name) { (action, _) =>
+  action.create(name, 
Some(TestUtils.getTestActionFilename("runexception.js")))
+}
+
+withActivation(wsk.activation, wsk.action.invoke(name)) { activation =>
+  val response = activation.response
+  activation.response.status shouldBe "action developer error"
+  activation.response.result shouldBe Some(
+JsObject("error" -> "An error has occurred: Extraordinary 
exception".toJson))
+}
+  }
+
+  it should "invoke an action with option --blocking only and verify output" 
in withAssetCleaner(wskprops) {
+(wp, assetHelper) =>
+  val name = "invokeResult"
+  assetHelper.withCleaner(wsk.action, name) { (action, _) =>
+action.create(name, Some(TestUtils.getTestActionFilename("echo.js")))
+  }
+  val args = Map("hello" -> "Robert".toJson)
+  val run = wsk.action.invoke(name, args, blocking = true)
+
+  run.stdout.parseJson.asJsObject.getFieldPath("response", 
"result").get.asJsObject shouldBe JsObject(args)
+
+  run.stdout.parseJson.asJsObject
+.getFields(
+  "activationId",
+  "annotations",
+  "duration",
+  "end",
+  "logs",
+  "name",
+  "namespace",
+  "publish",
+  "response",
+  "start",
+  "subject",
+  "version")
+.size shouldBe 12
 
 Review comment:
   Thanks for the tip;)


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] mgencur commented on a change in pull request #3950: Extend system testsuite

2018-08-08 Thread GitBox
mgencur commented on a change in pull request #3950: Extend system testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r208572609
 
 

 ##
 File path: tests/src/test/scala/common/rest/WskRestOperations.scala
 ##
 @@ -1202,6 +1220,16 @@ trait RunRestCmd extends Matchers with ScalaFutures 
with SwaggerValidator {
 response
   }
 
+  def logRequestResponse(req: HttpRequest, res: HttpResponse) {
+logger.debug(this, s"Request Method: ${req.method}")
+logger.debug(this, s"Request URI: ${req.uri}")
+logger.debug(this, s"Request Headers: ${req.headers.mkString(",")}")
+logger.debug(this, s"Request Body: ${getReqData(req)}")
+logger.debug(this, s"Response Status: ${res.status.intValue()}")
+logger.debug(this, s"Response Headers: ${res.headers.mkString(",")}")
+logger.debug(this, s"Response Body: ${getRespData(res)}")
 
 Review comment:
   Yeah. I don't know what I was thinking. Perhaps I wanted to clarify what is 
headers, body, etc.


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 edited a comment on issue #3671: Activation id in header

2018-08-08 Thread GitBox
rabbah edited a comment on issue #3671: Activation id in header
URL: 
https://github.com/apache/incubator-openwhisk/pull/3671#issuecomment-411380282
 
 
   I think I've changed perspective on the activation id in the header response 
of web actions, after some further consideration (to agree with you, and that 
it's OK). I can explain in a longer comment later if necessary.


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 #3671: Activation id in header

2018-08-08 Thread GitBox
rabbah commented on issue #3671: Activation id in header
URL: 
https://github.com/apache/incubator-openwhisk/pull/3671#issuecomment-411380282
 
 
   I think I've changed perspective on the activation id in the header response 
of web actions, after some further consideration. I can explain in a longer 
comment later.


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] style95 commented on issue #3671: Activation id in header

2018-08-08 Thread GitBox
style95 commented on issue #3671: Activation id in header
URL: 
https://github.com/apache/incubator-openwhisk/pull/3671#issuecomment-411377191
 
 
   @rabbah 
   Regarding exposure of ActivationID of webaction in response header, how 
about having a configuration to control it by OW operator?
   In some cases, it would be worth to expose it though it could be a kind of 
small data breaches.
   


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] style95 commented on issue #3671: Activation id in header

2018-08-08 Thread GitBox
style95 commented on issue #3671: Activation id in header
URL: 
https://github.com/apache/incubator-openwhisk/pull/3671#issuecomment-411376673
 
 
   I think the point is, if we allow activationID generation in multiple 
components(nginx, controller), we cannot guarantee the activationID is 
unique(though the possibility of duplicate activationID is less.)
   
   To use the same ID for `TransactionID` and `ActivationID`, it should be 
generated in nginx.
   But also, ActivationID should be generated in controllers as a trigger is 
fired by controllers.
   


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] chetanmeh commented on a change in pull request #3886: Proposing Lean OpenWhisk

2018-08-08 Thread GitBox
chetanmeh commented on a change in pull request #3886: Proposing Lean OpenWhisk
URL: 
https://github.com/apache/incubator-openwhisk/pull/3886#discussion_r208539746
 
 

 ##
 File path: .travis.yml
 ##
 @@ -73,3 +73,19 @@ jobs:
 - OPENWHISK_HOST="172.17.0.1" USERS="1" REQUESTS_PER_SEC="1" ./gradlew 
gatlingRun-ColdBlockingInvokeSimulation
   env:
 - DESCRIPTION="Execute wrk-performance test suite."
+- script:
 
 Review comment:
   Adding 2 more jobs would lead to more resource usage and thus may exhaust 
the travis pool. May be we look into running these suites as a cron and not for 
every 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] chetanmeh commented on a change in pull request #3886: Proposing Lean OpenWhisk

2018-08-08 Thread GitBox
chetanmeh commented on a change in pull request #3886: Proposing Lean OpenWhisk
URL: 
https://github.com/apache/incubator-openwhisk/pull/3886#discussion_r208538634
 
 

 ##
 File path: common/scala/src/main/scala/whisk/connector/lean/LeanProducer.scala
 ##
 @@ -0,0 +1,53 @@
+/*
+ * 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.connector.lean
+
+import scala.concurrent.Future
+import org.apache.kafka.clients.producer.RecordMetadata
+import whisk.common.Counter
+import whisk.common.Logging
+import whisk.core.connector.Message
+import whisk.core.connector.MessageProducer
+
+import java.util.concurrent.{BlockingQueue, LinkedBlockingQueue}
+import scala.collection.concurrent.Map
+import java.nio.charset.StandardCharsets
+
+class LeanProducer(queues: Map[String, BlockingQueue[Array[Byte]]])(implicit 
logging: Logging) extends MessageProducer {
+
+  override def sentCount(): Long = sentCounter.cur
+
+  /** Sends msg to topic. This is an asynchronous operation. */
+  override def send(topic: String, msg: Message, retry: Int = 3): 
Future[RecordMetadata] = {
+implicit val transid = msg.transid
+
+logging.debug(this, s"sending to topic '$topic' msg '$msg'")
+var queue = queues.getOrElseUpdate(topic, new 
LinkedBlockingQueue[Array[Byte]]())
+queue.put(msg.serialize.getBytes(StandardCharsets.UTF_8))
+sentCounter.next()
+
+Future.successful(null)
 
 Review comment:
   `put` would be a blocking operation if we have a finite size queue. So  
better to wrap put call in Future


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] chetanmeh commented on a change in pull request #3886: Proposing Lean OpenWhisk

2018-08-08 Thread GitBox
chetanmeh commented on a change in pull request #3886: Proposing Lean OpenWhisk
URL: 
https://github.com/apache/incubator-openwhisk/pull/3886#discussion_r208537513
 
 

 ##
 File path: common/scala/src/main/scala/whisk/connector/lean/LeanConsumer.scala
 ##
 @@ -0,0 +1,44 @@
+/*
+ * 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.connector.lean
+
+import scala.concurrent.duration._
+import whisk.common.Logging
+import whisk.core.connector.MessageConsumer
+import java.util.concurrent.BlockingQueue
+import java.util.concurrent.TimeUnit
+
+class LeanConsumer(queue: BlockingQueue[Array[Byte]], override val maxPeek: 
Int)(implicit logging: Logging)
+extends MessageConsumer {
+
+  /**
+   */
+  override def peek(duration: FiniteDuration, retry: Int): Iterable[(String, 
Int, Long, Array[Byte])] = {
 
 Review comment:
   May be use [drainTo][1] which would be more efficient and more closely 
matches with what a fetch from Kafka would do
   
   [1]: 
https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/BlockingQueue.html#drainTo(java.util.Collection,%20int)


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] chetanmeh commented on a change in pull request #3886: Proposing Lean OpenWhisk

2018-08-08 Thread GitBox
chetanmeh commented on a change in pull request #3886: Proposing Lean OpenWhisk
URL: 
https://github.com/apache/incubator-openwhisk/pull/3886#discussion_r208538330
 
 

 ##
 File path: 
common/scala/src/main/scala/whisk/connector/lean/LeanMessagingProvider.scala
 ##
 @@ -0,0 +1,63 @@
+/*
+ * 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.connector.lean
+
+import java.util.concurrent.BlockingQueue
+import java.util.concurrent.LinkedBlockingQueue
+
+import scala.collection.concurrent.Map
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration.FiniteDuration
+import scala.util.Success
+import scala.util.Try
+
+import akka.actor.ActorSystem
+import whisk.common.Logging
+import whisk.core.WhiskConfig
+import whisk.core.connector.MessageConsumer
+import whisk.core.connector.MessageProducer
+import whisk.core.connector.MessagingProvider
+
+/**
+ * A simple implementation of MessagingProvider
+ */
+object LeanMessagingProvider extends MessagingProvider {
+
+  val queues: Map[String, BlockingQueue[Array[Byte]]] =
+new TrieMap[String, BlockingQueue[Array[Byte]]]
+
+  def getConsumer(config: WhiskConfig, groupId: String, topic: String, 
maxPeek: Int, maxPollInterval: FiniteDuration)(
+implicit logging: Logging,
+actorSystem: ActorSystem): MessageConsumer = {
+
+var queue = queues.getOrElseUpdate(topic, new 
LinkedBlockingQueue[Array[Byte]]())
+new LeanConsumer(queue, maxPeek)
+  }
+
+  def getProducer(config: WhiskConfig)(implicit logging: Logging, actorSystem: 
ActorSystem): MessageProducer =
+new LeanProducer(queues)
+
+  def ensureTopic(config: WhiskConfig, topic: String, topicConfig: 
String)(implicit logging: Logging): Try[Unit] = {
+if (queues.contains(topic)) {
+  Success(logging.info(this, s"topic $topic already existed"))
+} else {
+  queues.put(topic, new 
LinkedBlockingQueue[Array[Byte]](Integer.MAX_VALUE))
 
 Review comment:
   Nit. This may lead to memory issue if rate of production is higher


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] kpavel edited a comment on issue #3886: Proposing Lean OpenWhisk

2018-08-08 Thread GitBox
kpavel edited a comment on issue #3886: Proposing Lean OpenWhisk
URL: 
https://github.com/apache/incubator-openwhisk/pull/3886#issuecomment-411364636
 
 
   @markusthoemmes I think I've finished with requested changes. Can you please 
review it again?


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] kpavel commented on issue #3886: Proposing Lean OpenWhisk

2018-08-08 Thread GitBox
kpavel commented on issue #3886: Proposing Lean OpenWhisk
URL: 
https://github.com/apache/incubator-openwhisk/pull/3886#issuecomment-411364636
 
 
   @markusthoemmes I think i finished with requested changes. Can you please 
review it again?


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] mgencur commented on a change in pull request #3950: Extend system testsuite

2018-08-08 Thread GitBox
mgencur commented on a change in pull request #3950: Extend system testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r208519673
 
 

 ##
 File path: tests/dat/actions/argsPrint.js
 ##
 @@ -1,6 +1,8 @@
 // Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
 
 Review comment:
   applicationError.js was not used anywhere. I deleted it and also created 
argsPrint.js. Github thinks I renamed 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] mgencur commented on issue #3951: Docs fixes for action invocations

2018-08-08 Thread GitBox
mgencur commented on issue #3951: Docs fixes for action invocations
URL: 
https://github.com/apache/incubator-openwhisk/pull/3951#issuecomment-411348690
 
 
   Hey @rabbah @markusthoemmes , what do you think now? I've fixed the 
description a little bit in separate commits.


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] mgencur commented on a change in pull request #3951: Docs fixes for action invocations

2018-08-08 Thread GitBox
mgencur commented on a change in pull request #3951: Docs fixes for action 
invocations
URL: 
https://github.com/apache/incubator-openwhisk/pull/3951#discussion_r208511709
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -216,10 +216,11 @@ ok: invoked /whisk.system/samples/greeting with id 
5975c24de0114ef2b5c24de0118ef
 A blocking invocation request will _wait_ for the activation result to be 
available. The wait period
 is the lesser of 60 seconds or the action's configured
 [time limit](reference.md#per-action-timeout-ms-default-60s).
-The result of the activation is returned if it is available within the wait 
period.
-Otherwise, the activation continues processing in the system and an activation 
ID is returned
-so that one may check for the result later, as with non-blocking requests
-(see [here](#watching-action-output) for tips on monitoring activations).
+The result of the action is successfully returned if it is available within 
the wait period.
+Otherwise, the result is an error caused by the action timeout and the 
response status is _application error_.
 
 Review comment:
   I see. Let me rephrase it then.


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 #3951: Docs fixes for action invocations

2018-08-08 Thread GitBox
markusthoemmes commented on a change in pull request #3951: Docs fixes for 
action invocations
URL: 
https://github.com/apache/incubator-openwhisk/pull/3951#discussion_r208509072
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -216,10 +216,11 @@ ok: invoked /whisk.system/samples/greeting with id 
5975c24de0114ef2b5c24de0118ef
 A blocking invocation request will _wait_ for the activation result to be 
available. The wait period
 is the lesser of 60 seconds or the action's configured
 [time limit](reference.md#per-action-timeout-ms-default-60s).
-The result of the activation is returned if it is available within the wait 
period.
-Otherwise, the activation continues processing in the system and an activation 
ID is returned
-so that one may check for the result later, as with non-blocking requests
-(see [here](#watching-action-output) for tips on monitoring activations).
+The result of the action is successfully returned if it is available within 
the wait period.
+Otherwise, the result is an error caused by the action timeout and the 
response status is _application error_.
 
 Review comment:
   Ah, the text reads as if you're referring to the blocking wait period. We 
wait for 60s at most for a blocking invocation to finish, after that we fall 
back to a 202 (actions can be configured to run longer than 60s). That's what 
@rabbah is referring to.


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] mgencur commented on a change in pull request #3951: Docs fixes for action invocations

2018-08-08 Thread GitBox
mgencur commented on a change in pull request #3951: Docs fixes for action 
invocations
URL: 
https://github.com/apache/incubator-openwhisk/pull/3951#discussion_r208507708
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -233,7 +234,10 @@ Each action invocation results in an activation record 
which contains the follow
 - `response`: A dictionary that defines the following keys
   - `status`: The activation result, which might be one of the following 
values:
 - *"success"*: the action invocation completed successfully.
-- *"application error"*: the action invocation was successful, but the 
action returned an error value on purpose, for instance because a precondition 
on the arguments was not met.
+- *"application error"*: the action was invoked, but returned an error 
value on purpose, for instance because a precondition on the arguments was not 
met. This status code is also returned under specific conditions such as:
+  - wrong docker container name
+  - initialization of a function failed
+  - action timed out
 
 Review comment:
   OK. Will change 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] mgencur commented on a change in pull request #3951: Docs fixes for action invocations

2018-08-08 Thread GitBox
mgencur commented on a change in pull request #3951: Docs fixes for action 
invocations
URL: 
https://github.com/apache/incubator-openwhisk/pull/3951#discussion_r208507380
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -216,10 +216,11 @@ ok: invoked /whisk.system/samples/greeting with id 
5975c24de0114ef2b5c24de0118ef
 A blocking invocation request will _wait_ for the activation result to be 
available. The wait period
 is the lesser of 60 seconds or the action's configured
 [time limit](reference.md#per-action-timeout-ms-default-60s).
-The result of the activation is returned if it is available within the wait 
period.
-Otherwise, the activation continues processing in the system and an activation 
ID is returned
-so that one may check for the result later, as with non-blocking requests
-(see [here](#watching-action-output) for tips on monitoring activations).
+The result of the action is successfully returned if it is available within 
the wait period.
+Otherwise, the result is an error caused by the action timeout and the 
response status is _application error_.
 
 Review comment:
   This is about blocking invocation. Here's my test:
   `wsk action create sleep tests/dat/actions/sleep.js -t 100`
   `wsk action invoke sleep --param sleepTimeInMs 1100 --blocking`
   The response code is 502 and response itself is:
   `ok: invoked /guest/sleep with id 75043a3d2eec4556843a3d2eec855620
   {
   "activationId": "75043a3d2eec4556843a3d2eec855620",
   "annotations": [
   {
   "key": "path",
   "value": "guest/sleep"
   },
   {
   "key": "waitTime",
   "value": 1014
   },
   {
   "key": "kind",
   "value": "nodejs:6"
   },
   {
   "key": "limits",
   "value": {
   "logs": 10,
   "memory": 256,
   "timeout": 100
   }
   },
   {
   "key": "initTime",
   "value": 152
   }
   ],
   "duration": 255,
   "end": 1533718832936,
   "logs": [],
   "name": "sleep",
   "namespace": "guest",
   "publish": false,
   "response": {
   "result": {
   "error": "The action exceeded its time limits of 100 
milliseconds."
   },
   "status": "application error",
   "success": false
   },
   "start": 1533718832681,
   "subject": "guest",
   "version": "0.0.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] markusthoemmes commented on issue #3950: Extend system testsuite

2018-08-08 Thread GitBox
markusthoemmes commented on issue #3950: Extend system testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#issuecomment-411330491
 
 
   @mgencur greate someone is looking into our testcoverage, very much 
appreciated  . I should've created a single review, sorry for the notification 
spam.
   
   In general: We should move as many tests to the "API level" tests 
(whisk.core...) as possible as you noted in the issue.


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 #3950: Extend system testsuite

2018-08-08 Thread GitBox
markusthoemmes commented on a change in pull request #3950: Extend system 
testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r208498721
 
 

 ##
 File path: tests/src/test/scala/system/basic/WskActivationTests.scala
 ##
 @@ -74,4 +75,39 @@ class WskActivationTests extends TestHelpers with 
WskTestHelpers with WskActorSy
   
wsk.activation.result(Some(activation.activationId)).stdout.parseJson.asJsObject
 shouldBe expectedResult
 }
   }
+
+  it should "list activations with skip" in withAssetCleaner(wskprops) { (wp, 
assetHelper) =>
+val name = withTimestamp("countdown")
+assetHelper.withCleaner(wsk.action, name) { (action, _) =>
+  action.create(name, 
Some(TestUtils.getTestActionFilename("countdown.js")))
+}
+
+val count = 2
+val run = wsk.action.invoke(name, Map("n" -> count.toJson))
+withActivation(wsk.activation, run) { activation =>
+  //make query more robust
+  val queryTime = activation.start.minusMillis(500)
+  //the countdown function invokes itself two more times, we need to skip 
2 invocations to get single activation
+  val activations =
+wsk.activation.pollFor(N = 1, Some(name), since = Some(queryTime), 
skip = Some(2), retries = 80).length
+  withClue(s"expected activations of action '$name' since $queryTime") {
+activations shouldBe 1
+  }
+}
+  }
+
+  it should "get last activation" in withAssetCleaner(wskprops) { (wp, 
assetHelper) =>
+val name = withTimestamp("countdown")
+assetHelper.withCleaner(wsk.action, name) { (action, _) =>
+  action.create(name, 
Some(TestUtils.getTestActionFilename("countdown.js")))
+}
+
+val count = 1
+val run = wsk.action.invoke(name, Map("n" -> count.toJson))
+withActivation(wsk.activation, run) { activation =>
+  val res = wsk.activation.get(None, last = Some(true))
+  val jsonResponse = wsk.parseJsonString(res.stdout)
+  jsonResponse.getFields("name").head.toString should include("countdown")
+}
+  }
 
 Review comment:
   Can these two be api level tests? AFAIK, this testclasses main purpose is to 
verify the activations API works with several backend ActivationStores.


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 #3950: Extend system testsuite

2018-08-08 Thread GitBox
markusthoemmes commented on a change in pull request #3950: Extend system 
testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r208497864
 
 

 ##
 File path: tests/src/test/scala/system/basic/WskActionTests.scala
 ##
 @@ -210,6 +253,32 @@ class WskActionTests extends TestHelpers with 
WskTestHelpers with JsHelpers with
 }
   }
 
+  it should "update an action with different language and check preserving 
params" in withAssetCleaner(wskprops) {
+(wp, assetHelper) =>
+  val name = "updatedAction"
+
+  assetHelper.withCleaner(wsk.action, name, false) { (action, _) =>
+wsk.action.create(
+  name,
+  Some(TestUtils.getTestActionFilename("hello.js")),
+  parameters = Map("name" -> testString.toJson)) //unused in the first 
function
+  }
+
+  val run1 = wsk.action.invoke(name, Map("payload" -> testString.toJson))
+  withActivation(wsk.activation, run1) { activation =>
+activation.response.status shouldBe "success"
+activation.logs.get.mkString(" ") should include(s"hello, $testString")
+  }
+
+  wsk.action.create(name, 
Some(TestUtils.getTestActionFilename("hello.py")), update = true)
+
+  val run2 = wsk.action.invoke(name)
+  withActivation(wsk.activation, run2) { activation =>
+activation.response.status shouldBe "success"
+activation.logs.get.mkString(" ") should include(s"Hello $testString")
+  }
 
 Review comment:
   Do we need to run these actions? Do we even need a system test for it? Feels 
like an API level test "just" updating the action and then checking that 
"parameters" remain unchanged is sufficient here, WDYT?


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 #3950: Extend system testsuite

2018-08-08 Thread GitBox
markusthoemmes commented on a change in pull request #3950: Extend system 
testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r208497477
 
 

 ##
 File path: tests/src/test/scala/system/basic/WskActionTests.scala
 ##
 @@ -71,6 +71,49 @@ class WskActionTests extends TestHelpers with 
WskTestHelpers with JsHelpers with
 }
   }
 
+  it should "invoke an action that throws an uncaught exception and returns 
correct status code" in withAssetCleaner(
+wskprops) { (wp, assetHelper) =>
+val name = "throwExceptionAction"
+assetHelper.withCleaner(wsk.action, name) { (action, _) =>
+  action.create(name, 
Some(TestUtils.getTestActionFilename("runexception.js")))
+}
+
+withActivation(wsk.activation, wsk.action.invoke(name)) { activation =>
+  val response = activation.response
+  activation.response.status shouldBe "action developer error"
+  activation.response.result shouldBe Some(
+JsObject("error" -> "An error has occurred: Extraordinary 
exception".toJson))
+}
+  }
+
+  it should "invoke an action with option --blocking only and verify output" 
in withAssetCleaner(wskprops) {
+(wp, assetHelper) =>
+  val name = "invokeResult"
+  assetHelper.withCleaner(wsk.action, name) { (action, _) =>
+action.create(name, Some(TestUtils.getTestActionFilename("echo.js")))
+  }
+  val args = Map("hello" -> "Robert".toJson)
+  val run = wsk.action.invoke(name, args, blocking = true)
+
+  run.stdout.parseJson.asJsObject.getFieldPath("response", 
"result").get.asJsObject shouldBe JsObject(args)
+
+  run.stdout.parseJson.asJsObject
+.getFields(
+  "activationId",
+  "annotations",
+  "duration",
+  "end",
+  "logs",
+  "name",
+  "namespace",
+  "publish",
+  "response",
+  "start",
+  "subject",
+  "version")
+.size shouldBe 12
 
 Review comment:
   When checking for size, ScalaTest has a matcher for that: `should have size 
12` will print the whole sequence on failure and thus give you a more 
explanatory error output than `11 was not 12`


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 #3950: Extend system testsuite

2018-08-08 Thread GitBox
markusthoemmes commented on a change in pull request #3950: Extend system 
testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r208496841
 
 

 ##
 File path: tests/src/test/scala/common/rest/WskRestOperations.scala
 ##
 @@ -1295,6 +1323,11 @@ trait RunRestCmd extends Matchers with ScalaFutures 
with SwaggerValidator {
 Try(resp.entity.toStrict(timeout).map { _.data 
}.map(_.utf8String).futureValue).getOrElse("")
   }
 
+  def getReqData(req: HttpRequest): String = {
+val timeout = 5.seconds
+Try(req.entity.toStrict(timeout).map { _.data 
}.map(_.utf8String).futureValue).getOrElse("")
+  }
 
 Review comment:
   The duplication here seems unnecessary. HttpResponse and HttpRequest have a 
common supertype, HttpMessage. Changing getResData to, for example, 
`entityToString` taking a HttpMessage might make sense.


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 #3950: Extend system testsuite

2018-08-08 Thread GitBox
markusthoemmes commented on a change in pull request #3950: Extend system 
testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r208495717
 
 

 ##
 File path: tests/src/test/scala/common/rest/WskRestOperations.scala
 ##
 @@ -1202,6 +1220,16 @@ trait RunRestCmd extends Matchers with ScalaFutures 
with SwaggerValidator {
 response
   }
 
+  def logRequestResponse(req: HttpRequest, res: HttpResponse) {
+logger.debug(this, s"Request Method: ${req.method}")
+logger.debug(this, s"Request URI: ${req.uri}")
+logger.debug(this, s"Request Headers: ${req.headers.mkString(",")}")
+logger.debug(this, s"Request Body: ${getReqData(req)}")
+logger.debug(this, s"Response Status: ${res.status.intValue()}")
+logger.debug(this, s"Response Headers: ${res.headers.mkString(",")}")
+logger.debug(this, s"Response Body: ${getRespData(res)}")
 
 Review comment:
   Since we "strictify" responses already, could you just print the whole 
request and the whole response? Scala case-class's `toString` should be 
sufficient to provide all the information needed, 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] markusthoemmes commented on a change in pull request #3951: Docs fixes for action invocations

2018-08-08 Thread GitBox
markusthoemmes commented on a change in pull request #3951: Docs fixes for 
action invocations
URL: 
https://github.com/apache/incubator-openwhisk/pull/3951#discussion_r208494979
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -340,7 +344,7 @@ is skipped if an action is dispatched to a previously 
initialized container ---
 You can tell if an [invocation was a warm activation or a cold one requiring 
initialization](annotations.md#annotations-specific-to-activations)
 by inspecting the activation record.
 - An action runs for a bounded amount of time. This limit can be configured 
per action, and applies to both the
-initialization and the execution separately.
+initialization and the execution separately. If the action time limit is 
exceeded the activation's response status is _application error_.
 
 Review comment:
   For init it changes, for run it doesn't.


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 #3950: Extend system testsuite

2018-08-08 Thread GitBox
rabbah commented on a change in pull request #3950: Extend system testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r208494908
 
 

 ##
 File path: tests/dat/actions/argsPrint.js
 ##
 @@ -1,6 +1,8 @@
 // Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
 
 Review comment:
   why isn't argsPrint.js its own file leaving applicationError.js alone?


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 #3951: Docs fixes for action invocations

2018-08-08 Thread GitBox
markusthoemmes commented on a change in pull request #3951: Docs fixes for 
action invocations
URL: 
https://github.com/apache/incubator-openwhisk/pull/3951#discussion_r208494703
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -233,7 +234,10 @@ Each action invocation results in an activation record 
which contains the follow
 - `response`: A dictionary that defines the following keys
   - `status`: The activation result, which might be one of the following 
values:
 - *"success"*: the action invocation completed successfully.
-- *"application error"*: the action invocation was successful, but the 
action returned an error value on purpose, for instance because a precondition 
on the arguments was not met.
+- *"application error"*: the action was invoked, but returned an error 
value on purpose, for instance because a precondition on the arguments was not 
met. This status code is also returned under specific conditions such as:
+  - wrong docker container name
+  - initialization of a function failed
+  - action timed out
 
 Review comment:
   Especially "initaliziation failed" should be moved to the list below. Even 
as of today, most of the init failures are "app-dev-errors", I'm in the process 
of merging #3941 so it's safe to change.


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 #3951: Docs fixes for action invocations

2018-08-08 Thread GitBox
rabbah commented on a change in pull request #3951: Docs fixes for action 
invocations
URL: 
https://github.com/apache/incubator-openwhisk/pull/3951#discussion_r208493371
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -216,10 +216,11 @@ ok: invoked /whisk.system/samples/greeting with id 
5975c24de0114ef2b5c24de0118ef
 A blocking invocation request will _wait_ for the activation result to be 
available. The wait period
 is the lesser of 60 seconds or the action's configured
 [time limit](reference.md#per-action-timeout-ms-default-60s).
-The result of the activation is returned if it is available within the wait 
period.
-Otherwise, the activation continues processing in the system and an activation 
ID is returned
-so that one may check for the result later, as with non-blocking requests
-(see [here](#watching-action-output) for tips on monitoring activations).
+The result of the action is successfully returned if it is available within 
the wait period.
+Otherwise, the result is an error caused by the action timeout and the 
response status is _application error_.
 
 Review comment:
   This is not quite true. The API response is 202 (accepted) and an activation 
id, not an application error (which would imply the activation completed) if 
the blocking period (60s) expires before a result is ready.


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] mgencur opened a new pull request #3951: Docs fixes for action invocations

2018-08-08 Thread GitBox
mgencur opened a new pull request #3951: Docs fixes for action invocations
URL: https://github.com/apache/incubator-openwhisk/pull/3951
 
 
   More accurate description of blocking calls and the situation when 
_application error_ is returned upon invoking an action.
   
   ## Description
   
   
   
   ## Related issue and scope
   
   - [ ] I opened an issue to propose and discuss this change (#)
   
   ## My changes affect the following components
   
   
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [x] Documentation
   
   ## Types of changes
   
   - [x] Bug fix (generally a non-breaking change which closes an issue).
   - [ ] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing 
behavior).
   
   ## Checklist:
   
   
   - [x] I signed an [Apache 
CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [x] I reviewed the [style 
guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness)
 and followed the recommendations (Travis CI will check :).
   - [ ] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [x] I updated the documentation where necessary.
   
   


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