[incubator-openwhisk-utilities] branch master updated: Fix exclusion directory and file matching and add support for reading a top level gitignore file (#57)

2019-04-02 Thread csantanapr
This is an automated email from the ASF dual-hosted git repository.

csantanapr pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-utilities.git


The following commit(s) were added to refs/heads/master by this push:
 new e1faec9  Fix exclusion directory and file matching and add support for 
reading a top level gitignore file (#57)
e1faec9 is described below

commit e1faec929990f9107238c5287bae2209eca1b1a2
Author: rodric rabbah 
AuthorDate: Tue Apr 2 22:36:42 2019 -0400

Fix exclusion directory and file matching and add support for reading a top 
level gitignore file (#57)
---
 .gitignore|   3 +
 LICENSE.txt   |  12 ++
 README.md |   4 +-
 licenses/LICENSE-pathspec.txt | 374 ++
 scancode/lib/compat.py|  45 +
 scancode/lib/gitwildmatch.py  | 325 
 scancode/lib/pathspec.py  | 146 +
 scancode/lib/pattern.py   | 155 +
 scancode/lib/util.py  | 359 
 scancode/scanCode.py  |  57 ---
 scancode/travis.cfg   |   3 +
 11 files changed, 1455 insertions(+), 28 deletions(-)

diff --git a/.gitignore b/.gitignore
index 23c57c9..fd8ce7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,6 @@ ansible/roles/nginx/files/*cert.pem
 
 # .zip files must be explicited whitelisted
 *.zip
+
+# .pyc files
+*.pyc
diff --git a/LICENSE.txt b/LICENSE.txt
index a2fe52f..23fba0a 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -200,3 +200,15 @@
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.
+
+
+
+Mozilla Public License 2.0
+
+
+This distribution bundles the following component, which is
+available under an Mozilla Public License 2.0
+(https://www.mozilla.org/en-US/MPL/2.0/).
+
+Pathspec 0.5.9 (https://pypi.org/project/pathspec/) under scanCode/lib.
+License included at licenses/LICENSE-pathspec.txt.
diff --git a/README.md b/README.md
index 93c7de3..fecac52 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@ Scan detected 3 error(s) in 1 file(s):
 
 To make sure this never happens to you, you can run the same tests on your 
local machine every time you commit changes.
 
-1. Clone the OpenWhisk utilities project repo.:
+1. Clone the OpenWhisk utilities project:
 ```bash
 $ git clone https://github.com/apache/incubator-openwhisk-utilities.git
 ```
@@ -66,7 +66,7 @@ $ cat /path/to/openwhisk/.git/hooks/pre-commit
 
 # determine openwhisk base directory
 root="$(git rev-parse --show-toplevel)"
-python /path/to/incubator-openwhisk-utilities/scancode/scanCode.py . --config 
$root/tools/
+python /path/to/incubator-openwhisk-utilities/scancode/scanCode.py . --config 
$root/tools/ --gitignore $root/.gitignore
 ```
 
 _Note_: A hook a locally installed, so if you check out the repository again, 
you will need to reinstall it.
diff --git a/licenses/LICENSE-pathspec.txt b/licenses/LICENSE-pathspec.txt
new file mode 100644
index 000..52d1351
--- /dev/null
+++ b/licenses/LICENSE-pathspec.txt
@@ -0,0 +1,374 @@
+Mozilla Public License Version 2.0
+==
+
+1. Definitions
+--
+
+1.1. "Contributor"
+means each individual or legal entity that creates, contributes to
+the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+means the combination of the Contributions of others (if any) used
+by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+means Source Code Form to which the initial Contributor has attached
+the notice in Exhibit A, the Executable Form of such Source Code
+Form, and Modifications of such Source Code Form, in each case
+including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+means
+
+(a) that the initial Contributor has attached the notice described
+in Exhibit B to the Covered Software; or
+
+(b) that the Covered Software was made available under the terms of
+version 1.1 or earlier of the License, but not also under the
+terms of a Secondary License.
+
+1.6. "Executable Form"
+means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+means a work that combines Covered Software with other material, in 
+a separate file or files, that is not Covered Software.
+
+1.8. "License"
+means this document.
+
+1.9. "Licensable"
+means having the right to grant, to the maximum extent possible,
+whether at the time of the initial grant or subsequently, 

[incubator-openwhisk] branch master updated: Add owperf as a performance evaluation tool for OpenWhisk (#4320)

2019-04-02 Thread rabbah
This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
 new bb01428  Add owperf as a performance evaluation tool for OpenWhisk 
(#4320)
bb01428 is described below

commit bb01428bca92f1f0dc2b4b8a710be52de1d6ba47
Author: Erez Hadad 
AuthorDate: Wed Apr 3 05:08:07 2019 +0300

Add owperf as a performance evaluation tool for OpenWhisk (#4320)
---
 tools/owperf/README.md   | 101 +
 tools/owperf/owperf.js   | 865 +++
 tools/owperf/owperf.sh   |  22 ++
 tools/owperf/owperf_data.odg | Bin 0 -> 17721 bytes
 tools/owperf/owperf_data.png | Bin 0 -> 171488 bytes
 tools/owperf/package.json|  24 ++
 tools/owperf/setup.sh|  81 
 tools/owperf/testAction.js   |  41 ++
 8 files changed, 1134 insertions(+)

diff --git a/tools/owperf/README.md b/tools/owperf/README.md
new file mode 100644
index 000..70f12b7
--- /dev/null
+++ b/tools/owperf/README.md
@@ -0,0 +1,101 @@
+
+# :electric_plug: owperf - a performance test tool for Apache OpenWhisk
+
+## General Info
+This test tool benchmarks an OpenWhisk deployment for (warm) latency and 
throughput, with several new capabilities:
+1. Measure performance of rules (trigger-to-action) in addition to actions
+1. Deeper profiling without instrumentation (e.g., Kamino) by leveraging the 
activation records in addition to the client's timing data. This avoids special 
setups, and can help gain performance insights on third-party deployments of 
OpenWhisk.
+1. New tunables that can affect performance:
+   1. Parameter size - controls the size of the parameter passed to the action 
or event
+   1. Actions per iteration (a.k.a. _ratio_) - controls how many rules are 
associated with a trigger [for rules] or how many actions are asynchronously 
invoked (burst size) at each iteration of a test worker [for actions].
+1. "Master apart" mode - Allow the master client to perform latency 
measurements while the worker clients stress OpenWhisk using a specific 
invocation pattern in the background. Useful for measuring latency under load, 
and for comparing latencies of rules and actions under load.
+The tool is written in node.js, using mainly the modules of OpenWhisk client, 
cluster for concurrency, and commander for CLI procssing.
+
+### Operation
+The general operation of a test is simple:
+1. **Setup**: the tool creates the test action, test trigger, and a number of 
rules that matches the ratio tunable above.
+1. **Test**: the tool fires up a specified number of concurrent clients - a 
master and workers.
+   1. Each client wakes up once every _delta_ msec (iteration) and invokes the 
specified activity: either the trigger (for rule testing) or multiple 
concurrent actions - matching the ratio tunable. Action invocations can be 
blocking.
+   1. After each client has completed a number of initial iterations (warmup), 
measurement begins, controlled by the master client, for either a specified 
number of iterations or specified time.
+   1. At the end of the measurement, each client retrieves the activation 
records of its triggers and/or actions, and generates summary data that is sent 
to the master, which generates and prints the final results.
+1. **Teardown**: clean up the OpenWhisk assets created during setup
+
+Final results are written to the standard output stream (so can be redirected 
to a file) as a single highly-detailed CSV record containing all the input 
settings and the output measurements (see below). There is additional control 
information that is written to the standard error stream and can be silenced in 
CLI. The control information also contains the CSV header, so it can be copied 
into a spreadsheet if needed.
+
+It is possible to invoke the tool in "Master apart" mode, where the master 
client is invoking a diffrent activity than the workers, and at possibly a 
different (very likely, much slower) rate. In this mode, latency statsitics are 
computed based solely on the master's data, since the worker's activity is used 
only as background to stress the OpenWhisk deployment. So one experiment can 
have the master client invoke rules and another one can have the master client 
invoke actions, while in b [...]
+
+The tool is highly customizable via CLI options. All the independent test 
variables are controlled via CLI. This includes number of workers, invocation 
pattern, OW client configuration, test action sleep time, etc.
+
+Test setup and teardown can be independently skipped via CLI, and/or directly 
invoked from the external setup script (```setup.sh```), so that setup can be 
shared between multiple tests. More advanced users can replace the test action 
with a custom action in the setup script to benchmark action invocation or 
event-respose throughput and latency of specific 

[incubator-openwhisk-devtools] branch master updated: adding utility to automate stip debug (#239)

2019-04-02 Thread mrutkowski
This is an automated email from the ASF dual-hosted git repository.

mrutkowski pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-devtools.git


The following commit(s) were added to refs/heads/master by this push:
 new d171a93  adding utility to automate stip debug (#239)
d171a93 is described below

commit d171a9348e2f7fed517ed4fac952f1e9e980c84e
Author: Priti Desai 
AuthorDate: Tue Apr 2 18:55:28 2019 -0700

adding utility to automate stip debug (#239)
---
 knative-build/runtimes/javascript/utils/cleanjs.sh | 44 ++
 1 file changed, 44 insertions(+)

diff --git a/knative-build/runtimes/javascript/utils/cleanjs.sh 
b/knative-build/runtimes/javascript/utils/cleanjs.sh
new file mode 100755
index 000..14335cc
--- /dev/null
+++ b/knative-build/runtimes/javascript/utils/cleanjs.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+# 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.
+#
+USAGE="cleanjs.sh "
+
+if [ $1 ]
+then
+: # $1 was given
+SOURCE=$1
+
+echo "SOURCE=[$SOURCE]"
+TARGET=$SOURCE"/.cleanjs"
+echo "TARGET=[$TARGET]"
+
+# create target directory
+mkdir -p $TARGET
+
+# copy all javascript files while preserving the original path
+find $SOURCE -name "*.js" | cpio -p -dumv $TARGET/
+
+# remove the package itself
+find $TARGET -type f -exec sed -i '' -e '\|utils/debug|d' '{}' \;
+
+# remove all lines that dereference the package (i.e., named DEBUG by 
convention)
+find $TARGET -type f -exec sed -i '' -e '/DEBUG/d' '{}' \;
+
+else
+echo $USAGE
+exit 1
+fi



[incubator-openwhisk-devtools] branch master updated: Enable knative stem runtime for separate init and activation data invocations (#238)

2019-04-02 Thread pdesai
This is an automated email from the ASF dual-hosted git repository.

pdesai pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-devtools.git


The following commit(s) were added to refs/heads/master by this push:
 new f6856d1  Enable knative stem runtime for separate init and activation 
data invocations (#238)
f6856d1 is described below

commit f6856d1c61c15ec730cc3197e68706c7ad908de8
Author: Matt Rutkowski 
AuthorDate: Tue Apr 2 17:17:49 2019 -0500

Enable knative stem runtime for separate init and activation data 
invocations (#238)
---
 .../runtimes/javascript/platform/knative.js| 67 +-
 1 file changed, 52 insertions(+), 15 deletions(-)

diff --git a/knative-build/runtimes/javascript/platform/knative.js 
b/knative-build/runtimes/javascript/platform/knative.js
index f1a69db..2582401 100644
--- a/knative-build/runtimes/javascript/platform/knative.js
+++ b/knative-build/runtimes/javascript/platform/knative.js
@@ -404,32 +404,69 @@ function PlatformKnativeImpl(platformFactory) {
 try {
 DEBUG.dumpObject(service.initialized(),"service.initialized()");
 
-// Process request and process env. variables to provide them in 
the manner
-// an OpenWhisk Action expects them, as well as enable additional 
Http features.
-preProcessRequest(req);
-
 // Do not process requests with init. data if this is not a "stem" 
cell
 if (hasInitData(req) && !isStemCell(process.env))
 throw ("Cannot initialize a runtime with a dedicated 
function.");
 
-service.initCode(req).then(function () {
+if(hasInitData(req) && hasActivationData(req)){
+
+// Process request and process env. variables to provide them 
in the manner
+// an OpenWhisk Action expects them, as well as enable 
additional Http features.
+preProcessRequest(req);
+
+service.initCode(req).then(function () {
+service.runCode(req).then(function (result) {
+postProcessResponse(req, result, res)
+});
+}).catch(function (error) {
+console.error(error);
+if (typeof error.code === "number" && typeof 
error.response !== "undefined") {
+res.status(error.code).json(error.response);
+} else {
+console.error("[wrapEndpoint]", "invalid errored 
promise", JSON.stringify(error));
+res.status(500).json({ error: "Internal error during 
function execution." });
+}
+});
+} else if(hasInitData(req)){
+
+// Process request and process env. variables to provide them 
in the manner
+// an OpenWhisk Action expects them, as well as enable 
additional Http features.
+preProcessRequest(req);
+
+service.initCode(req).then(function () {
+}).catch(function (error) {
+console.error(error);
+if (typeof error.code === "number" && typeof 
error.response !== "undefined") {
+res.status(error.code).json(error.response);
+} else {
+console.error("[wrapEndpoint]", "invalid errored 
promise", JSON.stringify(error));
+res.status(500).json({ error: "Internal error during 
function execution." });
+}
+});
+} else if(hasActivationData(req)){
+// Process request and process env. variables to provide them 
in the manner
+// an OpenWhisk Action expects them, as well as enable 
additional Http features.
+preProcessRequest(req);
+
 service.runCode(req).then(function (result) {
 postProcessResponse(req, result, res)
+}).catch(function (error) {
+console.error(error);
+if (typeof error.code === "number" && typeof 
error.response !== "undefined") {
+res.status(error.code).json(error.response);
+} else {
+console.error("[wrapEndpoint]", "invalid errored 
promise", JSON.stringify(error));
+res.status(500).json({ error: "Internal error during 
function execution." });
+}
 });
-}).catch(function (error) {
-console.error(error);
-if (typeof error.code === "number" && typeof error.response 
!== "undefined") {
-res.status(error.code).json(error.response);
-} else {
-console.error("[wrapEndpoint]", "invalid errored promise", 
JSON.stringify(error));
-

[incubator-openwhisk-website] branch asf-site updated: Automatic Site Publish by Jenkins

2019-04-02 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new d530797  Automatic Site Publish by Jenkins
d530797 is described below

commit d53079798d237b087bb9b52dadc6edbd43eb8175
Author: jenkins 
AuthorDate: Tue Apr 2 19:50:24 2019 +

Automatic Site Publish by Jenkins
---
 feed.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/feed.xml b/feed.xml
index d3b7023..23ff93d 100644
--- a/feed.xml
+++ b/feed.xml
@@ -1,2 +1,2 @@
-http://www.w3.org/2005/Atom; >https://jekyllrb.com/; 
version="3.3.0">Jekyll2019-04-02T19:49:34+00:00/feed.xmlApache OpenWhisk is a serverless, open source cloud 
platformAn open source platform for serverless, event-driven 
code at any  [...]
+http://www.w3.org/2005/Atom; >https://jekyllrb.com/; 
version="3.3.0">Jekyll2019-04-02T19:50:19+00:00/feed.xmlApache OpenWhisk is a serverless, open source cloud 
platformAn open source platform for serverless, event-driven 
code at any  [...]
 
\ No newline at end of file



[incubator-openwhisk-website] branch asf-site updated: Automatic Site Publish by Jenkins

2019-04-02 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new c04c71d  Automatic Site Publish by Jenkins
c04c71d is described below

commit c04c71dc0bb527ff41d59f0421551c5f666a3787
Author: jenkins 
AuthorDate: Tue Apr 2 19:49:39 2019 +

Automatic Site Publish by Jenkins
---
 feed.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/feed.xml b/feed.xml
index 3a4db20..d3b7023 100644
--- a/feed.xml
+++ b/feed.xml
@@ -1,2 +1,2 @@
-http://www.w3.org/2005/Atom; >https://jekyllrb.com/; 
version="3.3.0">Jekyll2019-04-02T19:48:50+00:00/feed.xmlApache OpenWhisk is a serverless, open source cloud 
platformAn open source platform for serverless, event-driven 
code at any  [...]
+http://www.w3.org/2005/Atom; >https://jekyllrb.com/; 
version="3.3.0">Jekyll2019-04-02T19:49:34+00:00/feed.xmlApache OpenWhisk is a serverless, open source cloud 
platformAn open source platform for serverless, event-driven 
code at any  [...]
 
\ No newline at end of file



[incubator-openwhisk-website] branch asf-site updated: Automatic Site Publish by Jenkins

2019-04-02 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new da8739e  Automatic Site Publish by Jenkins
da8739e is described below

commit da8739e29e0ba568a6e7e55ed7f932c03845d7eb
Author: jenkins 
AuthorDate: Tue Apr 2 19:48:56 2019 +

Automatic Site Publish by Jenkins
---
 feed.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/feed.xml b/feed.xml
index c6246d3..3a4db20 100644
--- a/feed.xml
+++ b/feed.xml
@@ -1,2 +1,2 @@
-http://www.w3.org/2005/Atom; >https://jekyllrb.com/; 
version="3.3.0">Jekyll2019-04-02T19:48:07+00:00/feed.xmlApache OpenWhisk is a serverless, open source cloud 
platformAn open source platform for serverless, event-driven 
code at any  [...]
+http://www.w3.org/2005/Atom; >https://jekyllrb.com/; 
version="3.3.0">Jekyll2019-04-02T19:48:50+00:00/feed.xmlApache OpenWhisk is a serverless, open source cloud 
platformAn open source platform for serverless, event-driven 
code at any  [...]
 
\ No newline at end of file



[incubator-openwhisk-website] branch asf-site updated: Automatic Site Publish by Jenkins

2019-04-02 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 9fdae81  Automatic Site Publish by Jenkins
9fdae81 is described below

commit 9fdae818e867fecc0dd26746767e6c367e2c0c3a
Author: jenkins 
AuthorDate: Tue Apr 2 19:48:12 2019 +

Automatic Site Publish by Jenkins
---
 css/main-v1.css | 2 +-
 feed.xml| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/css/main-v1.css b/css/main-v1.css
index b62e1d1..2b72463 100644
--- a/css/main-v1.css
+++ b/css/main-v1.css
@@ -1 +1 @@
-html,body{margin:0;padding:0}input,button{outline:none}button{cursor:pointer}a{text-decoration:none}.clear{display:block;clear:both}*{box-sizing:border-box;background:none;border:0}body{font-family:"Roboto",sans-serif}h1,h2,h3,h4,h5,h6{font-weight:500;margin:0}h1{font-size:32px;line-height:normal}h2{font-size:28px;line-height:normal}h3{font-size:24px;line-height:32px}h4{font-size:22px;line-height:30px}h5{font-size:16px;line-height:24px}h6{font-size:14px;font-style:italic;line-height:24px
 [...]
+html,body{margin:0;padding:0}input,button{outline:none}button{cursor:pointer}a{text-decoration:none}.clear{display:block;clear:both}*{box-sizing:border-box;background:none;border:0}body{font-family:"Roboto",sans-serif}h1,h2,h3,h4,h5,h6{font-weight:500;margin:0}h1{font-size:32px;line-height:normal}h2{font-size:28px;line-height:normal}h3{font-size:24px;line-height:32px}h4{font-size:22px;line-height:30px}h5{font-size:16px;line-height:24px}h6{font-size:14px;font-style:italic;line-height:24px
 [...]
diff --git a/feed.xml b/feed.xml
index a2985e7..c6246d3 100644
--- a/feed.xml
+++ b/feed.xml
@@ -1,2 +1,2 @@
-http://www.w3.org/2005/Atom; >https://jekyllrb.com/; 
version="3.3.0">Jekyll2019-04-02T12:44:25+00:00/feed.xmlApache OpenWhisk is a serverless, open source cloud 
platformAn open source platform for serverless, event-driven 
code at any  [...]
+http://www.w3.org/2005/Atom; >https://jekyllrb.com/; 
version="3.3.0">Jekyll2019-04-02T19:48:07+00:00/feed.xmlApache OpenWhisk is a serverless, open source cloud 
platformAn open source platform for serverless, event-driven 
code at any  [...]
 
\ No newline at end of file



[incubator-openwhisk-website] branch master updated: Can read black text on dark blue background. (#368)

2019-04-02 Thread mrutkowski
This is an automated email from the ASF dual-hosted git repository.

mrutkowski pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-website.git


The following commit(s) were added to refs/heads/master by this push:
 new dd52ec4  Can read black text on dark blue background. (#368)
dd52ec4 is described below

commit dd52ec437c35dd75138dd7b21196b10dfdeed11e
Author: Rick van Lieshout 
AuthorDate: Tue Apr 2 21:46:07 2019 +0200

Can read black text on dark blue background. (#368)

Python keyword 'in' was rendered black. You can't read that on a  
dark-blue-ish background.
---
 _scss/_highlite-syntax-colors.scss | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/_scss/_highlite-syntax-colors.scss 
b/_scss/_highlite-syntax-colors.scss
index f19da7a..3d3a614 100644
--- a/_scss/_highlite-syntax-colors.scss
+++ b/_scss/_highlite-syntax-colors.scss
@@ -40,7 +40,7 @@
 .highlight .nn { color: #0e84b5; font-weight: 400 } /* Name.Namespace */
 .highlight .nt { color: #007700 } /* Name.Tag */
 .highlight .nv { color: #7899ba } /* Name.Variable */
-.highlight .ow { color: #00; font-weight: 400 } /* Operator.Word */
+.highlight .ow { 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 */



[incubator-openwhisk-devtools] branch master updated: Distinguish between dedicated versus stem cell runtimes (#237)

2019-04-02 Thread pdesai
This is an automated email from the ASF dual-hosted git repository.

pdesai pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-devtools.git


The following commit(s) were added to refs/heads/master by this push:
 new 072080e  Distinguish between dedicated versus stem cell runtimes (#237)
072080e is described below

commit 072080ee34883ed397a3c2d2b5a079df29f0e117
Author: Matt Rutkowski 
AuthorDate: Tue Apr 2 13:32:15 2019 -0500

Distinguish between dedicated versus stem cell runtimes (#237)
---
 .../runtimes/javascript/platform/knative.js| 107 +++--
 .../runtimes/javascript/platform/platform.js   |   5 +-
 knative-build/runtimes/javascript/src/service.js   |   7 +-
 3 files changed, 101 insertions(+), 18 deletions(-)

diff --git a/knative-build/runtimes/javascript/platform/knative.js 
b/knative-build/runtimes/javascript/platform/knative.js
index cf08873..f1a69db 100644
--- a/knative-build/runtimes/javascript/platform/knative.js
+++ b/knative-build/runtimes/javascript/platform/knative.js
@@ -22,6 +22,86 @@ const OW_ENV_PREFIX = "__OW_";
 const CONTENT_TYPE = "Content-Type";
 
 /**
+ * Determine if runtime is a "stem" cell, i.e., can be initialized with 
request init. data
+ * @param env
+ * @returns {boolean}
+ */
+function isStemCell(env) {
+let actionCode = env.__OW_ACTION_CODE;
+// It is a stem cell if valid code is "built into" the runtime's process 
environment.
+return (typeof actionCode === 'undefined' || actionCode.length === 0);
+}
+
+/**
+ * Determine if the request (body) contains valid activation data.
+ * @param req
+ * @returns {boolean}
+ */
+function hasActivationData(req) {
+// it is a valid activation if the body contains an activation and value 
keys with data.
+if (typeof req.body !== "undefined" &&
+typeof req.body.activation !== "undefined" &&
+typeof req.body.value !== "undefined") {
+return true;
+}
+return false;
+}
+
+/**
+ * Determine if the request (body) contains valid init data.
+ * @param req
+ * @returns {boolean}
+ */
+function hasInitData(req) {
+// it is a valid init. if the body contains an init key with data.
+if (typeof req.body !== "undefined" &&
+typeof req.body.init !== "undefined") {
+return true;
+}
+return false;
+}
+
+/**
+ * Determine if runtime is a "stem" cell, i.e., can be initialized with 
request init. data
+ * @param env
+ * @returns {boolean}
+ */
+function isStemCell(env) {
+let actionCode = env.__OW_ACTION_CODE;
+// It is a stem cell if valid code is "built into" the runtime's process 
environment.
+return (typeof actionCode === 'undefined' || actionCode.length === 0);
+}
+
+/**
+ * Determine if the request (body) contains valid activation data.
+ * @param req
+ * @returns {boolean}
+ */
+function hasActivationData(req) {
+// it is a valid activation if the body contains an activation and value 
keys with data.
+if (typeof req.body !== "undefined" &&
+typeof req.body.activation !== "undefined" &&
+typeof req.body.value !== "undefined") {
+return true;
+}
+return false;
+}
+
+/**
+ * Determine if the request (body) contains valid init data.
+ * @param req
+ * @returns {boolean}
+ */
+function hasInitData(req) {
+// it is a valid init. if the body contains an init key with data.
+if (typeof req.body !== "undefined" &&
+typeof req.body.init !== "undefined") {
+return true;
+}
+return false;
+}
+
+/**
  * Pre-process the incoming
  */
 function preProcessInitData(env, initdata, valuedata, activationdata) {
@@ -54,13 +134,19 @@ function preProcessInitData(env, initdata, valuedata, 
activationdata) {
 if (initdata.code && typeof initdata.code === 'string') {
 code = initdata.code;
 }
-if (initdata.binary && typeof initdata.binary === 'boolean') {
-// TODO: Throw error if BINARY is not 'true' or 'false'
-binary = initdata.binary;
+if (initdata.binary) {
+if (typeof initdata.binary === 'boolean') {
+binary = initdata.binary;
+} else {
+throw ("Invalid Init. data; expected boolean for key 
'binary'.");
+}
 }
-if (initdata.raw && typeof initdata.raw === 'boolean') {
-// TODO: Throw error if RAW is not 'true' or 'false'
-raw = initdata.raw;
+if (initdata.raw ) {
+if (typeof initdata.raw === 'boolean') {
+raw = initdata.raw;
+} else {
+throw ("Invalid Init. data; expected boolean for key 
'raw'.");
+}
 }
 }
 
@@ -81,7 +167,6 @@ function preProcessInitData(env, initdata, valuedata, 
activationdata) {
 activationdata.action_name = actionName;

svn commit: r33408 - in /release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating: openwhisk-composer-0.9.0-incubating-sources.tar.gz openwhisk-composer-0.9.0-incubating-sources.tar.gz.asc openwh

2019-04-02 Thread dgrove
Author: dgrove
Date: Tue Apr  2 17:19:34 2019
New Revision: 33408

Log:
archive composer-0.9.0; replaced by 0.10.0


Removed:

release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-composer-0.9.0-incubating-sources.tar.gz

release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-composer-0.9.0-incubating-sources.tar.gz.asc

release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-composer-0.9.0-incubating-sources.tar.gz.sha512



svn commit: r33407 - /release/incubator/openwhisk/apache-openwhisk-0.9.8-incubating/

2019-04-02 Thread dgrove
Author: dgrove
Date: Tue Apr  2 15:19:03 2019
New Revision: 33407

Log:
archive wskdeploy 0.9.8; replaced by wskdeploy 0.10.0


Removed:
release/incubator/openwhisk/apache-openwhisk-0.9.8-incubating/



[incubator-openwhisk-runtime-docker] branch master updated: Fix readme typo (#68)

2019-04-02 Thread dgrove
This is an automated email from the ASF dual-hosted git repository.

dgrove pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-docker.git


The following commit(s) were added to refs/heads/master by this push:
 new 3d6ee06  Fix readme typo (#68)
3d6ee06 is described below

commit 3d6ee0610d6f319d9d008870932f7830ab5301f3
Author: Avi Weit 
AuthorDate: Tue Apr 2 16:36:08 2019 +0300

Fix readme typo (#68)
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index c01c912..3e1b5ab 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@ Create a zip action with a `exec` in the root of the zip
 ```
 echo \
 '#!/bin/bash
-echo "{\"messag\":\"Hello World\"}"' > exec
+echo "{\"message\":\"Hello World\"}"' > exec
 ```
 ```
 chmod +x exec



svn commit: r33403 - in /dev/incubator/openwhisk: apache-openwhisk-0.10.0-incubating-rc1/ apache-openwhisk-0.9.0-incubating-rc1/ apache-openwhisk-0.9.0-incubating-rc2/ apache-openwhisk-0.9.8-incubatin

2019-04-02 Thread dgrove
Author: dgrove
Date: Tue Apr  2 13:32:47 2019
New Revision: 33403

Log:
housekeeping: remove release candidates from completed releases


Removed:
dev/incubator/openwhisk/apache-openwhisk-0.10.0-incubating-rc1/
dev/incubator/openwhisk/apache-openwhisk-0.9.0-incubating-rc1/
dev/incubator/openwhisk/apache-openwhisk-0.9.0-incubating-rc2/
dev/incubator/openwhisk/apache-openwhisk-0.9.8-incubating-rc1/
dev/incubator/openwhisk/apache-openwhisk-1.12.0-incubating-rc1/
dev/incubator/openwhisk/apache-openwhisk-2.0.0-incubating-rc1/



[incubator-openwhisk-website] branch asf-site updated: Automatic Site Publish by Jenkins

2019-04-02 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 7242489  Automatic Site Publish by Jenkins
7242489 is described below

commit 72424896a3ccc734a2fb524b44b61cc94ae95c04
Author: jenkins 
AuthorDate: Tue Apr 2 12:44:29 2019 +

Automatic Site Publish by Jenkins
---
 downloads.html | 4 
 feed.xml   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/downloads.html b/downloads.html
index 177fc54..79f15af 100644
--- a/downloads.html
+++ b/downloads.html
@@ -266,6 +266,10 @@ function addListenersToSections()
   should read about them below under
   Developer Builds.
 
+
+Older releases are archived at
+http://archive.apache.org/dist/incubator/openwhisk/;>archive.apache.org.
+
 
 Verifying
 As an Apache project, all downloaded files are signed by a
diff --git a/feed.xml b/feed.xml
index bd88a67..a2985e7 100644
--- a/feed.xml
+++ b/feed.xml
@@ -1,2 +1,2 @@
-http://www.w3.org/2005/Atom; >https://jekyllrb.com/; 
version="3.3.0">Jekyll2019-04-01T17:37:01+00:00/feed.xmlApache OpenWhisk is a serverless, open source cloud 
platformAn open source platform for serverless, event-driven 
code at any  [...]
+http://www.w3.org/2005/Atom; >https://jekyllrb.com/; 
version="3.3.0">Jekyll2019-04-02T12:44:25+00:00/feed.xmlApache OpenWhisk is a serverless, open source cloud 
platformAn open source platform for serverless, event-driven 
code at any  [...]
 
\ No newline at end of file



[incubator-openwhisk-website] branch master updated: Link to archive.apache.org (#370)

2019-04-02 Thread dgrove
This is an automated email from the ASF dual-hosted git repository.

dgrove pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-website.git


The following commit(s) were added to refs/heads/master by this push:
 new 8f2d674  Link to archive.apache.org (#370)
8f2d674 is described below

commit 8f2d674dcaee279b2674b5d7457abc1a059b2ce2
Author: Bertrand Delacretaz 
AuthorDate: Tue Apr 2 14:42:23 2019 +0200

Link to archive.apache.org (#370)
---
 _layouts/downloads.html | 4 
 1 file changed, 4 insertions(+)

diff --git a/_layouts/downloads.html b/_layouts/downloads.html
index ceceddb..73e00ba 100644
--- a/_layouts/downloads.html
+++ b/_layouts/downloads.html
@@ -71,6 +71,10 @@ layout: default
   should read about them below under
   Developer Builds.
 
+
+Older releases are archived at
+http://archive.apache.org/dist/incubator/openwhisk/;>archive.apache.org.
+
 
 Verifying
 As an Apache project, all downloaded files are signed by a



svn commit: r33401 - /release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/

2019-04-02 Thread dgrove
Author: dgrove
Date: Tue Apr  2 12:41:02 2019
New Revision: 33401

Log:
archive OpenWhisk cli 0.9.0-incubating; replaced by version 0.10.0-incubating


Removed:

release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-cli-0.9.0-incubating-sources.tar.gz

release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-cli-0.9.0-incubating-sources.tar.gz.asc

release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-cli-0.9.0-incubating-sources.tar.gz.sha512

release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-client-go-0.9.0-incubating-sources.tar.gz

release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-client-go-0.9.0-incubating-sources.tar.gz.asc

release/incubator/openwhisk/apache-openwhisk-0.9.0-incubating/openwhisk-client-go-0.9.0-incubating-sources.tar.gz.sha512



[incubator-openwhisk] branch master updated: Turn method 'remove' into tail recursive. (#4421)

2019-04-02 Thread markusthoemmes
This is an automated email from the ASF dual-hosted git repository.

markusthoemmes pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
 new 6453def  Turn method 'remove' into tail recursive. (#4421)
6453def is described below

commit 6453def3a8fe71a0cfdeade056ecedad4bad93b5
Author: Lin 
AuthorDate: Tue Apr 2 19:33:53 2019 +0800

Turn method 'remove' into tail recursive. (#4421)
---
 .../apache/openwhisk/core/containerpool/ContainerPool.scala   | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git 
a/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
 
b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
index 390eea8..77b1903 100644
--- 
a/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
+++ 
b/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
@@ -22,6 +22,8 @@ import org.apache.openwhisk.common.{AkkaLogging, 
LoggingMarkers, TransactionId}
 import org.apache.openwhisk.core.connector.MessageFeed
 import org.apache.openwhisk.core.entity._
 import org.apache.openwhisk.core.entity.size._
+
+import scala.annotation.tailrec
 import scala.collection.immutable
 import scala.concurrent.duration._
 import scala.util.Try
@@ -375,7 +377,10 @@ object ContainerPool {
* @param memory the amount of memory that has to be freed up
* @return a list of containers to be removed iff found
*/
-  protected[containerpool] def remove[A](pool: Map[A, ContainerData], memory: 
ByteSize): List[A] = {
+  @tailrec
+  protected[containerpool] def remove[A](pool: Map[A, ContainerData],
+ memory: ByteSize,
+ toRemove: List[A] = List.empty): 
List[A] = {
 // Try to find a Free container that does NOT have any active activations 
AND is initialized with any OTHER action
 val freeContainers = pool.collect {
   // Only warm containers will be removed. Prewarmed containers will stay 
always.
@@ -391,13 +396,13 @@ object ContainerPool {
   val (ref, data) = freeContainers.minBy(_._2.lastUsed)
   // Catch exception if remaining memory will be negative
   val remainingMemory = Try(memory - data.memoryLimit).getOrElse(0.B)
-  List(ref) ++ remove(freeContainers - ref, remainingMemory)
+  remove(freeContainers - ref, remainingMemory, toRemove ++ List(ref))
 } else {
   // If this is the first call: All containers are in use currently, or 
there is more memory needed than
   // containers can be removed.
   // Or, if this is one of the recursions: Enough containers are found to 
get the memory, that is
   // necessary. -> Abort recursion
-  List.empty
+  toRemove
 }
   }