[GitHub] akrabat commented on issue #253: Api v2 management allows swagger config to have basepath and path both set to /

2017-08-03 Thread git
akrabat commented on issue #253: Api v2 management allows swagger config to 
have basepath and path both set to /
URL: 
https://github.com/apache/incubator-openwhisk-apigateway/issues/253#issuecomment-320163023
 
 
   FWiW, I would like this to work. I can't remember the last time I created an 
API that didn't have a root endpoint.
 

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] Katiyman commented on issue #2221: Unable to create trigger

2017-08-03 Thread git
Katiyman commented on issue #2221: Unable to create trigger 
URL: 
https://github.com/apache/incubator-openwhisk/issues/2221#issuecomment-320161921
 
 
   @hsane2001 Actually we need not expose it as the ENV variable but rather in 
each command in the Dockerfile then this will not be 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] dubeejw commented on issue #2491: Limit length of HTTP body displayed when debugging.

2017-08-03 Thread git
dubeejw commented on issue #2491: Limit length of HTTP body displayed when 
debugging.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2491#issuecomment-320141678
 
 
   @bpoole16, how about doing it this way? 
https://github.com/dubeejw/openwhisk/commit/a43defcb520f12b049be3ed32fd9515d8d811e3e
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2491: Limit length of HTTP body displayed when debugging.

2017-08-03 Thread git
dubeejw commented on issue #2491: Limit length of HTTP body displayed when 
debugging.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2491#issuecomment-320141678
 
 
   @bpoole16, how about doing it this way? 
https://github.com/dubeejw/openwhisk/commit/abe6142c6a959a10be7cc1fafb9c870c9acef7bf
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2491: Limit length of HTTP body displayed when debugging.

2017-08-03 Thread git
dubeejw commented on issue #2491: Limit length of HTTP body displayed when 
debugging.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2491#issuecomment-320141678
 
 
   @bpoole16, how about doing it this way? 
https://github.com/dubeejw/openwhisk/commit/5b57eb6ddd4b6d55a051f24f6e221b2fba944dd8
 

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 #2517: Support client certificate verify on server side

2017-08-03 Thread git
rabbah commented on issue #2517: Support client certificate verify on server 
side
URL: 
https://github.com/apache/incubator-openwhisk/pull/2517#issuecomment-320134974
 
 
   Oops. I meant CLA 
https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md
 

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] ningyougang commented on issue #2517: Support client certificate verify on server side

2017-08-03 Thread git
ningyougang commented on issue #2517: Support client certificate verify on 
server side
URL: 
https://github.com/apache/incubator-openwhisk/pull/2517#issuecomment-320134074
 
 
   @rabbah What's mean for `do you have an Apache SLA already on file`?
   I use `google` to search it, seems mean: `Service-Level Agreement`
   The `Apache SLA` has relation with this PR?
 

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


With regards,
Apache Git Services


[GitHub] drcariel commented on issue #2547: CLI Experimental api removal

2017-08-03 Thread git
drcariel commented on issue #2547: CLI Experimental api removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#issuecomment-320122694
 
 
   passing build: PG2~1904
 

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 opened a new issue #2573: CLI invalid subcommand returns status code zero

2017-08-03 Thread git
rabbah opened a new issue #2573: CLI invalid subcommand returns status code zero
URL: https://github.com/apache/incubator-openwhisk/issues/2573
 
 
   The error status is properly reported if the first command name is invalid. 
However, if an invalid subcommand is specified the returned status code is zero 
instead of non-zero.
   
   ```
   $ wsk pa
   Error: unknown command "pa" for "wsk"
   Did you mean this?
   package
   api
   Run 'wsk --help' for usage.
   unknown command "pa" for "wsk"
   Did you mean this?
   package
   api
   $ echo $?
   1
   $ wsk package xxx
   work with packages
   Usage:
 wsk package [command]
   Available Commands:
 bindbind parameters to a package
 create  create a new package
 update  update an existing package, or create a package if it does not 
exist
 get get package
 delete  delete package
 listlist all packages
 refresh refresh package bindings
   Global Flags:
 --apihost HOST whisk API HOST
 --apiversion VERSION   whisk API VERSION
 -u, --auth KEY authorization KEY
 --cert string  client cert
 -d, --debugdebug level output
 -i, --insecure bypass certificate checking
 --key string   client key
 -v, --verbose  verbose output
   Use "wsk package [command] --help" for more information about a command.
   $ echo $?
   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] paulcastro commented on issue #24: Doesn't build with Xcode 8.3.2

2017-08-03 Thread git
paulcastro commented on issue #24: Doesn't build with Xcode  8.3.2 
URL: 
https://github.com/apache/incubator-openwhisk-xcode/issues/24#issuecomment-320116373
 
 
   Those are the steps that worked for me.
 

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] troyibm commented on issue #24: Doesn't build with Xcode 8.3.2

2017-08-03 Thread git
troyibm commented on issue #24: Doesn't build with Xcode  8.3.2 
URL: 
https://github.com/apache/incubator-openwhisk-xcode/issues/24#issuecomment-320115934
 
 
   so I could just download the 1.7 source zip, unzip into the 
incubator-openwhisk-xcode directory git clone created (change name of directory 
from ZipArchive-1.7 to ZipArchive), then open the WhiskSwiftTools.xcproject and 
do command+B and it will build?   (might be forgetting part with adding the 
libz library..)
 

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


With regards,
Apache Git Services


[GitHub] paulcastro opened a new pull request #25: Add version number to ZipArchive in README

2017-08-03 Thread git
paulcastro opened a new pull request #25: Add version number to ZipArchive in 
README
URL: https://github.com/apache/incubator-openwhisk-xcode/pull/25
 
 
   wsktool will only build with ZipArchive 1.7.  This should be noted in the 
README for people testing out this code.
 

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


With regards,
Apache Git Services


[GitHub] paulcastro commented on issue #24: Doesn't build with Xcode 8.3.2

2017-08-03 Thread git
paulcastro commented on issue #24: Doesn't build with Xcode  8.3.2 
URL: 
https://github.com/apache/incubator-openwhisk-xcode/issues/24#issuecomment-320109602
 
 
   Yes, it does appear that ZipArchive has changed.  I downloaded ZipArchive 
version 1.7 just now and I'm able to build wsktools.
   
   
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
dubeejw commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320108470
 
 
   If we want to provide the eval option, why not `eval "source 
wsk_cli_bash_completion.sh"` instead of the entire content of the file? Where 
`"source wsk_cli_bash_completion.sh"` is returned from the CLI given a flag.
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
dubeejw commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320108470
 
 
   If want want to provide the eval option, why not `eval "source 
wsk_cli_bash_completion.sh"` instead of the entire content of the file? Where 
`"source wsk_cli_bash_completion.sh"` is returned from the CLI given a flag.
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
dubeejw commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320108470
 
 
   If want want to provide the eval option, why not `eval "source 
wsk_cli_bash_completion.sh"` instead of the entire content of the file?
 

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] troyibm commented on issue #24: Doesn't build with Xcode 8.3.2

2017-08-03 Thread git
troyibm commented on issue #24: Doesn't build with Xcode  8.3.2 
URL: 
https://github.com/apache/incubator-openwhisk-xcode/issues/24#issuecomment-320106305
 
 
   I also think things have changed in the ZipArchive project since the 
WhiskSwiftTools.xcproject file has been created as the aes and minizip 
directories are no longer parallel to each other.  The ZipArchive project has 
aes directory UNDER minizip.
 

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 #253: Api v2 management allows swagger config to have basepath and path both set to /

2017-08-03 Thread git
mdeuser commented on issue #253: Api v2 management allows swagger config to 
have basepath and path both set to /
URL: 
https://github.com/apache/incubator-openwhisk-apigateway/issues/253#issuecomment-320105916
 
 
   If an API happens to be created with a basepath and path of `/` each, 
subsequent APIs created after this "/" API can be affected - successful API 
creation followed by API invocation 404 status code results
 

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 #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
rabbah commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320105250
 
 
   this is a _one_ time setup - while i haven't followed closely +1 to 
@dubeejw's points - feels like over engineering this.
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
dubeejw commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320104496
 
 
   Inclined to say that `wsk sdk install autobash` should work as it currently 
does. Meaning it saves the auto-complete script in the current directory. 
Whereas if we want to use eval there should be a special flag `wsk sdk install 
autobash --stdout`. Not sure why anyone would ever want to do an eval as the 
auto-completion will vanish as soon as the terminal is closed.
   
   In order to make autocomplete work on mac whenever the terminal is opened, 
this is where the auto-complete script needs to live in 
`/usr/local/etc/bash_completion.d/wsk_cli_bash_completion.d`. We can provide a 
flag that says to save the script in such directories.
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
dubeejw commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320104496
 
 
   Inclined to say that `wsk sdk install autobash` should work as it currently 
does. Meaning it saves the auto-complete script in the current directory. 
Whereas if we want to use eval there should be a special flag `wsk sdk install 
autobash --stdout`. Not sure why anyone would ever want to do an eval as the 
auto-completion will vanish as soon as my terminal is closed.
   
   In order to make autocomplete work on mac whenever the terminal is opened, 
this is where the auto-complete script needs to live in 
`/usr/local/etc/bash_completion.d/wsk_cli_bash_completion.d`. We can provide a 
flag that says to save the script in such directories.
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
dubeejw commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320104496
 
 
   Inclined to say that `wsk sdk install autobash` should work as it currently 
does. Meaning it saves the auto-complete script in the current directory. 
Whereas if we want to use eval there should be a special flag `eval "`wsk sdk 
install autobash --stdout`"`. Not sure why anyone would ever want to do an eval 
as the auto-completion will vanish as soon as my terminal is closed.
   
   In order to make autocomplete work on mac whenever the terminal is opened, 
this is where the auto-complete script needs to live in 
`/usr/local/etc/bash_completion.d/wsk_cli_bash_completion.d`. We can provide a 
flag that says to save the script in such directories.
 

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] DanLavine commented on issue #46: Deploy CouchDB manually

2017-08-03 Thread git
DanLavine commented on issue #46:  Deploy CouchDB manually
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/46#issuecomment-320102906
 
 
   my updates to travis failed. Will fix those up
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2491: Limit length of HTTP body displayed when debugging.

2017-08-03 Thread git
dubeejw commented on issue #2491: Limit length of HTTP body displayed when 
debugging.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2491#issuecomment-320099090
 
 
   What I noticed was that when I ran an action get for an action that has a 
big zip file attached to it, I still had to scroll through all the normal 
output before I could seen the truncated code in the verbose output. I think 
it'd be better to truncate the code in verbose and normal modes. @rabbah 
 

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 a change in pull request #46: Deploy CouchDB manually

2017-08-03 Thread git
ddragosd commented on a change in pull request #46:  Deploy CouchDB manually
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/46#discussion_r131268233
 
 

 ##
 File path: kubernetes/couchdb/docker/init.sh
 ##
 @@ -18,6 +24,30 @@ pushd /openwhisk
 echo "$AUTH_WHISK_SYSTEM" > /openwhisk/ansible/files/auth.guest
   fi
 
+  # start couchdb with a background process
+  couchdb -b
+
+  # wait for couchdb to be up and running
+  TIMEOUT=0
+  echo "wait for CouchDB to be up and running"
+  until [ $TIMEOUT -eq 25 ]; do
+echo "waiting for CouchDB to be available"
+
+if [ -n $(/etc/init.d/couchdb status | grep 'running') ]; then
+  echo "CouchDB is up and running"
+  break
+fi
+
+sleep 0.2
+let TIMEOUT=TIMEOUT+1
+  done
+
+  if [ $TIMEOUT -eq 25 ]; then
+echo "failed to setup CouchDB"
+exit 1
+  fi
+
+
   # setup and initialize DB
   pushd ansible
 ansible-playbook -i environments/local setup.yml \
 
 Review comment:
   is this pulled from openwhisk master ?
 

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] DanLavine commented on a change in pull request #46: Deploy CouchDB manually

2017-08-03 Thread git
DanLavine commented on a change in pull request #46:  Deploy CouchDB manually
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/46#discussion_r131268025
 
 

 ##
 File path: kubernetes/couchdb/README.md
 ##
 @@ -10,23 +10,33 @@ Pod. This can be done by running:
 kubectl apply -f couchdb.yml
 ```
 
-Once the Pod is up and running, the pod then needs to be
-configured. To do this, you need to run the configuration
-pod:
+This pod goes through the process of pulling the OpenWhisk
+repo and running through some of the ansible playbooks for
+configuring CouchDB.
+
+**NOTE** the pod will say running as soon as the start command
 
 Review comment:
   oops
 

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 a change in pull request #46: Deploy CouchDB manually

2017-08-03 Thread git
ddragosd commented on a change in pull request #46:  Deploy CouchDB manually
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/46#discussion_r131267712
 
 

 ##
 File path: kubernetes/couchdb/README.md
 ##
 @@ -10,23 +10,33 @@ Pod. This can be done by running:
 kubectl apply -f couchdb.yml
 ```
 
-Once the Pod is up and running, the pod then needs to be
-configured. To do this, you need to run the configuration
-pod:
+This pod goes through the process of pulling the OpenWhisk
+repo and running through some of the ansible playbooks for
+configuring CouchDB.
+
+**NOTE** the pod will say running as soon as the start command
 
 Review comment:
   tiny typo `stay`
 

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 #2517: Support client certificate verify on server side

2017-08-03 Thread git
rabbah commented on issue #2517: Support client certificate verify on server 
side
URL: 
https://github.com/apache/incubator-openwhisk/pull/2517#issuecomment-320094389
 
 
   @ningyougang can you verify that you have an Apache SLA on file?
 

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


With regards,
Apache Git Services


[GitHub] rabbah closed pull request #2556: Fix bug on set_fact relative ansible task

2017-08-03 Thread git
rabbah closed pull request #2556: Fix bug on set_fact relative ansible task
URL: https://github.com/apache/incubator-openwhisk/pull/2556
 
 
   
 

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 #61: code coverage

2017-08-03 Thread git
csantanapr closed pull request #61: code coverage
URL: https://github.com/apache/incubator-openwhisk-client-js/pull/61
 
 
   
 

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] aml2732 commented on issue #61: code coverage

2017-08-03 Thread git
aml2732 commented on issue #61: code coverage
URL: 
https://github.com/apache/incubator-openwhisk-client-js/pull/61#issuecomment-320088490
 
 
   ### Summary of changes: 
 **@justin**: There isn't too much detail on nyc that I could google, 
however, I've made changes such that the status of the tests is reflected by 
the travis-success/failure-state.
   
 **@carlos**: Pretty sure the badge will say something other than 'unknown' 
once this has run on 
`https://travis-ci.org/apache/incubator-openwhisk-client-js`.
   
   Example of code coverage exported to codecov.io : 
`https://codecov.io/gh/aml2732/incubator-openwhisk-client-js/tree/4f531b45028b35beaffa4c77abfc5653b445e51a`
   
   caveat: The tests are running against babel-compiled-down-to-ECMA5 version 
of the code. 
 

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


With regards,
Apache Git Services


[GitHub] codecov-io commented on issue #61: code coverage

2017-08-03 Thread git
codecov-io commented on issue #61: code coverage
URL: 
https://github.com/apache/incubator-openwhisk-client-js/pull/61#issuecomment-320079968
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/61?src=pr=h1)
 Report
   > :exclamation: No coverage uploaded for pull request base 
(`master@46d5884`). [Click here to learn what that 
means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/61/graphs/tree.svg?height=150=650=j2mPEx0Tkq=pr)](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/61?src=pr=tree)
   
   ```diff
   @@Coverage Diff@@
   ## master  #61   +/-   ##
   =
 Coverage  ?   99.37%   
   =
 Files ?   14   
 Lines ?  318   
 Branches  ?0   
   =
 Hits  ?  316   
 Misses?2   
 Partials  ?0
   ```
   
   
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/61?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-client-js/pull/61?src=pr=footer).
 Last update 
[46d5884...c7e](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/61?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] aml2732 commented on issue #61: code coverage

2017-08-03 Thread git
aml2732 commented on issue #61: code coverage
URL: 
https://github.com/apache/incubator-openwhisk-client-js/pull/61#issuecomment-320088490
 
 
   ### Summary of changes: 
 **@justin**: There isn't too much detail on nyc that I could google, 
however, I've made changes such that the status of the tests is reflected by 
the travis-success/failure-state.
   
 **@carlos**: Pretty sure the badge will say something other than 'unknown' 
once this has run on 
`https://travis-ci.org/apache/incubator-openwhisk-client-js`.
   
   Example of code coverage exported to codecov.io : 
`https://codecov.io/gh/aml2732/incubator-openwhisk-client-js/tree/4f531b45028b35beaffa4c77abfc5653b445e51a`
 

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] troyibm commented on issue #24: Doesn't build with Xcode 8.3.2

2017-08-03 Thread git
troyibm commented on issue #24: Doesn't build with Xcode  8.3.2 
URL: 
https://github.com/apache/incubator-openwhisk-xcode/issues/24#issuecomment-320088283
 
 
   I tried to follow your instructions here @paulcastro and got totally lost.  
I notice that ZipArchive can be pulled in via Carthage.  Could that alleviate 
some of the problems if this project had a Cartfile?
 

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 #2439: Set user agent header in API GW requests

2017-08-03 Thread git
csantanapr closed pull request #2439: Set user agent header in API GW requests
URL: https://github.com/apache/incubator-openwhisk/pull/2439
 
 
   
 

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] spattewar commented on issue #2569: 1 million per second event processing using openwhisk ??

2017-08-03 Thread git
spattewar commented on issue #2569: 1 million per second event processing using 
openwhisk ??
URL: 
https://github.com/apache/incubator-openwhisk/issues/2569#issuecomment-320083712
 
 
   @perryibm thanks for your reponse.
   At this point in time we are still installing openwhisk locally and trying 
to run it and understand it. But scaling to that level is the goal. 
   1. Does this matter if I am able to spawn and run 1 million event handlers? 
so what time each one take to complete is not an issue as long as I can handle 
the events. On another note the job of the event handler is to just push the 
event to another kafka stream to be inserted in database.
   2. This is important and I will make sure to check on this parameter
   3. This could be true to some extent and again an important point to 
consider.
   All valuable points. Thank you.
   But is there a system limit on the number of event handlers that can be 
started?
   thanks
 

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


With regards,
Apache Git Services


[GitHub] dnwe commented on a change in pull request #202: Produce action fixes

2017-08-03 Thread git
dnwe commented on a change in pull request #202: Produce action fixes
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/202#discussion_r131248585
 
 

 ##
 File path: action/kafkaProduce.py
 ##
 @@ -18,46 +18,96 @@
  */
 """
 
-import ssl
 import base64
+import logging
+import sys
+import traceback
+
 from kafka import KafkaProducer
-from kafka.errors import NoBrokersAvailable
+from kafka.errors import NoBrokersAvailable, KafkaTimeoutError, 
AuthenticationFailedError
+from kafka.version import __version__
+from random import shuffle
+
 
+logging.basicConfig(stream=sys.stdout, level=logging.INFO,
+format='%(levelname)-8s %(asctime)s %(message)s',
+datefmt='[%H:%M:%S]')
+
+max_cached_producers = 10
 
 def main(params):
+producer = None
+logging.info("Using kafka-python %s", str(__version__))
+
+print("Validating parameters")
 validationResult = validateParams(params)
 if validationResult[0] != True:
 return {'error': validationResult[1]}
 else:
 validatedParams = validationResult[1]
 
-brokers = params['brokers']
-
-try:
-producer = KafkaProducer(
-api_version_auto_timeout_ms=15000,
-bootstrap_servers=brokers)
-
-print("Created producer")
+attempt = 0
+max_attempts = 3
 
-# only use the key parameter if it is present
-if 'key' in validatedParams:
-messageKey = validatedParams['key']
-producer.send(validatedParams['topic'], 
bytes(validatedParams['value'], 'utf-8'), key=bytes(messageKey, 'utf-8'))
-else:
-producer.send(validatedParams['topic'], 
bytes(validatedParams['value'], 'utf-8'))
+result = {"success": True}
 
-producer.flush()
+while attempt < max_attempts:
+attempt += 1
+print("Starting attempt {}".format(attempt))
 
-print("Sent message")
-except NoBrokersAvailable:
-# this exception's message is a little too generic
+try:
+print("Getting producer")
+producer = getProducer(validatedParams)
+
+topic = validatedParams['topic']
+print("Finding topic {}".format(topic))
+partition_info = producer.partitions_for(topic)
+print("Found topic {} with partition(s) {}".format(topic, 
partition_info))
+
+break
+except Exception as e:
+if attempt == max_attempts:
+producer = None
+logging.warning(e)
+traceback.print_stack(limit=5)
+result = getResultForException(e)
+
+# we successfully connected and found the topic metadata... let's send!
+if producer is not None:
+try:
+print("Producing message")
+
+# only use the key parameter if it is present
+value = validatedParams['value']
+if 'key' in validatedParams:
+messageKey = validatedParams['key']
+future = producer.send(
+topic, bytes(value, 'utf-8'), key=bytes(messageKey, 
'utf-8'))
+else:
+future = producer.send(topic, bytes(value, 'utf-8'))
+
+sent = future.get(timeout=20)
+msg = "Successfully sent message to {}:{} at offset {}".format(
+sent.topic, sent.partition, sent.offset)
+print(msg)
+result = {"success": True, "message": msg}
+except Exception as e:
+logging.warning(e)
+traceback.print_stack(limit=5)
 
 Review comment:
   As above, you want `print_exc` here I think.
 

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] dnwe commented on a change in pull request #202: Produce action fixes

2017-08-03 Thread git
dnwe commented on a change in pull request #202: Produce action fixes
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/202#discussion_r131249653
 
 

 ##
 File path: action/messageHubProduce.py
 ##
 @@ -18,64 +18,97 @@
  */
 """
 
-import ssl
 import base64
+import logging
+import ssl
+import sys
+import traceback
+
 from kafka import KafkaProducer
-from kafka.errors import NoBrokersAvailable, KafkaTimeoutError
+from kafka.errors import NoBrokersAvailable, KafkaTimeoutError, 
AuthenticationFailedError
+from kafka.version import __version__
+from random import shuffle
 
 
+logging.basicConfig(stream=sys.stdout, level=logging.INFO,
+format='%(levelname)-8s %(asctime)s %(message)s',
+datefmt='[%H:%M:%S]')
+
+max_cached_producers = 10
+
 def main(params):
+producer = None
+logging.info("Using kafka-python %s", str(__version__))
+
+print("Validating parameters")
 validationResult = validateParams(params)
 if validationResult[0] != True:
 return {'error': validationResult[1]}
 else:
 validatedParams = validationResult[1]
 
-sasl_mechanism = 'PLAIN'
-security_protocol = 'SASL_SSL'
+attempt = 0
+max_attempts = 3
 
-# Create a new context using system defaults, disable all but TLS1.2
-context = ssl.create_default_context()
-context.options &= ssl.OP_NO_TLSv1
-context.options &= ssl.OP_NO_TLSv1_1
-
-try:
-producer = KafkaProducer(
-api_version=(0, 10),
-api_version_auto_timeout_ms=15000,
-bootstrap_servers=validatedParams['kafka_brokers_sasl'],
-max_block_ms=2,
-request_timeout_ms=2,
-sasl_plain_username=validatedParams['user'],
-sasl_plain_password=validatedParams['password'],
-security_protocol=security_protocol,
-ssl_context=context,
-sasl_mechanism=sasl_mechanism)
+result = {"success": True}
 
-print("Created producer")
+while attempt < max_attempts:
+attempt += 1
+print("Starting attempt {}".format(attempt))
 
-# only use the key parameter if it is present
-if 'key' in validatedParams:
-messageKey = validatedParams['key']
-future = producer.send(validatedParams['topic'], 
bytes(validatedParams['value'], 'utf-8'), key=bytes(messageKey, 'utf-8'))
-else:
-future = producer.send(validatedParams['topic'], 
bytes(validatedParams['value'], 'utf-8'))
-
-sent = future.get(timeout=30)
-msg = "Successfully sent message to {}:{} at offset {}".format(
-sent.topic, sent.partition, sent.offset)
-
-print(msg)
-except KafkaTimeoutError:
-return {'error': 'Timed out communicating with Message Hub.'}
-except NoBrokersAvailable:
-# this exception's message is a little too generic
+try:
+print("Getting producer")
+producer = getProducer(validatedParams)
+
+topic = validatedParams['topic']
+print("Finding topic {}".format(topic))
+partition_info = producer.partitions_for(topic)
+print("Found topic {} with partition(s) {}".format(topic, 
partition_info))
+
+break
+except Exception as e:
+if attempt == max_attempts:
+producer = None
+logging.warning(e)
+traceback.print_stack(limit=5)
+result = getResultForException(e)
+
+# we successfully connected and found the topic metadata... let's send!
+if producer is not None:
+try:
+print("Producing message")
+
+# only use the key parameter if it is present
+value = validatedParams['value']
+if 'key' in validatedParams:
+messageKey = validatedParams['key']
+future = producer.send(
+topic, bytes(value, 'utf-8'), key=bytes(messageKey, 
'utf-8'))
+else:
+future = producer.send(topic, bytes(value, 'utf-8'))
+
+sent = future.get(timeout=20)
+msg = "Successfully sent message to {}:{} at offset {}".format(
+sent.topic, sent.partition, sent.offset)
+print(msg)
+result = {"success": True, "message": msg}
+except Exception as e:
+logging.warning(e)
+traceback.print_stack(limit=5)
 
 Review comment:
   Same as the earlier comment about print_exc 
 

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] dnwe commented on a change in pull request #202: Produce action fixes

2017-08-03 Thread git
dnwe commented on a change in pull request #202: Produce action fixes
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/202#discussion_r131248441
 
 

 ##
 File path: action/kafkaProduce.py
 ##
 @@ -18,46 +18,96 @@
  */
 """
 
-import ssl
 import base64
+import logging
+import sys
+import traceback
+
 from kafka import KafkaProducer
-from kafka.errors import NoBrokersAvailable
+from kafka.errors import NoBrokersAvailable, KafkaTimeoutError, 
AuthenticationFailedError
+from kafka.version import __version__
+from random import shuffle
+
 
+logging.basicConfig(stream=sys.stdout, level=logging.INFO,
+format='%(levelname)-8s %(asctime)s %(message)s',
+datefmt='[%H:%M:%S]')
+
+max_cached_producers = 10
 
 def main(params):
+producer = None
+logging.info("Using kafka-python %s", str(__version__))
+
+print("Validating parameters")
 validationResult = validateParams(params)
 if validationResult[0] != True:
 return {'error': validationResult[1]}
 else:
 validatedParams = validationResult[1]
 
-brokers = params['brokers']
-
-try:
-producer = KafkaProducer(
-api_version_auto_timeout_ms=15000,
-bootstrap_servers=brokers)
-
-print("Created producer")
+attempt = 0
+max_attempts = 3
 
-# only use the key parameter if it is present
-if 'key' in validatedParams:
-messageKey = validatedParams['key']
-producer.send(validatedParams['topic'], 
bytes(validatedParams['value'], 'utf-8'), key=bytes(messageKey, 'utf-8'))
-else:
-producer.send(validatedParams['topic'], 
bytes(validatedParams['value'], 'utf-8'))
+result = {"success": True}
 
-producer.flush()
+while attempt < max_attempts:
+attempt += 1
+print("Starting attempt {}".format(attempt))
 
-print("Sent message")
-except NoBrokersAvailable:
-# this exception's message is a little too generic
+try:
+print("Getting producer")
+producer = getProducer(validatedParams)
+
+topic = validatedParams['topic']
+print("Finding topic {}".format(topic))
+partition_info = producer.partitions_for(topic)
+print("Found topic {} with partition(s) {}".format(topic, 
partition_info))
+
+break
+except Exception as e:
+if attempt == max_attempts:
+producer = None
+logging.warning(e)
+traceback.print_stack(limit=5)
 
 Review comment:
   You'll want `traceback.print_exc(limit=5)` here, to print the stack trace of 
the Exception that was raised. `print_stack` just dumps a stacktrace of where 
you currently are in your code, and won't show where the caught Exception came 
from
 

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] dnwe commented on a change in pull request #202: Produce action fixes

2017-08-03 Thread git
dnwe commented on a change in pull request #202: Produce action fixes
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/202#discussion_r131250004
 
 

 ##
 File path: action/messageHubProduce.py
 ##
 @@ -108,3 +147,64 @@ def validateParams(params):
 return (False, "key parameter is not Base64 encoded")
 
 return (True, validatedParams)
+
+def getProducer(validatedParams):
+connectionHash = getConnectionHash(validatedParams)
+
+if globals().get("cached_producers") is None:
+print("dictionary was none")
+globals()["cached_producers"] = dict()
+
+# remove arbitrary connection to make room for new one
+if len(globals()["cached_producers"]) == max_cached_producers:
+poppedProducer = globals()["cached_producers"].popitem()[1]
+poppedProducer.close(timeout=1)
+print("Removed cached producer")
+
+if connectionHash not in globals()["cached_producers"]:
+print("cache miss")
+# create a new connection
+sasl_mechanism = 'PLAIN'
+security_protocol = 'SASL_SSL'
+
+# Create a new context using system defaults, disable all but TLS1.2
+context = ssl.create_default_context()
+context.options &= ssl.OP_NO_TLSv1
+context.options &= ssl.OP_NO_TLSv1_1
+
+producer = KafkaProducer(
+api_version=(0, 10),
+batch_size=0,
+bootstrap_servers=validatedParams['kafka_brokers_sasl'],
+max_block_ms=15000,
+request_timeout_ms=15000,
+sasl_plain_username=validatedParams['user'],
+sasl_plain_password=validatedParams['password'],
+security_protocol=security_protocol,
+ssl_context=context,
+sasl_mechanism=sasl_mechanism
+)
+
+print("Created producer")
+
+# store the producer globally for subsequent invocations
+globals()["cached_producers"][connectionHash] = producer
+
+# return it
+return producer
+else:
+print("Reusing existing producer")
+return globals()["cached_producers"][connectionHash]
+
+
+def getConnectionHash(params):
+# always use the sorted brokers to combat the effects of shuffle()
+brokers = params['kafka_brokers_sasl']
+brokers.sort()
+brokersString = ",".join(brokers)
+
+apiKey = "{}:{}".format(params['user'], params['password'])
+
+connectionHash = brokersString + apiKey
 
 Review comment:
   Technically the broker URLs are only used for bootstrapping to fetch the 
cluster info. The client discoverers all the available brokers in the response 
to that bootstrap, so your connectionHash can just be based on the apiKey as 
that will only be valid for a given cluster
 

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 #61: code coverage

2017-08-03 Thread git
codecov-io commented on issue #61: code coverage
URL: 
https://github.com/apache/incubator-openwhisk-client-js/pull/61#issuecomment-320079968
 
 
   # 
[Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/61?src=pr=h1)
 Report
   > :exclamation: No coverage uploaded for pull request base 
(`master@46d5884`). [Click here to learn what that 
means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/61/graphs/tree.svg?width=650=150=pr=j2mPEx0Tkq)](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/61?src=pr=tree)
   
   ```diff
   @@Coverage Diff@@
   ## master  #61   +/-   ##
   =
 Coverage  ?   99.37%   
   =
 Files ?   14   
 Lines ?  318   
 Branches  ?0   
   =
 Hits  ?  316   
 Misses?2   
 Partials  ?0
   ```
   
   
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/61?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-client-js/pull/61?src=pr=footer).
 Last update 
[46d5884...4f531b4](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/61?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] bjustin-ibm commented on a change in pull request #199: Return Requested Accept Type on Trigger Delete

2017-08-03 Thread git
bjustin-ibm commented on a change in pull request #199: Return Requested Accept 
Type on Trigger Delete
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/199#discussion_r131247258
 
 

 ##
 File path: action/kafkaFeedWeb.js
 ##
 @@ -70,7 +70,14 @@ function main(params) {
 db = new Database(params.DB_URL, params.DB_NAME);
 return db.deleteTrigger(params.triggerName);
 })
-.then(resolve)
+.then(() => {
+console.log('successfully deleted the trigger');
+resolve({
+statusCode: 200,
+headers: {'Content-Type': 'text/plain'},
+body: "deleted trigger"
+});
+})
 .catch(reject);
 
 Review comment:
   hmmm... shouldn't `reject` do the same?
 

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] bpoole16 commented on issue #2491: Limit length of HTTP body displayed when debugging.

2017-08-03 Thread git
bpoole16 commented on issue #2491: Limit length of HTTP body displayed when 
debugging.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2491#issuecomment-320075351
 
 
   To me this issue has gotten too specific. It's now only limiting in verbose 
for a certain field in resp body for actions only - feels off to me. The only 
"global" limiting, in verbose, is for req body.
 

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] bjustin-ibm commented on issue #202: Produce action fixes

2017-08-03 Thread git
bjustin-ibm commented on issue #202: Produce action fixes
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/202#issuecomment-320075356
 
 
   @dnwe please review.
 

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] bpoole16 commented on issue #2491: Limit length of HTTP body displayed when debugging.

2017-08-03 Thread git
bpoole16 commented on issue #2491: Limit length of HTTP body displayed when 
debugging.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2491#issuecomment-320075351
 
 
   To me this issue has gotten too specific. It's now only limiting in verbose 
for a certain field in resp body for actions only - feels off to me. The only 
"global" limiting in verbose is for req body.
 

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 #209: exponential backoff on trigger fire retry

2017-08-03 Thread git
csantanapr closed pull request #209: exponential backoff on trigger fire retry
URL: https://github.com/apache/incubator-openwhisk-package-kafka/pull/209
 
 
   
 

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


With regards,
Apache Git Services


[GitHub] csantanapr closed issue #207: look into making backoff exponential vs. linear

2017-08-03 Thread git
csantanapr closed issue #207: look into making backoff exponential vs. linear
URL: https://github.com/apache/incubator-openwhisk-package-kafka/issues/207
 
 
   
 

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 #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
rabbah commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320073133
 
 
   lol - ok now i'm going to ask: what precipitated these changes - as in 
what's wrong with the current 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] rabbah commented on issue #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
rabbah commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320073133
 
 
   lol - ok now i'm going to ask: what precipitated these changes - as in 
what's wrong with the current 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] dubeejw commented on issue #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
dubeejw commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320073028
 
 
   I still do not like that as soon as I close my terminal, the auto-completion 
will be removed.
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
dubeejw commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320072334
 
 
   Not sure I like or see the point of `wsk sdk install bashauto` printing the 
auto complete script to the terminal.
 

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 #2564: Remove old scripts and unused config parameters

2017-08-03 Thread git
csantanapr closed pull request #2564: Remove old scripts and unused config 
parameters
URL: https://github.com/apache/incubator-openwhisk/pull/2564
 
 
   
 

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] bjustin-ibm commented on issue #209: exponential backoff on trigger fire retry

2017-08-03 Thread git
bjustin-ibm commented on issue #209: exponential backoff on trigger fire retry
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/209#issuecomment-320068583
 
 
   @csantanapr please review/merge.
 

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] bjustin-ibm commented on a change in pull request #209: exponential backoff on trigger fire retry

2017-08-03 Thread git
bjustin-ibm commented on a change in pull request #209: exponential backoff on 
trigger fire retry
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/209#discussion_r131239034
 
 

 ##
 File path: provider/consumer.py
 ##
 @@ -371,10 +369,11 @@ def __fireTrigger(self, messages):
 if retry:
 retry_count += 1
 
-if retry_count < self.max_retries:
+if retry_count <= self.max_retries:
+sleepyTime = pow(2,retry_count)
 logging.info("[{}] Retrying in {} second(s)".format(
-self.trigger, self.retry_timeout))
-time.sleep(self.retry_timeout)
+self.trigger, sleepyTime))
 
 Review comment:
   No idea...
 

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


With regards,
Apache Git Services


[GitHub] bjustin-ibm commented on a change in pull request #209: exponential backoff on trigger fire retry

2017-08-03 Thread git
bjustin-ibm commented on a change in pull request #209: exponential backoff on 
trigger fire retry
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/209#discussion_r131238589
 
 

 ##
 File path: provider/thedoctor.py
 ##
 @@ -27,7 +27,8 @@
 
 class TheDoctor (Thread):
 # maximum time to allow a consumer to not successfully poll() before 
restarting
-poll_timeout_seconds = 20
+# this value must be greater than the total amount of time a consumer 
might retry firing a trigger
+poll_timeout_seconds = 200
 
 Review comment:
   This is the maximum amount of time between successful polls before the 
doctor will forcibly restart the consumer. It is a drastic measure that should 
not happen unless absolutely necessary. Keep in mind that previously, the total 
retry time was only 10 seconds and the `poll_timeout_seconds` was double that.
 

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


With regards,
Apache Git Services


[GitHub] rabbah commented on issue #2556: Fix bug on set_fact relative ansible task

2017-08-03 Thread git
rabbah commented on issue #2556: Fix bug on set_fact relative ansible task
URL: 
https://github.com/apache/incubator-openwhisk/pull/2556#issuecomment-320036382
 
 
   pg2/1?90?3 ? 
 

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


With regards,
Apache Git Services


[GitHub] csantanapr opened a new issue #253: Api v2 management allows swagger config to have basepath and path both set to /

2017-08-03 Thread git
csantanapr opened a new issue #253: Api v2 management allows swagger config to 
have basepath and path both set to /
URL: https://github.com/apache/incubator-openwhisk-apigateway/issues/253
 
 
   When creating a new api, a swagger is sent to api management with both base 
path and operation path set to `/`  the API doesn't error out.
   
   To reproduce you should could use the WSK CLI
   ```
   wsk api create / / get myaction
   ```
   ```
   wsk api list -f
   Action: /guest/myaction
 API Name: /
 Base path: /
 Path: /
 Verb: get
 URL: https://service.eu.apiconnect.ibmcloud.com/gws/apigateway/api/123/
   ```
   api management doesn't return error to know that there is an invalid 
combination to have both base path and operation path set 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] markusthoemmes commented on a change in pull request #2414: SPI approach for pluggable implementations

2017-08-03 Thread git
markusthoemmes commented on a change in pull request #2414: SPI approach for 
pluggable implementations
URL: 
https://github.com/apache/incubator-openwhisk/pull/2414#discussion_r131227995
 
 

 ##
 File path: docs/spi.md
 ##
 @@ -0,0 +1,75 @@
+# SPI extensions in OpenWhisk
+
+Alternate implementations of various components follow an SPI (Service 
Provider Interface) pattern:
+* The pluggable component is defined as an Spi trait:
+```scala
+import whisk.spi.Spi
+trait ThisIsPluggable extends Spi { ... }
+```
+* Implementations implement the Spi trait
+```scala
+class TheImpl extends ThisIsPluggable { ... }
+class TheOtherImpl extends ThisIsPluggable { ... }
+```
+
+Runtime resolution of an Spi trait to a specific impl is provided by:
+* SpiLoader - a utility for loading the impl of a specific Spi, using a 
resolver to determine the impls factory classname, and reflection to load the 
factory object
+* SpiFactory - a way to define a factory for each impl, all of which are 
loaded via reflection
+* application.conf - each SpiFactory is resolved to a classname based on the 
config key provided to SpiLoader
+
+A single SpiFactory per unique Spi is usable at runtime, since the key will 
have a single string value. 
+
+# Example
+
+The process to create and use an SPI is as follows:
+
+## Define the Spi and impl(s)
+
+* create your Spi trait `YourSpi` as an extension of whisk.spi.Spi
+* create your impls as classes that extend `YourSpi`
+
+## Define the SpiFactory to load the impl
+
+```scala
+class YourImplFactory extends SpiFactory[YourSpi]{
+  def apply(dependencies: Dependencies): { ...construct the impl...}
+}
+```
+for singleton behavior you can use
+```scala
+class YourImplFactory extends SingletonSpiFactory[YourSpi]{
+  def buildInstance(dependencies: Dependencies): { ...construct the impl...}
+}
+```
+
+## Invoke SpiLoader.instanceOf to acquire an instance of the SPI
+
+SpiLoader accepts a key to use for resolving which impl should be loaded. The 
mapping of key to classname is implemented in an instance of 
`whisk.spi.SpiClassResolver`
+Example whisk.spi.SpiClassResolver impls are:
+* whisk.spi.ClassnameResolver - classname is not interpreted by used literally 
from the value of the key
+* whisk.spi.TypesafeConfigClassResolver - classname is looked up as a String 
from the provided instance of com.typesafe.config.Config (available via 
`ActorSystem.settings.config` within an Akka app)
+
+Invoke the loader using `SpiLoader.instanceOf[]()()`
 
 Review comment:
   Outdated.
 

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 #2414: SPI approach for pluggable implementations

2017-08-03 Thread git
markusthoemmes commented on a change in pull request #2414: SPI approach for 
pluggable implementations
URL: 
https://github.com/apache/incubator-openwhisk/pull/2414#discussion_r131227962
 
 

 ##
 File path: docs/spi.md
 ##
 @@ -0,0 +1,75 @@
+# SPI extensions in OpenWhisk
+
+Alternate implementations of various components follow an SPI (Service 
Provider Interface) pattern:
+* The pluggable component is defined as an Spi trait:
+```scala
+import whisk.spi.Spi
+trait ThisIsPluggable extends Spi { ... }
+```
+* Implementations implement the Spi trait
+```scala
+class TheImpl extends ThisIsPluggable { ... }
+class TheOtherImpl extends ThisIsPluggable { ... }
+```
+
+Runtime resolution of an Spi trait to a specific impl is provided by:
+* SpiLoader - a utility for loading the impl of a specific Spi, using a 
resolver to determine the impls factory classname, and reflection to load the 
factory object
+* SpiFactory - a way to define a factory for each impl, all of which are 
loaded via reflection
+* application.conf - each SpiFactory is resolved to a classname based on the 
config key provided to SpiLoader
+
+A single SpiFactory per unique Spi is usable at runtime, since the key will 
have a single string value. 
+
+# Example
+
+The process to create and use an SPI is as follows:
+
+## Define the Spi and impl(s)
+
+* create your Spi trait `YourSpi` as an extension of whisk.spi.Spi
+* create your impls as classes that extend `YourSpi`
+
+## Define the SpiFactory to load the impl
+
+```scala
+class YourImplFactory extends SpiFactory[YourSpi]{
+  def apply(dependencies: Dependencies): { ...construct the impl...}
+}
+```
+for singleton behavior you can use
+```scala
+class YourImplFactory extends SingletonSpiFactory[YourSpi]{
+  def buildInstance(dependencies: Dependencies): { ...construct the impl...}
+}
+```
+
+## Invoke SpiLoader.instanceOf to acquire an instance of the SPI
+
+SpiLoader accepts a key to use for resolving which impl should be loaded. The 
mapping of key to classname is implemented in an instance of 
`whisk.spi.SpiClassResolver`
+Example whisk.spi.SpiClassResolver impls are:
+* whisk.spi.ClassnameResolver - classname is not interpreted by used literally 
from the value of the key
+* whisk.spi.TypesafeConfigClassResolver - classname is looked up as a String 
from the provided instance of com.typesafe.config.Config (available via 
`ActorSystem.settings.config` within an Akka app)
+
+Invoke the loader using `SpiLoader.instanceOf[]()()`
+
+The configKey indicates which config (in application.conf) is used to 
determine which impl is used at runtime.
+```scala
+val messagingProvider = 
SpiLoader.instanceOf[MessagingProvider]("whisk.spi.messaging.impl")
 
 Review comment:
   Outdated.
 

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 #2414: SPI approach for pluggable implementations

2017-08-03 Thread git
markusthoemmes commented on a change in pull request #2414: SPI approach for 
pluggable implementations
URL: 
https://github.com/apache/incubator-openwhisk/pull/2414#discussion_r131227929
 
 

 ##
 File path: docs/spi.md
 ##
 @@ -0,0 +1,75 @@
+# SPI extensions in OpenWhisk
+
+Alternate implementations of various components follow an SPI (Service 
Provider Interface) pattern:
+* The pluggable component is defined as an Spi trait:
+```scala
+import whisk.spi.Spi
+trait ThisIsPluggable extends Spi { ... }
+```
+* Implementations implement the Spi trait
+```scala
+class TheImpl extends ThisIsPluggable { ... }
+class TheOtherImpl extends ThisIsPluggable { ... }
+```
+
+Runtime resolution of an Spi trait to a specific impl is provided by:
+* SpiLoader - a utility for loading the impl of a specific Spi, using a 
resolver to determine the impls factory classname, and reflection to load the 
factory object
+* SpiFactory - a way to define a factory for each impl, all of which are 
loaded via reflection
+* application.conf - each SpiFactory is resolved to a classname based on the 
config key provided to SpiLoader
+
+A single SpiFactory per unique Spi is usable at runtime, since the key will 
have a single string value. 
+
+# Example
+
+The process to create and use an SPI is as follows:
+
+## Define the Spi and impl(s)
+
+* create your Spi trait `YourSpi` as an extension of whisk.spi.Spi
+* create your impls as classes that extend `YourSpi`
+
+## Define the SpiFactory to load the impl
+
+```scala
+class YourImplFactory extends SpiFactory[YourSpi]{
+  def apply(dependencies: Dependencies): { ...construct the impl...}
+}
+```
+for singleton behavior you can use
+```scala
+class YourImplFactory extends SingletonSpiFactory[YourSpi]{
+  def buildInstance(dependencies: Dependencies): { ...construct the impl...}
+}
+```
+
+## Invoke SpiLoader.instanceOf to acquire an instance of the SPI
+
+SpiLoader accepts a key to use for resolving which impl should be loaded. The 
mapping of key to classname is implemented in an instance of 
`whisk.spi.SpiClassResolver`
+Example whisk.spi.SpiClassResolver impls are:
+* whisk.spi.ClassnameResolver - classname is not interpreted by used literally 
from the value of the key
+* whisk.spi.TypesafeConfigClassResolver - classname is looked up as a String 
from the provided instance of com.typesafe.config.Config (available via 
`ActorSystem.settings.config` within an Akka app)
 
 Review comment:
   Outdated. There's only TypesafeConfigClassResolver left, and it's not 
available via ActorSystem anymore.
 

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 #2414: SPI approach for pluggable implementations

2017-08-03 Thread git
markusthoemmes commented on a change in pull request #2414: SPI approach for 
pluggable implementations
URL: 
https://github.com/apache/incubator-openwhisk/pull/2414#discussion_r131227724
 
 

 ##
 File path: docs/spi.md
 ##
 @@ -0,0 +1,75 @@
+# SPI extensions in OpenWhisk
+
+Alternate implementations of various components follow an SPI (Service 
Provider Interface) pattern:
+* The pluggable component is defined as an Spi trait:
+```scala
+import whisk.spi.Spi
+trait ThisIsPluggable extends Spi { ... }
+```
+* Implementations implement the Spi trait
+```scala
+class TheImpl extends ThisIsPluggable { ... }
+class TheOtherImpl extends ThisIsPluggable { ... }
+```
+
+Runtime resolution of an Spi trait to a specific impl is provided by:
+* SpiLoader - a utility for loading the impl of a specific Spi, using a 
resolver to determine the impls factory classname, and reflection to load the 
factory object
+* SpiFactory - a way to define a factory for each impl, all of which are 
loaded via reflection
+* application.conf - each SpiFactory is resolved to a classname based on the 
config key provided to SpiLoader
+
+A single SpiFactory per unique Spi is usable at runtime, since the key will 
have a single string value. 
+
+# Example
+
+The process to create and use an SPI is as follows:
+
+## Define the Spi and impl(s)
+
+* create your Spi trait `YourSpi` as an extension of whisk.spi.Spi
+* create your impls as classes that extend `YourSpi`
+
+## Define the SpiFactory to load the impl
+
+```scala
+class YourImplFactory extends SpiFactory[YourSpi]{
+  def apply(dependencies: Dependencies): { ...construct the impl...}
+}
+```
+for singleton behavior you can use
+```scala
+class YourImplFactory extends SingletonSpiFactory[YourSpi]{
+  def buildInstance(dependencies: Dependencies): { ...construct the impl...}
+}
+```
+
+## Invoke SpiLoader.instanceOf to acquire an instance of the SPI
 
 Review comment:
   outdated. is `SpiLoader.get` now
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on a change in pull request #209: exponential backoff on trigger fire retry

2017-08-03 Thread git
dubeejw commented on a change in pull request #209: exponential backoff on 
trigger fire retry
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/209#discussion_r131226642
 
 

 ##
 File path: provider/thedoctor.py
 ##
 @@ -27,7 +27,8 @@
 
 class TheDoctor (Thread):
 # maximum time to allow a consumer to not successfully poll() before 
restarting
-poll_timeout_seconds = 20
+# this value must be greater than the total amount of time a consumer 
might retry firing a trigger
+poll_timeout_seconds = 200
 
 Review comment:
   Why 200 here? `2^1 + 2^2 + 2^3 + 2^4 + 2^5 + 2^6 = 126`
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on a change in pull request #209: exponential backoff on trigger fire retry

2017-08-03 Thread git
dubeejw commented on a change in pull request #209: exponential backoff on 
trigger fire retry
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/209#discussion_r131224520
 
 

 ##
 File path: provider/consumer.py
 ##
 @@ -371,10 +369,11 @@ def __fireTrigger(self, messages):
 if retry:
 retry_count += 1
 
-if retry_count < self.max_retries:
+if retry_count <= self.max_retries:
+sleepyTime = pow(2,retry_count)
 logging.info("[{}] Retrying in {} second(s)".format(
-self.trigger, self.retry_timeout))
-time.sleep(self.retry_timeout)
+self.trigger, sleepyTime))
 
 Review comment:
   Why a new line for this?
 

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


With regards,
Apache Git Services


[GitHub] mdeuser commented on a change in pull request #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
mdeuser commented on a change in pull request #2520: Prints bashauto-completion 
install script to STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#discussion_r131194973
 
 

 ##
 File path: docs/cli.md
 ##
 @@ -38,6 +38,31 @@ you can run the following command from your `openwhisk` 
directory:
 
 To verify your CLI setup, try [creating and running an 
action](#openwhisk-hello-world-example).
 
+### Configure bash command completion for Openwhisk CLI
+
+For bash command completio to work, bash 4.1 or newer is required. The most 
recent Linux distributions should have the correct version of bash but Mac 
users will most likely have an older version.
+Mac users can check their bash version and update it by running the following 
commands:
+
+```
+bash --version
+brew install bash-completion
+```
+
+To install bash command completion run the following command:
+
+```
+eval "`wsk sdk install bashauto`"
+```
+
+**Note:** Every time a new terminal is opened this command must be ran again 
to enable bash command completion in the new terminal. Alternatively, adding 
the previous command to the `.bashrc` or `.profile` will prevent this.
+
+For those who wish to do a custom installation, the following commands show 
how to output the wsk command completion script to the terminal and how to save 
the command completion script in a separate shell script file to be run later. 
In both cases, you will need to explicitly run the script to install wsk 
command completion support.
 
 Review comment:
   This text does not match the example commands below.  Maybe it should be
   
   ```
   For those who wish to do a custom installation, the following commands show 
how to output the wsk command completion script into a separate shell script 
file to be run later. You will need to explicitly run the script to install wsk 
command completion support.
   ```
 

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] drcariel commented on a change in pull request #2547: CLI Experimental api removal

2017-08-03 Thread git
drcariel commented on a change in pull request #2547: CLI Experimental api 
removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131223753
 
 

 ##
 File path: tests/src/test/scala/common/Wsk.scala
 ##
 @@ -71,16 +71,6 @@ import whisk.utils.retry
 
 case class WskProps(
 authKey: String = 
WhiskProperties.readAuthKey(WhiskProperties.getAuthFileForTesting),
-cert: String = 
WhiskProperties.getFileRelativeToWhiskHome("ansible/roles/nginx/files/openwhisk-client-cert.pem").getAbsolutePath,
 
 Review comment:
   ah yes, I was confusing myself with some of the syntax. Apologies
   
 

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] bpoole16 commented on issue #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
bpoole16 commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320050852
 
 
   PG 4 628 Passed
 

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] zachschultz opened a new issue #2572: Deploying OpenWhisk with Docker for Mac fails at apigateway.yml ansible step

2017-08-03 Thread git
zachschultz opened a new issue #2572: Deploying OpenWhisk with Docker for Mac 
fails at apigateway.yml ansible step
URL: https://github.com/apache/incubator-openwhisk/issues/2572
 
 
   ## Environment details:
   
   * Mac OS, Docker for Mac
   * docker --version: Docker version 17.06.0-ce, build 02c1d87
   
   ## Steps to reproduce the issue:
   
   1.   Follow [Setting up OpenWhisk with Docker for 
Mac](https://github.com/apache/incubator-openwhisk/blob/master/tools/macos/README.md)
   2.   Follow [Deploying OpenWhisk using 
Ansible](https://github.com/apache/incubator-openwhisk/blob/master/ansible/README.md)
   3.   Follow the guide for Cloudant and get to step `Deploying Using Cloudant`
   4.  Run the command `ansible-playbook -i environments/ 
apigateway.yml`
   
   
   ## Provide the expected results and outputs:
   
   ```
   Success?
   ```
   
   
   ## Provide the actual results and outputs:
   
   ```
   PLAY [redis] 
***
   
   TASK [Gathering Facts] 
*
   Thursday 03 August 2017  13:14:45 -0500 (0:00:00.020)   0:00:00.020 
***
   ok: [172.17.0.1]
   
   TASK [redis : pull the redis:3.2 image] 

   Thursday 03 August 2017  13:14:46 -0500 (0:00:00.538)   0:00:00.558 
***
   changed: [172.17.0.1]
   
   TASK [redis : (re)start redis] 
*
   Thursday 03 August 2017  13:14:48 -0500 (0:00:02.396)   0:00:02.954 
***
   fatal: [172.17.0.1]: FAILED! => {"changed": false, "failed": true, "msg": 
"Failed to import docker-py - No module named requests.exceptions. Try `pip 
install docker-py`"}
   
   PLAY RECAP 
*
   172.17.0.1 : ok=2changed=1unreachable=0failed=1
   
   Thursday 03 August 2017  13:14:48 -0500 (0:00:00.381)   0:00:03.336 
***
   
===
   redis : pull the redis:3.2 image  
2.40s
   Gathering Facts - 
0.54s
   redis : (re)start redis - 
0.38s
   ```
   
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2435: Ensure Action Update Creates a Web Action (Review)

2017-08-03 Thread git
dubeejw commented on issue #2435: Ensure Action Update Creates a Web Action 
(Review)
URL: 
https://github.com/apache/incubator-openwhisk/pull/2435#issuecomment-320043982
 
 
   With the implementation from this PR action1 will have annotations for key1, 
key2 and the web annotations when the following commands are executed.
   `wsk action create action1 --annotation key1 value1`
   `wsk action update action1 --web true --annotation key2 value2`
   
   Without the web flag, the following action would only have they key2 
annotation
   `wsk action create action1 --annotation key1 value1`
   `wsk action update action1 --annotation key2 value2`
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2435: Ensure Action Update Creates a Web Action (Review)

2017-08-03 Thread git
dubeejw commented on issue #2435: Ensure Action Update Creates a Web Action 
(Review)
URL: 
https://github.com/apache/incubator-openwhisk/pull/2435#issuecomment-320043982
 
 
   With the implementation from this PR action1 will have annotations for key1, 
key2 and the web annotations when the following commands are executed.
   `wsk action create action1 --annotation key1 value1`
   `wsk action update action1 --web true --annotation key2 value2`
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on issue #2435: Ensure Action Update Creates a Web Action (Review)

2017-08-03 Thread git
dubeejw commented on issue #2435: Ensure Action Update Creates a Web Action 
(Review)
URL: 
https://github.com/apache/incubator-openwhisk/pull/2435#issuecomment-320042920
 
 
   What is here works and will fix the issue. Problem is that the action update 
command with the web flag specified will behave differently than a normal 
action update as it keeps all existing annotations that action has.
 

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 #2547: CLI Experimental api removal

2017-08-03 Thread git
rabbah commented on a change in pull request #2547: CLI Experimental api removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131208587
 
 

 ##
 File path: tests/src/test/scala/common/Wsk.scala
 ##
 @@ -71,16 +71,6 @@ import whisk.utils.retry
 
 case class WskProps(
 authKey: String = 
WhiskProperties.readAuthKey(WhiskProperties.getAuthFileForTesting),
-cert: String = 
WhiskProperties.getFileRelativeToWhiskHome("ansible/roles/nginx/files/openwhisk-client-cert.pem").getAbsolutePath,
 
 Review comment:
   they're the same value - i dont understand the question can you clarify?
 

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 #2556: Fix bug on set_fact relative ansible task

2017-08-03 Thread git
rabbah commented on issue #2556: Fix bug on set_fact relative ansible task
URL: 
https://github.com/apache/incubator-openwhisk/pull/2556#issuecomment-320036382
 
 
   pg2/1?90?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] rabbah commented on a change in pull request #2557: Fix ansible script for distributed environment

2017-08-03 Thread git
rabbah commented on a change in pull request #2557: Fix ansible script for 
distributed environment
URL: 
https://github.com/apache/incubator-openwhisk/pull/2557#discussion_r131205639
 
 

 ##
 File path: ansible/roles/cli/tasks/deploy.yml
 ##
 @@ -24,8 +24,4 @@
   copy: src={{ openwhisk_cli.local.location }}/content.json dest={{ 
cli.nginxdir }}/
   when: cli_installation_mode == "local"
 
-- name: "copy the binaries from a local directory to Nginx directory"
 
 Review comment:
   why remove this?
   @houshengbo @csantanapr can you comment on this?
 

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 issue #1541: Implement new authentication schema throughout the codebase

2017-08-03 Thread git
markusthoemmes closed issue #1541: Implement new authentication schema 
throughout the codebase
URL: https://github.com/apache/incubator-openwhisk/issues/1541
 
 
   
 

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 #2571: Add user agent header for CLI http client

2017-08-03 Thread git
markusthoemmes commented on issue #2571: Add user agent header for CLI http 
client
URL: 
https://github.com/apache/incubator-openwhisk/issues/2571#issuecomment-320030576
 
 
   duplicate of #2568?
 

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 a change in pull request #2517: Support client certificate verify on server side

2017-08-03 Thread git
tysonnorris commented on a change in pull request #2517: Support client 
certificate verify on server side
URL: 
https://github.com/apache/incubator-openwhisk/pull/2517#discussion_r131200474
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/RestAPIs.scala
 ##
 @@ -160,7 +160,7 @@ protected[controller] class RestAPIVersion(apipath: 
String, apiversion: String)(
 sendCorsHeaders {
 (pathEndOrSingleSlash & get) {
 complete(OK, info)
-} ~ authenticate(basicauth) {
+} ~ (authenticate(basicauth) | authenticate(certificateAuth)) {
 
 Review comment:
   This SPI approach would help expose a specific combination of auth 
mechanisms, but currently the SPI notion only supports "one impl per 
interface"; It could change to support "multiple impls per interface", but in 
the meantime, it is probably good enough for this case (unless people want to 
enable BOTH basic and cert auth). 
   
   I would assume that support "multiple auth impls" would be a low priority 
for now, but it could be a problem if a deployment wanted to support many 
different oauth logins. (even then, that could be implemented as a 
multi-oauth-provider impl of the auth SPI, so may not be a real problem)
   
 

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


With regards,
Apache Git Services


[GitHub] dubeejw commented on a change in pull request #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
dubeejw commented on a change in pull request #2520: Prints bashauto-completion 
install script to STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#discussion_r131193807
 
 

 ##
 File path: docs/cli.md
 ##
 @@ -38,6 +38,31 @@ you can run the following command from your `openwhisk` 
directory:
 
 To verify your CLI setup, try [creating and running an 
action](#openwhisk-hello-world-example).
 
+### Configure bash command completion for Openwhisk CLI
+
+For bash command completio to work, bash 4.1 or newer is required. The most 
recent Linux distributions should have the correct version of bash but Mac 
users will most likely have an older version.
 
 Review comment:
   `command completion`
 

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


With regards,
Apache Git Services


[GitHub] csantanapr opened a new issue #2571: Add user agent header for CLI http client

2017-08-03 Thread git
csantanapr opened a new issue #2571: Add user agent header for CLI http client
URL: https://github.com/apache/incubator-openwhisk/issues/2571
 
 
   It will be useful for operators to distinguish http client, this way we can 
see how many % of users/usage is using the CLI vs other type of http clients.
   
   This is more useful for deployment and crud operations, too see the usage of 
the tools.
   
   Set a default value something like "OpenWhisk-cli...", and allow to override 
this thru env variables in ansible for example, for operators compiling the 
code with modifications and be able to override it.
   
   cc @mdeuser 
   
 

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] drcariel commented on a change in pull request #2547: CLI Experimental api removal

2017-08-03 Thread git
drcariel commented on a change in pull request #2547: CLI Experimental api 
removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131190116
 
 

 ##
 File path: tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
 ##
 @@ -149,9 +149,7 @@ class WskConfigTests
 // Send request to https:///api/v1/namespaces, wsk 
client passes client certificate to nginx, nginx will
 // verify it by client ca's openwhisk-client-ca-cert.pem
 val stdout = wsk.cli(Seq("property", "set", "-i", "--apihost", 
wskprops.apihost, "--auth", wskprops.authKey,
-"--cert", wskprops.cert, "--key", wskprops.key, 
"--namespace", namespace), env = env).stdout
 
 Review comment:
   should be fixed now
 

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] drcariel commented on a change in pull request #2547: CLI Experimental api removal

2017-08-03 Thread git
drcariel commented on a change in pull request #2547: CLI Experimental api 
removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131189859
 
 

 ##
 File path: tests/src/test/scala/common/Wsk.scala
 ##
 @@ -71,16 +71,6 @@ import whisk.utils.retry
 
 case class WskProps(
 authKey: String = 
WhiskProperties.readAuthKey(WhiskProperties.getAuthFileForTesting),
-cert: String = 
WhiskProperties.getFileRelativeToWhiskHome("ansible/roles/nginx/files/openwhisk-client-cert.pem").getAbsolutePath,
 
 Review comment:
   done, only question I have is about the apihost, they don't seem too 
different, but which one should I keep?
 

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


With regards,
Apache Git Services


[GitHub] mdeuser commented on a change in pull request #2547: CLI Experimental api removal

2017-08-03 Thread git
mdeuser commented on a change in pull request #2547: CLI Experimental api 
removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131187335
 
 

 ##
 File path: tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
 ##
 @@ -149,9 +149,7 @@ class WskConfigTests
 // Send request to https:///api/v1/namespaces, wsk 
client passes client certificate to nginx, nginx will
 // verify it by client ca's openwhisk-client-ca-cert.pem
 val stdout = wsk.cli(Seq("property", "set", "-i", "--apihost", 
wskprops.apihost, "--auth", wskprops.authKey,
-"--cert", wskprops.cert, "--key", wskprops.key, 
"--namespace", namespace), env = env).stdout
 
 Review comment:
   jsut to clarify.  WskPropsV2 was used exclusively by API GW tests (needed 
the additional api gw token property plus a method i think).  it's really not 
api-experimental specific.  i thought this was a good time to consolidate back 
into a single WskProps.. 
 

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


With regards,
Apache Git Services


[GitHub] csantanapr commented on issue #2435: Ensure Action Update Creates a Web Action (Review)

2017-08-03 Thread git
csantanapr commented on issue #2435: Ensure Action Update Creates a Web Action 
(Review)
URL: 
https://github.com/apache/incubator-openwhisk/pull/2435#issuecomment-320016380
 
 
   bump
   @akrabat hit this again in the field.
   how can we move this one forward
 

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] hsane2001 opened a new issue #2570: Cannot install APIgateway if http_proxy variable set in native environment

2017-08-03 Thread git
hsane2001 opened a new issue #2570: Cannot install APIgateway if http_proxy 
variable set in native environment 
URL: https://github.com/apache/incubator-openwhisk/issues/2570
 
 
   
   
   ## Environment details:
   
   * native Ubuntu
   * Docker version 1.12.0, build 8eab29e, Ubuntu 16.04
   
   ## Steps to reproduce the issue:
   
   1.   Set company http_proxy variable
   2.   ansible-playbook apigateway.yml
   3.   Hangs at  "wait until the API Gateway in this host is up and running"
   
   
   ## Provide the expected results and outputs:
   
   ```
   Apigatweway is up and running if http_proxy is removed
   ```
   
   
   ## Provide the actual results and outputs:
   
   ```
   TASK [apigateway : wait until the API Gateway in this host is up and 
running] *
   Thursday 03 August 2017  08:48:49 + (0:00:00.888)   0:00:07.611 
***
   FAILED - RETRYING: wait until the API Gateway in this host is up and running 
(2 retries left).
   FAILED - RETRYING: wait until the API Gateway in this host is up and running 
(1 retries left).
   fatal: [172.17.0.1]: FAILED! => {"attempts": 2, "cache_control": "no-cache", 
"changed": false, "connection": "close", "content": 
"\r\nNetwork Error\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nNetwork Error 
(tcp_error)\r\n\r\n\r\n\r\n\r\n\r\n\r\nA communication error occurred: 
\"\"\r\n\r\n\r\n\r\n\r\nThe 
Web Server may be down, too busy, or experiencing other problems preventing it 
from responding to requests. You may wish to try again at a later 
time.\r\n\r\n\r\n\r\n\r\n\r\nFor assistance, contact your network support 
team.\r\n\r\n\r\n\r\n\r\n\r\n\r\n",
 "content
 _length": "768", "content_type": "text/html; charset=utf-8", "failed": true, 
"msg": "Status code was not [200]: HTTP Error 503: Service Unavailable", 
"pragma": "no-cache", "proxy_connection": "close", "redirected": false, 
"status": 503, "url": "http://172.17.0.1:9000/v1/apis"}
   ```
   
   ## Additional information you deem important:
   * issue happens only when http_proxy variable is set in environment
   
   
 

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] drcariel commented on a change in pull request #2547: CLI Experimental api removal

2017-08-03 Thread git
drcariel commented on a change in pull request #2547: CLI Experimental api 
removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131184910
 
 

 ##
 File path: tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
 ##
 @@ -149,9 +149,7 @@ class WskConfigTests
 // Send request to https:///api/v1/namespaces, wsk 
client passes client certificate to nginx, nginx will
 // verify it by client ca's openwhisk-client-ca-cert.pem
 val stdout = wsk.cli(Seq("property", "set", "-i", "--apihost", 
wskprops.apihost, "--auth", wskprops.authKey,
-"--cert", wskprops.cert, "--key", wskprops.key, 
"--namespace", namespace), env = env).stdout
 
 Review comment:
   I changed to test to compile, but Ok, I will make the 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] drcariel commented on a change in pull request #2547: CLI Experimental api removal

2017-08-03 Thread git
drcariel commented on a change in pull request #2547: CLI Experimental api 
removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131184910
 
 

 ##
 File path: tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
 ##
 @@ -149,9 +149,7 @@ class WskConfigTests
 // Send request to https:///api/v1/namespaces, wsk 
client passes client certificate to nginx, nginx will
 // verify it by client ca's openwhisk-client-ca-cert.pem
 val stdout = wsk.cli(Seq("property", "set", "-i", "--apihost", 
wskprops.apihost, "--auth", wskprops.authKey,
-"--cert", wskprops.cert, "--key", wskprops.key, 
"--namespace", namespace), env = env).stdout
 
 Review comment:
   I changed to test to compile, but yes, I will make the 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] mdeuser commented on issue #2439: Set user agent header in API GW requests

2017-08-03 Thread git
mdeuser commented on issue #2439: Set user agent header in API GW requests
URL: 
https://github.com/apache/incubator-openwhisk/pull/2439#issuecomment-320012704
 
 
   pg2/1901
 

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 #2547: CLI Experimental api removal

2017-08-03 Thread git
rabbah commented on a change in pull request #2547: CLI Experimental api removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131179737
 
 

 ##
 File path: tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
 ##
 @@ -149,9 +149,7 @@ class WskConfigTests
 // Send request to https:///api/v1/namespaces, wsk 
client passes client certificate to nginx, nginx will
 // verify it by client ca's openwhisk-client-ca-cert.pem
 val stdout = wsk.cli(Seq("property", "set", "-i", "--apihost", 
wskprops.apihost, "--auth", wskprops.authKey,
-"--cert", wskprops.cert, "--key", wskprops.key, 
"--namespace", namespace), env = env).stdout
 
 Review comment:
   @drcariel not that you in fact changed the test to get it to pass. This is 
regressing functionality.
 

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 #2547: CLI Experimental api removal

2017-08-03 Thread git
rabbah commented on a change in pull request #2547: CLI Experimental api removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131179737
 
 

 ##
 File path: tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
 ##
 @@ -149,9 +149,7 @@ class WskConfigTests
 // Send request to https:///api/v1/namespaces, wsk 
client passes client certificate to nginx, nginx will
 // verify it by client ca's openwhisk-client-ca-cert.pem
 val stdout = wsk.cli(Seq("property", "set", "-i", "--apihost", 
wskprops.apihost, "--auth", wskprops.authKey,
-"--cert", wskprops.cert, "--key", wskprops.key, 
"--namespace", namespace), env = env).stdout
 
 Review comment:
   @drcariel not that you in fact changed the test to get it to pass. This is 
regressing functionality.
 

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] bpoole16 commented on issue #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
bpoole16 commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-319961791
 
 
   Sounds good to me. Any ideas on what the flag should be called?
 

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 #2547: CLI Experimental api removal

2017-08-03 Thread git
rabbah commented on a change in pull request #2547: CLI Experimental api removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131179357
 
 

 ##
 File path: tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
 ##
 @@ -149,9 +149,7 @@ class WskConfigTests
 // Send request to https:///api/v1/namespaces, wsk 
client passes client certificate to nginx, nginx will
 // verify it by client ca's openwhisk-client-ca-cert.pem
 val stdout = wsk.cli(Seq("property", "set", "-i", "--apihost", 
wskprops.apihost, "--auth", wskprops.authKey,
-"--cert", wskprops.cert, "--key", wskprops.key, 
"--namespace", namespace), env = env).stdout
 
 Review comment:
   @ningyougang FYI above change - when these were added to WskProps, I 
suspected this would happen since they appear unused with respect to the tests. 
There is another way to preserve your test without modifying WskProps - perhaps 
we should do that.
 

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


With regards,
Apache Git Services


[GitHub] rabbah commented on a change in pull request #2547: CLI Experimental api removal

2017-08-03 Thread git
rabbah commented on a change in pull request #2547: CLI Experimental api removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131179005
 
 

 ##
 File path: tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
 ##
 @@ -149,9 +149,7 @@ class WskConfigTests
 // Send request to https:///api/v1/namespaces, wsk 
client passes client certificate to nginx, nginx will
 // verify it by client ca's openwhisk-client-ca-cert.pem
 val stdout = wsk.cli(Seq("property", "set", "-i", "--apihost", 
wskprops.apihost, "--auth", wskprops.authKey,
-"--cert", wskprops.cert, "--key", wskprops.key, 
"--namespace", namespace), env = env).stdout
 
 Review comment:
   WskProps is the class to retain - you should merge v2 into it. Not the other 
way around.
   Please restore cert and key.
 

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] bpoole16 commented on issue #2520: Prints bashauto-completion install script to STDOUT

2017-08-03 Thread git
bpoole16 commented on issue #2520: Prints bashauto-completion install script to 
STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#issuecomment-320007201
 
 
   @mdeuser @csantanapr Updated to have no flag.
 

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 a change in pull request #2414: SPI approach for pluggable implementations

2017-08-03 Thread git
tysonnorris commented on a change in pull request #2414: SPI approach for 
pluggable implementations
URL: 
https://github.com/apache/incubator-openwhisk/pull/2414#discussion_r131178209
 
 

 ##
 File path: common/scala/src/main/scala/whisk/spi/SpiLoader.scala
 ##
 @@ -0,0 +1,94 @@
+package whisk.spi
+
+import com.typesafe.config.Config
+import java.util.concurrent.atomic.AtomicReference
+import scala.reflect.ClassTag
+
+/*
+ * 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.
+ */
+
+trait Spi {
+}
+
+trait SpiFactory[T <: Spi] {
+def apply(dependencies: Dependencies): T
+}
+
+trait SingletonSpiFactory[T <: Spi] extends SpiFactory[T]{
+private val ref = new AtomicReference[T]()
+def buildInstance(dependencies: Dependencies): T
+override def apply(dependencies: Dependencies): T = {
+val oldValue = ref.get()
+if (oldValue != null.asInstanceOf[T]) {
+oldValue
+} else {
+val newValue = buildInstance(dependencies)
+if (ref.compareAndSet(null.asInstanceOf[T], newValue)){
+newValue
+} else {
+ref.get()
+}
+}
+}
+}
+
+trait SpiClassResolver {
+def getClassnameForKey(key: String): String
+}
+
+object SpiLoader {
+def instanceOf[A <: Spi](key: String, deps: Dependencies = new 
Dependencies())(implicit resolver: SpiClassResolver = ClassnameResolver, tag: 
ClassTag[A]): A = {
+val clazz = Class.forName(resolver.getClassnameForKey(key) + "$")
+
clazz.getField("MODULE$").get(clazz).asInstanceOf[SpiFactory[A]].apply(deps)
+}
+}
+
+/**
+ * Classname is specified directly at the time of lookup
+ */
+object ClassnameResolver extends SpiClassResolver {
+override def getClassnameForKey(key: String): String = key
+}
+
+/**
+ * Lookup the classname for the SPI impl based on a key in the provided Config
+ * @param config
+ */
+class TypesafeConfigClassResolver(config: Config) extends SpiClassResolver {
+override def getClassnameForKey(key: String): String = 
config.getString(key)
+}
 
 Review comment:
   Ah sure, I was propagating the Akka config previously. I'm not sure there is 
any difference in (re)constructing the config directly via TypesafeConfig, but 
this will certainly remove the leaky class resolver. I will set it as the 
default
 

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] drcariel commented on a change in pull request #2547: CLI Experimental api removal

2017-08-03 Thread git
drcariel commented on a change in pull request #2547: CLI Experimental api 
removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131177911
 
 

 ##
 File path: tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
 ##
 @@ -149,9 +149,7 @@ class WskConfigTests
 // Send request to https:///api/v1/namespaces, wsk 
client passes client certificate to nginx, nginx will
 // verify it by client ca's openwhisk-client-ca-cert.pem
 val stdout = wsk.cli(Seq("property", "set", "-i", "--apihost", 
wskprops.apihost, "--auth", wskprops.authKey,
-"--cert", wskprops.cert, "--key", wskprops.key, 
"--namespace", namespace), env = env).stdout
 
 Review comment:
   Not so much what cert and key have to do with experimental, but what 
wskProps and WskPropsV2 have to do with the removal. The original wskprops was 
used by experimental (exclusively?), WskPropsV2 was used by non-experimental. 
@mdeuser asked me to clean up the 2 so now V2 is the only WskProps. Mark will 
have a better idea of exactly what this touches
 

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 #2564: Remove old scripts and unused config parameters

2017-08-03 Thread git
rabbah commented on a change in pull request #2564: Remove old scripts and 
unused config parameters
URL: 
https://github.com/apache/incubator-openwhisk/pull/2564#discussion_r131175355
 
 

 ##
 File path: ansible/templates/whisk.properties.j2
 ##
 @@ -74,8 +74,6 @@ invoker.useRunc={{ invoker_use_runc | 
default(invoker.useRunc) }}
 invoker.useReactivePool={{ invoker.useReactivePool }}
 invoker.instances={{ invoker.instances }}
 
-edge.docker.endpoint={{ groups["edge"]|first }}:{{ docker.port }}
-kafka.docker.endpoint={{ groups["kafka"]|first }}:{{ docker.port }}
 main.docker.endpoint={{ groups["controllers"]|first }}:{{ docker.port }}
 
 Review comment:
   @markusthoemmes this can be removed when your remove the container pool.
 

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 #2564: Remove old scripts and unused config parameters

2017-08-03 Thread git
rabbah commented on issue #2564: Remove old scripts and unused config parameters
URL: 
https://github.com/apache/incubator-openwhisk/pull/2564#issuecomment-320003523
 
 
   PG3/952 ? 
 

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 #2547: CLI Experimental api removal

2017-08-03 Thread git
rabbah commented on a change in pull request #2547: CLI Experimental api removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131174659
 
 

 ##
 File path: tests/src/test/scala/common/Wsk.scala
 ##
 @@ -71,16 +71,6 @@ import whisk.utils.retry
 
 case class WskProps(
 authKey: String = 
WhiskProperties.readAuthKey(WhiskProperties.getAuthFileForTesting),
-cert: String = 
WhiskProperties.getFileRelativeToWhiskHome("ansible/roles/nginx/files/openwhisk-client-cert.pem").getAbsolutePath,
 
 Review comment:
   WskPropsV2 was added for api gw - remove it.
   WskProps is the correct class to retain.
 

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] drcariel commented on a change in pull request #2547: CLI Experimental api removal

2017-08-03 Thread git
drcariel commented on a change in pull request #2547: CLI Experimental api 
removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131174270
 
 

 ##
 File path: tests/src/test/scala/common/Wsk.scala
 ##
 @@ -71,16 +71,6 @@ import whisk.utils.retry
 
 case class WskProps(
 authKey: String = 
WhiskProperties.readAuthKey(WhiskProperties.getAuthFileForTesting),
-cert: String = 
WhiskProperties.getFileRelativeToWhiskHome("ansible/roles/nginx/files/openwhisk-client-cert.pem").getAbsolutePath,
 
 Review comment:
   cert was only available in WskProps, not WskPropsV2. Why would I add it back 
in?
 

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 #2547: CLI Experimental api removal

2017-08-03 Thread git
rabbah commented on a change in pull request #2547: CLI Experimental api removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131174431
 
 

 ##
 File path: tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
 ##
 @@ -149,9 +149,7 @@ class WskConfigTests
 // Send request to https:///api/v1/namespaces, wsk 
client passes client certificate to nginx, nginx will
 // verify it by client ca's openwhisk-client-ca-cert.pem
 val stdout = wsk.cli(Seq("property", "set", "-i", "--apihost", 
wskprops.apihost, "--auth", wskprops.authKey,
-"--cert", wskprops.cert, "--key", wskprops.key, 
"--namespace", namespace), env = env).stdout
 
 Review comment:
   i dont understand what cert and key have to do with removing api 
experimental.
   they are not part of the api gw work.
   
 

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] drcariel commented on a change in pull request #2547: CLI Experimental api removal

2017-08-03 Thread git
drcariel commented on a change in pull request #2547: CLI Experimental api 
removal
URL: 
https://github.com/apache/incubator-openwhisk/pull/2547#discussion_r131174270
 
 

 ##
 File path: tests/src/test/scala/common/Wsk.scala
 ##
 @@ -71,16 +71,6 @@ import whisk.utils.retry
 
 case class WskProps(
 authKey: String = 
WhiskProperties.readAuthKey(WhiskProperties.getAuthFileForTesting),
-cert: String = 
WhiskProperties.getFileRelativeToWhiskHome("ansible/roles/nginx/files/openwhisk-client-cert.pem").getAbsolutePath,
 
 Review comment:
   cert was only available in WskProps, not WskPropsV2. Why would I add it back 
in?
 

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


  1   2   >