[GitHub] mrutkows commented on issue #306: Implicit Runtime for Java is set to nodejs:default

2017-08-14 Thread git
mrutkows commented on issue #306: Implicit Runtime for Java is set to 
nodejs:default
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/306#issuecomment-322324551
 
 
   @zachschultz Hi Zach, yes we should have tests in place to assure we can at 
least load the correct "kind" and include the latest runtime PHP.  I am of the 
belief that we should open more issues that are granular and worry about 
finding duplicates later and not hope another issue is "like mine" and assume 
it will be fixed.  Please open a specific issue for the PHP case and include 
your manifest/testcase and see if we can leverage it for an official 
integration test.
 

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


With regards,
Apache Git Services


[GitHub] mrutkows commented on issue #306: Implicit Runtime for Java is set to nodejs:default

2017-08-14 Thread git
mrutkows commented on issue #306: Implicit Runtime for Java is set to 
nodejs:default
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/306#issuecomment-322324551
 
 
   @zachschultz Hi Zach, yes we should have tests in place to assure we can at 
least load the correct "kind" and include the latest runtime PHP.  I am of the 
belief that we should open more issues that are granular and worry about 
finding duplicates later and not hope another issue is "like mine" and assume 
it will be fixed.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #199: Return Requested Accept Type

2017-08-14 Thread git
dubeejw commented on issue #199: Return Requested Accept Type
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/199#issuecomment-322321298
 
 
   @bjustin-ibm, please review again.
 

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


With regards,
Apache Git Services


[GitHub] drcariel commented on a change in pull request #2591: User-Agent CLI/version header

2017-08-14 Thread git
drcariel commented on a change in pull request #2591: User-Agent CLI/version 
header
URL: 
https://github.com/apache/incubator-openwhisk/pull/2591#discussion_r133056257
 
 

 ##
 File path: tools/cli/go-whisk/whisk/client.go
 ##
 @@ -126,6 +127,10 @@ func NewClient(httpClient *http.Client, config *Config) 
(*Client, error) {
 config.Version = "v1"
 }
 
+if len(config.CLIVersion) == 0 {
+config.CLIVersion = "not_set"
+}
+
 
 Review comment:
   didn't check, just followed suit with the others, will test it out
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2591: User-Agent CLI/version header

2017-08-14 Thread git
rabbah commented on issue #2591: User-Agent CLI/version header
URL: 
https://github.com/apache/incubator-openwhisk/pull/2591#issuecomment-322301140
 
 
   I'd like to raise again the question of what we are gaining by changing the 
preflight responses for webactions or why these changes have to touch the 
controller at all. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2591: User-Agent CLI/version header

2017-08-14 Thread git
rabbah commented on issue #2591: User-Agent CLI/version header
URL: 
https://github.com/apache/incubator-openwhisk/pull/2591#issuecomment-322301140
 
 
   I'd like to raise again the question of what we are gaining by changing the 
preflight responses for webactions or what effect these changes have to touch 
the controller at all. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2591: User-Agent CLI/version header

2017-08-14 Thread git
rabbah commented on issue #2591: User-Agent CLI/version header
URL: 
https://github.com/apache/incubator-openwhisk/pull/2591#issuecomment-322301140
 
 
   I'd like to raise again the question of what we are gaining by changing the 
preflight responses for webactions or why thosnchsnge has to affect the 
controller at all. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2591: User-Agent CLI/version header

2017-08-14 Thread git
mdeuser commented on a change in pull request #2591: User-Agent CLI/version 
header
URL: 
https://github.com/apache/incubator-openwhisk/pull/2591#discussion_r133052007
 
 

 ##
 File path: tools/cli/go-whisk/whisk/client.go
 ##
 @@ -126,6 +127,10 @@ func NewClient(httpClient *http.Client, config *Config) 
(*Client, error) {
 config.Version = "v1"
 }
 
+if len(config.CLIVersion) == 0 {
+config.CLIVersion = "not_set"
+}
+
 
 Review comment:
   In your testing did you find this default setting to be needed?  i was 
thinking this check/set is not necessary due to the way the CLI version string 
is initialized
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2591: User-Agent CLI/version header

2017-08-14 Thread git
mdeuser commented on a change in pull request #2591: User-Agent CLI/version 
header
URL: 
https://github.com/apache/incubator-openwhisk/pull/2591#discussion_r133050798
 
 

 ##
 File path: tools/cli/go-whisk/whisk/client.go
 ##
 @@ -204,6 +209,8 @@ func (c *Client) NewRequest(method, urlStr string, body 
interface{}, includeName
 return nil, werr
 }
 
+req.Header.Add("User-Agent", "OpenWhisk-CLI/" + c.Config.CLIVersion)
 
 Review comment:
   Use a constant for the "OpenWhisk-CLI/" string
 

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


With regards,
Apache Git Services


[GitHub] zachschultz commented on issue #306: Implicit Runtime for Java is set to nodejs:default

2017-08-14 Thread git
zachschultz commented on issue #306: Implicit Runtime for Java is set to 
nodejs:default
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/306#issuecomment-322295074
 
 
   Just wskdeploy-ed a PHP action and it defaulted to `node` runtime on 
OpenWhisk. Should I open a new issue if my problem directly relates to this one?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2619: Fix Illegal Header Warnings (WIP)

2017-08-14 Thread git
rabbah commented on issue #2619: Fix Illegal Header Warnings (WIP)
URL: 
https://github.com/apache/incubator-openwhisk/pull/2619#issuecomment-322292193
 
 
   Ok. That's probably cleaner anyway. Thanks for knocking this off. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2591: User-Agent CLI/version header

2017-08-14 Thread git
drcariel commented on issue #2591: User-Agent CLI/version header
URL: 
https://github.com/apache/incubator-openwhisk/pull/2591#issuecomment-322290839
 
 
   PG2~1955
 

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


With regards,
Apache Git Services


[GitHub] mrutkows commented on a change in pull request #300: fix issues in webhook use case

2017-08-14 Thread git
mrutkows commented on a change in pull request #300: fix issues in webhook use 
case
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/300#discussion_r133042441
 
 

 ##
 File path: tests/usecases/webhook/deployment.yml
 ##
 @@ -12,8 +12,8 @@ application:
   inputs:
 # TODO(dliu): Please fix "repsotiory value" and see if we can 
change/remove username
 # as actual developer names should not be in these files when 
possible.
-username: daisy-ycguo
-repository: https://github.com/openwhisk/wsktool.git
-accessToken:
-events: PUSH
-endpoint: openwhisk.ng.bluemix.net
 
 Review comment:
   @daisy-ycguo Please do not assume bluemix as the endpoint, but please add 
another comment here that uses bluemix as an example and also describes what 
the endpoint would look like if installed locally (native).
 

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


With regards,
Apache Git Services


[GitHub] mrutkows commented on a change in pull request #300: fix issues in webhook use case

2017-08-14 Thread git
mrutkows commented on a change in pull request #300: fix issues in webhook use 
case
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/300#discussion_r133042193
 
 

 ##
 File path: tests/usecases/webhook/deployment.yml
 ##
 @@ -12,8 +12,8 @@ application:
   inputs:
 # TODO(dliu): Please fix "repsotiory value" and see if we can 
change/remove username
 
 Review comment:
   @daisy-ycguo Please remove the TODO comment and add a new comment telling 
user how to change the "username" and "accesstoken" and "repository".  For 
this, you can use fake example names.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2619: Fix Illegal Header Warnings (WIP)

2017-08-14 Thread git
dubeejw commented on issue #2619: Fix Illegal Header Warnings (WIP)
URL: 
https://github.com/apache/incubator-openwhisk/pull/2619#issuecomment-322287595
 
 
   @rabbah, the configuration setting did not work. Had to filter the headers 
instead.
 

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


With regards,
Apache Git Services


[GitHub] dubeejw opened a new pull request #2619: Turn Off Illegal Header Warnings (WIP)

2017-08-14 Thread git
dubeejw opened a new pull request #2619: Turn Off Illegal Header Warnings (WIP)
URL: https://github.com/apache/incubator-openwhisk/pull/2619
 
 
   Closes https://github.com/apache/incubator-openwhisk/issues/2612
 

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


With regards,
Apache Git Services


[GitHub] pritidesai commented on a change in pull request #298: Fix Parameter Resolution (both schema) & documentation for the triggerrule use case

2017-08-14 Thread git
pritidesai commented on a change in pull request #298: Fix Parameter Resolution 
(both schema) & documentation for the triggerrule use case
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/298#discussion_r133012405
 
 

 ##
 File path: parsers/manifest_parser.go
 ##
 @@ -403,19 +425,151 @@ func (action *Action) ComposeWskAction(manipath string) 
(*whisk.Action, error) {
return wskaction, err
 }
 
-// Resolve parameter input
-func ResolveParameter(param *Parameter) interface{} {
-   value := utils.GetEnvVar(param.Value)
+
+// TODO(): Support other valid Package Manifest types
+// TODO(): i.e., json (valid), timestamp, version, string256, string64, 
string16
+// TODO(): Support JSON schema validation for type: json
+// TODO(): Support OpenAPI schema validation
+
+var validParameterNameMap = map[string]string{
+   "string": "string",
+   "int": "integer",
+   "float": "float",
+   "bool": "boolean",
+   "int8": "integer",
+   "int16": "integer",
+   "int32": "integer",
+   "int64": "integer",
+   "float32": "float",
+   "float64": "float",
+}
+
+
+var typeDefaultValueMap = map[string]interface{} {
+   "string": "",
+   "integer": 0,
+   "float": 0.0,
+   "boolean": false,
+   // TODO() Support these types + their validation
+   // timestamp
+   // null
+   // version
+   // string256
+   // string64
+   // string16
+   // json
+   // scalar-unit
+   // schema
+   // object
+}
+
+func isValidParameterType(typeName string) bool {
+   _, isValid := typeDefaultValueMap[typeName]
+   return isValid
+}
+
+// TODO(): throw errors
+func getTypeDefaultValue(typeName string) interface{} {
+
+   if val, ok := typeDefaultValueMap[typeName]; ok {
+   return val
+   } else {
+   // TODO() throw an error "type not found"
+   }
+return nil
+}
+
+func ResolveParamTypeFromValue(value interface{}) (string, error) {
+// Note: string is the default type if not specified.
+   var paramType string = "string"
+   var err error = nil
+
+   if value != nil {
+   actualType := reflect.TypeOf(value).Kind().String()
+
+   // See if the actual type of the value is valid
+   if normalizedTypeName, found := 
validParameterNameMap[actualType]; found {
+   // use the full spec. name
+   paramType = normalizedTypeName
+
+   } else {
+   // raise an error if param is not a known type
+   err = utils.NewParserErr("",-1, "Parameter value is not 
a known type. [" + actualType + "]")
+   }
+   } else {
+
+   // TODO: The value may be supplied later, we need to support 
non-fatal warnings
+   // raise an error if param is nil
+   //err = utils.NewParserErr("",-1,"Paramter value is nil.")
+   }
+   return paramType, err
+}
+
+// Resolve input parameter (i.e., type, value, default)
+// Note: parameter values may set later (overriddNen) by an (optional) 
Deployment file
+func ResolveParameter(paramName string, param *Parameter) (interface{}, error) 
{
+
+   var errorParser error
+   var tempType string
+   // default parameter value to empty string
+   var value interface{} = ""
+
+   // Trace Parameter struct before any resolution
+   //dumpParameter(paramName, param, "BEFORE")
+
+   // Parameters can be single OR multi-line declarations which must be 
processed/validated differently
+   if !param.multiline {
+   // we have a single-line parameter declaration
+   // We need to identify parameter Type here for later validation
+   param.Type, errorParser = ResolveParamTypeFromValue(param.Value)
+
+   } else {
+   // we have a multi-line parameter declaration
+
+   // if we do not have a value, but have a default, use it for 
the value
+if param.Value == nil && param.Default !=nil {
+   param.Value = param.Default
+   }
+
+   // if we also have a type at this point, verify value (and/or 
default) matches type, if not error
+   // Note: if either the value or default is in conflict with the 
type then this is an error
+   tempType, errorParser = ResolveParamTypeFromValue(param.Value)
 
 Review comment:
   sure, sounds good to me, 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] bjustin-ibm closed pull request #84: DB view should filter out disabled triggers

2017-08-14 Thread git
bjustin-ibm closed pull request #84: DB view should filter out disabled triggers
URL: https://github.com/apache/incubator-openwhisk-package-alarms/pull/84
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2609: Support json response in HTTP web actions without base64 encoding.

2017-08-14 Thread git
dubeejw commented on a change in pull request #2609: Support json response in 
HTTP web actions without base64 encoding.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2609#discussion_r133008319
 
 

 ##
 File path: docs/webactions.md
 ##
 @@ -102,11 +102,13 @@ function main(params) {
 return {
 statusCode: 200,
 headers: { 'Content-Type': 'application/json' },
-body: new Buffer(JSON.stringify(params)).toString('base64'),
+body: params
 };
 }
 ```
 
+The default content-type for an HTTP response is `application/json` and the 
body may be any allowed JSON value. The default content-type may be omitted 
from the headers.
 
 Review comment:
   There is a section in the doc entitled `Decoding binary body content from 
Base64`. Do we want to deprecate the Base64 functionality so that we can remove 
it at some point? @csantanapr, FYI.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 closed pull request #124: DB view should filter out disabled triggers

2017-08-14 Thread git
bjustin-ibm closed pull request #124: DB view should filter out disabled 
triggers
URL: https://github.com/apache/incubator-openwhisk-package-cloudant/pull/124
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2591: User-Agent CLI/version header

2017-08-14 Thread git
drcariel commented on a change in pull request #2591: User-Agent CLI/version 
header
URL: 
https://github.com/apache/incubator-openwhisk/pull/2591#discussion_r133007795
 
 

 ##
 File path: tests/src/test/scala/whisk/core/cli/test/WskWebActionsTests.scala
 ##
 @@ -47,94 +47,16 @@ import whisk.core.entity.Subject
  * Tests web actions.
  */
 @RunWith(classOf[JUnitRunner])
-class WskWebActionsTestsV1 extends WskWebActionsTests {
-override val testRoutePath = "/api/v1/experimental/web"
-}
-
-@RunWith(classOf[JUnitRunner])
-class WskWebActionsTestsV2 extends WskWebActionsTests with BeforeAndAfterAll {
-override val testRoutePath = "/api/v1/web"
-
-private val subdomainRegex = 
Seq.fill(WhiskProperties.getPartsInVanitySubdomain)("[a-zA-Z0-9]+").mkString("-")
-
-private val (vanitySubdomain, vanityNamespace, makeTestSubject) = {
-if (namespace.matches(subdomainRegex)) {
-(namespace, namespace, false)
-} else {
-val s = Subject().asString.toLowerCase // this will generate two 
confirming parts
-(s, s.replace("-", "_"), true)
-}
-}
-
-private val wskPropsForSubdomainTest = if (makeTestSubject) {
-getAdditionalTestSubject(vanityNamespace) // create new subject for 
the test
-} else {
-WskProps()
-}
-
-override def afterAll() = {
-if (makeTestSubject) {
-disposeAdditionalTestSubject(vanityNamespace)
-}
-}
-
-"test subdomain" should "have conforming parts" in {
-vanitySubdomain should fullyMatch regex subdomainRegex.r
-vanitySubdomain.length should be <= 63
-}
-
-"vanity subdomain" should "access a web action via namespace subdomain" in 
withAssetCleaner(wskPropsForSubdomainTest) {
-(wp, assetHelper) =>
-val actionName = "webaction"
-
-val file = Some(TestUtils.getTestActionFilename("echo.js"))
-assetHelper.withCleaner(wsk.action, actionName) {
-(action, _) => action.create(actionName, file, web = 
Some(true.toString))(wp)
-}
-
-val url = getServiceApiHost(vanitySubdomain, true) + 
s"/default/$actionName.text/a?a=A"
-println(s"url: $url")
-
-// try the rest assured path first, failing that, try curl with 
explicit resolve
-Try {
-val response = RestAssured.given().config(sslconfig).get(url)
-val responseCode = response.statusCode
-responseCode shouldBe 200
-response.body.asString shouldBe "A"
-} match {
-case Failure(t) =>
-println(s"RestAssured path failed, trying curl: $t")
-implicit val tid = TransactionId.testing
-implicit val logger = new PrintStreamLogging(Console.out)
-val host = getServiceApiHost(vanitySubdomain, false)
-// if the edge host is a name, try to resolve it, 
otherwise, it should be an ip address already
-val edgehost = WhiskProperties.getEdgeHost
-val ip = 
Try(java.net.InetAddress.getByName(edgehost).getHostAddress) getOrElse "???"
-println(s"edge: $edgehost, ip: $ip")
-val cmd = Seq("curl", "-k", url, "--resolve", s"$host:$ip")
-val (stdout, stderr, exitCode) = SimpleExec.syncRunCmd(cmd)
-withClue(s"\n$stderr\n") {
-stdout shouldBe "A"
-exitCode shouldBe 0
-}
-
-case _ =>
-}
-}
-}
-
-trait WskWebActionsTests
-extends TestHelpers
-with WskTestHelpers
-with RestUtil {
+class WskWebActionsTests extends TestHelpers
+with WskTestHelpers with RestUtil with BeforeAndAfterAll {
 
 val MAX_URL_LENGTH = 8192 // 8K matching nginx default
 
 val wsk = new Wsk
 private implicit val wskprops = WskProps()
 val namespace = wsk.namespace.whois()
 
-protected val testRoutePath: String
+protected val testRoutePath: String = "/api/v1/web"
 
 
 Review comment:
   Is this appropriate here? or will testRoutePath be populated at this point?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2613: Patch posting of trigger activation.

2017-08-14 Thread git
rabbah commented on issue #2613: Patch posting of trigger activation.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2613#issuecomment-322241152
 
 
   Pg3/1004 ? 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2618: Update kafka_python to 1.3.4

2017-08-14 Thread git
bjustin-ibm commented on issue #2618: Update kafka_python to 1.3.4
URL: 
https://github.com/apache/incubator-openwhisk/pull/2618#issuecomment-322210123
 
 
   ? [PG1 
1949](https://openwhisk-jenkins.swg-devops.com:8443/view/Playgrounds/job/Playground1/1949/)
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 opened a new pull request #2618: Update kafka_python to 1.3.4

2017-08-14 Thread git
bjustin-ibm opened a new pull request #2618: Update kafka_python to 1.3.4
URL: https://github.com/apache/incubator-openwhisk/pull/2618
 
 
   This version contains important fixes to limit the number of connections 
made during bootstrapping
 

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


With regards,
Apache Git Services


[GitHub] houshengbo closed pull request #298: Fix Parameter Resolution (both schema) & documentation for the triggerrule use case

2017-08-14 Thread git
houshengbo closed pull request #298: Fix Parameter Resolution (both schema) & 
documentation for the triggerrule use case
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/298
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #213: Restart changes feed on all exceptions

2017-08-14 Thread git
bjustin-ibm commented on issue #213: Restart changes feed on all exceptions
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/213#issuecomment-322199443
 
 
   @csantanapr please 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 issue #187: create development guide

2017-08-14 Thread git
bjustin-ibm commented on issue #187: create development guide
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/187#issuecomment-322197082
 
 
   @csantanapr please 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 issue #213: Restart changes feed on all exceptions

2017-08-14 Thread git
bjustin-ibm commented on issue #213: Restart changes feed on all exceptions
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/pull/213#issuecomment-322194946
 
 
   @dubeejw 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] jasonpet opened a new pull request #84: DB view should filter out disabled triggers

2017-08-14 Thread git
jasonpet opened a new pull request #84: DB view should filter out disabled 
triggers
URL: https://github.com/apache/incubator-openwhisk-package-alarms/pull/84
 
 
   tweaking view to remove disabled triggers
 

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


With regards,
Apache Git Services


[GitHub] cfjedimaster commented on issue #2617: Invoking action via CLI with the -b and -r options gives non-zero exit code

2017-08-14 Thread git
cfjedimaster commented on issue #2617: Invoking action via CLI with the -b and 
-r options gives non-zero exit code 
URL: 
https://github.com/apache/incubator-openwhisk/issues/2617#issuecomment-322190385
 
 
   To add a bit more context, it seems to revolve around the name of the key 
and the value. When I change "response" to anything else, it works. If I change 
the value to a simple string, it works. If I change the value to an array, it 
works. As soon as I use: "reponse":{ ...} it fails via the CLI. The code runs 
100% fine though. In my original code, I was using Twitter's API to send out a 
tweet and it ran fine, it's just the error in the CLI.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 opened a new issue #2617: Invoking action via CLI with the -b and -r options gives non-zero exit code

2017-08-14 Thread git
mdeuser opened a new issue #2617: Invoking action via CLI with the -b and -r 
options gives non-zero exit code 
URL: https://github.com/apache/incubator-openwhisk/issues/2617
 
 
   ## Environment details:
   
   * Bluemix
   
   ## Steps to reproduce the issue:
   
   1.   Create an action (normal action or web action) that returns a promise 
that's resolved with a JSON object
   ```
   function main(args) {
  return new Promise((resolve, reject) => {
  resolve({"response":{"SomeField":1}});
  });
   }
   ```
   2.  Invoke the action via CLI using the `-b` and `-r` options
   3.  Compare results to invoking action with just the `-b` option
   
   
   ## Provide the expected results and outputs:
   Eixt code of 0 and output:
   ```
   {
 "SomeField": 1
   }
   ```
   
   
   ## Provide the actual results and outputs:
   Exit code of -56 and output:
   ```
   error: Unable to invoke action 'YOUR-ACTION': The connection failed, or 
timed out. (HTTP status code 200)
   Run 'wsk --help' for usage.
   ```
   
   
   
 

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


With regards,
Apache Git Services


[GitHub] mrutkows commented on a change in pull request #298: Fix Parameter Resolution (both schema) & documentation for the triggerrule use case

2017-08-14 Thread git
mrutkows commented on a change in pull request #298: Fix Parameter Resolution 
(both schema) & documentation for the triggerrule use case
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/298#discussion_r132932140
 
 

 ##
 File path: parsers/manifest_parser.go
 ##
 @@ -403,19 +425,151 @@ func (action *Action) ComposeWskAction(manipath string) 
(*whisk.Action, error) {
return wskaction, err
 }
 
-// Resolve parameter input
-func ResolveParameter(param *Parameter) interface{} {
-   value := utils.GetEnvVar(param.Value)
+
+// TODO(): Support other valid Package Manifest types
+// TODO(): i.e., json (valid), timestamp, version, string256, string64, 
string16
+// TODO(): Support JSON schema validation for type: json
+// TODO(): Support OpenAPI schema validation
+
+var validParameterNameMap = map[string]string{
+   "string": "string",
+   "int": "integer",
+   "float": "float",
+   "bool": "boolean",
+   "int8": "integer",
+   "int16": "integer",
+   "int32": "integer",
+   "int64": "integer",
+   "float32": "float",
+   "float64": "float",
+}
+
+
+var typeDefaultValueMap = map[string]interface{} {
+   "string": "",
+   "integer": 0,
+   "float": 0.0,
+   "boolean": false,
+   // TODO() Support these types + their validation
+   // timestamp
+   // null
+   // version
+   // string256
+   // string64
+   // string16
+   // json
+   // scalar-unit
+   // schema
+   // object
+}
+
+func isValidParameterType(typeName string) bool {
+   _, isValid := typeDefaultValueMap[typeName]
+   return isValid
+}
+
+// TODO(): throw errors
+func getTypeDefaultValue(typeName string) interface{} {
+
+   if val, ok := typeDefaultValueMap[typeName]; ok {
+   return val
+   } else {
+   // TODO() throw an error "type not found"
+   }
+return nil
+}
+
+func ResolveParamTypeFromValue(value interface{}) (string, error) {
+// Note: string is the default type if not specified.
+   var paramType string = "string"
+   var err error = nil
+
+   if value != nil {
+   actualType := reflect.TypeOf(value).Kind().String()
+
+   // See if the actual type of the value is valid
+   if normalizedTypeName, found := 
validParameterNameMap[actualType]; found {
+   // use the full spec. name
+   paramType = normalizedTypeName
+
+   } else {
+   // raise an error if param is not a known type
+   err = utils.NewParserErr("",-1, "Parameter value is not 
a known type. [" + actualType + "]")
+   }
+   } else {
+
+   // TODO: The value may be supplied later, we need to support 
non-fatal warnings
+   // raise an error if param is nil
+   //err = utils.NewParserErr("",-1,"Paramter value is nil.")
+   }
+   return paramType, err
+}
+
+// Resolve input parameter (i.e., type, value, default)
+// Note: parameter values may set later (overriddNen) by an (optional) 
Deployment file
+func ResolveParameter(paramName string, param *Parameter) (interface{}, error) 
{
+
+   var errorParser error
+   var tempType string
+   // default parameter value to empty string
+   var value interface{} = ""
+
+   // Trace Parameter struct before any resolution
+   //dumpParameter(paramName, param, "BEFORE")
+
+   // Parameters can be single OR multi-line declarations which must be 
processed/validated differently
+   if !param.multiline {
+   // we have a single-line parameter declaration
+   // We need to identify parameter Type here for later validation
+   param.Type, errorParser = ResolveParamTypeFromValue(param.Value)
+
+   } else {
+   // we have a multi-line parameter declaration
+
+   // if we do not have a value, but have a default, use it for 
the value
+if param.Value == nil && param.Default !=nil {
+   param.Value = param.Default
+   }
+
+   // if we also have a type at this point, verify value (and/or 
default) matches type, if not error
+   // Note: if either the value or default is in conflict with the 
type then this is an error
+   tempType, errorParser = ResolveParamTypeFromValue(param.Value)
 
 Review comment:
   Can we do this on a separate issue?  I would like to get this merged for the 
tests included thus far.  If we try to address all the TODOs I added regarding 
error/warning handling this issue will get too large IMO. @pritidesai 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this 

[GitHub] zhy989 commented on issue #210: How to use message feed

2017-08-14 Thread git
zhy989 commented on issue #210: How to use message feed
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/issues/210#issuecomment-322152650
 
 
   @bjustin-ibm thanks
   
   I had run Kafka instance successfully follow 
"https://kafka.apache.org/quickstart;.
   
   I re download the code from 
"https://github.com/bjustin-ibm/openwhisk-package-kafka; and update to 
   the master branch .
   
   run the docker image and  got the same error as before:
   
   - Traceback (most recent call last):
 File "app.py", line 24, in 
   from consumer import Consumer
 File "/KafkaFeedProvider/consumer.py", line 24, in 
   from database import Database
 File "/KafkaFeedProvider/database.py", line 23, in 
   class Database:
 File "/KafkaFeedProvider/database.py", line 26, in Database
   username = os.environ['CLOUDANT_USER']
 File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
   raise KeyError(key)
   KeyError: 'CLOUDANT_USER'
   
   I download code from 
"https://github.com/apache/incubator-openwhisk-package-kafka;
   run the docker image and got the error as below  
   
   - Traceback (most recent call last):
 File "app.py", line 97, in 
   main()
 File "app.py", line 83, in main
   database = Database()
 File "/KafkaFeedProvider/database.py", line 46, in __init__
   client.connect()
 File "/usr/local/lib/python2.7/dist-packages/cloudant/client.py", line 
114, in connect
   self.session_login(self._user, self._auth_token)
 File "/usr/local/lib/python2.7/dist-packages/cloudant/client.py", line 
170, in session_login
   headers={'Content-Type': 'application/x-www-form-urlencoded'}
 File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 
518, in post
   return self.request('POST', url, data=data, json=json, **kwargs)
 File "/usr/local/lib/python2.7/dist-packages/cloudant/_common_util.py", 
line 346, in request
   method, url, timeout=self._timeout, **kwargs)
 File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 
475, in request
   resp = self.send(prep, **send_kwargs)
 File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 
585, in send
   r = adapter.send(request, **kwargs)
 File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 
477, in send
   raise SSLError(e, request=request)
   requests.exceptions.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol 
(_ssl.c:590)
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2616: Add retry to rate-throttle tests becasue of the possiblility, that it?

2017-08-14 Thread git
markusthoemmes commented on issue #2616: Add retry to rate-throttle tests 
becasue of the possiblility, that it?
URL: 
https://github.com/apache/incubator-openwhisk/pull/2616#issuecomment-322144669
 
 
   @cbickel the test is still race prone though because you can have 
overlapping fires where it'd still fail because the first one would get 
throttled then. Maybe we should fire twice regardless of return code and verify 
that at least one of them got the expected return code to guard against 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 #2613: Patch posting of trigger activation.

2017-08-14 Thread git
rabbah commented on a change in pull request #2613: Patch posting of trigger 
activation.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2613#discussion_r132906034
 
 

 ##
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##
 @@ -173,20 +171,25 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
 Path.SingleSlash + 
rule.action.name.asString
 }
 }.toString
+
 val actionUrl = Path("/api/v1") / 
"namespaces" / actionNamespace / "actions"
 val request = HttpRequest(
 method = POST,
 uri = url.withPath(actionUrl + 
actionPath),
 headers = 
List(Authorization(BasicHttpCredentials(user.authkey.uuid.asString, 
user.authkey.key.asString))),
 entity = 
HttpEntity(MediaTypes.`application/json`, 
args.getOrElse(JsObject()).compactPrint))
 
-Http().singleRequest(request).map {
-case HttpResponse(StatusCodes.OK, 
headers, entity, _) =>
-logging.info(this, s"successfully 
invoked ${rule.action} -> ")
-case 
HttpResponse(StatusCodes.NotFound, _, _, _) =>
-logging.info(this, s"action 
${rule.action} could not be found")
-case HttpResponse(code, _, entity, _) 
=>
-logging.warn(this, s"action 
${rule.action} could not be invoked due to ${entity.getDataBytes.toString}")
+Http().singleRequest(request).map { 
response =>
+response.status match {
+case OK | Accepted => 
Unmarshal(response.entity).to[JsObject].map { a =>
+logging.info(this, 
s"${rule.action} activated ${a.fields("activationId")}")
+}
+case NotFound =>
+logging.info(this, 
s"${rule.action} failed, action not found")
 
 Review comment:
   Or response.discardEntityBytes()?
   
   Thx for the catch. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2616: Add retry to rate-throttle tests becasue of the possiblility, that it?

2017-08-14 Thread git
rabbah commented on issue #2616: Add retry to rate-throttle tests becasue of 
the possiblility, that it?
URL: 
https://github.com/apache/incubator-openwhisk/pull/2616#issuecomment-322138390
 
 
   Ah I misunderstood - so this is a case where we expected the request to be 
throttled and it wasn't. The calculation in the test setup then is wrong, it 
should compensate for this... iirc that was the intention. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #2616: Add retry to rate-throttle tests becasue of the possiblility, that it?

2017-08-14 Thread git
rabbah commented on issue #2616: Add retry to rate-throttle tests becasue of 
the possiblility, that it?
URL: 
https://github.com/apache/incubator-openwhisk/pull/2616#issuecomment-322137364
 
 
   Is there a way we could attempt to settle the throttle instead?  
   
   Hmm maybe if we provide the quota in the response in general it's useful and 
then the tests can deal with that accordingly. 
 

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


With regards,
Apache Git Services


[GitHub] lzbj commented on a change in pull request #262: Adjust the code to reflect latest API gateway version.

2017-08-14 Thread git
lzbj commented on a change in pull request #262: Adjust the code to reflect 
latest API gateway version.
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/262#discussion_r132888289
 
 

 ##
 File path: tests/src/integration/apigateway/manifest.yml
 ##
 @@ -0,0 +1,18 @@
+package:
+  name: book club
+  version: 1.0
+  license: Apache-2.0
+  apis: # new top-level key for defining groups of named APIs
 
 Review comment:
   @mrutkows , is this consistent with the latest spec and correct?
 

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


With regards,
Apache Git Services