[GitHub] tz70s closed pull request #3469: Ensure clean up testspace under wskadmin test.

2018-03-20 Thread GitBox
tz70s closed pull request #3469: Ensure clean up testspace under wskadmin test.
URL: https://github.com/apache/incubator-openwhisk/pull/3469
 
 
   

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

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

diff --git a/tests/src/test/scala/whisk/core/admin/WskAdminTests.scala 
b/tests/src/test/scala/whisk/core/admin/WskAdminTests.scala
index 58b1def910..05264ed300 100644
--- a/tests/src/test/scala/whisk/core/admin/WskAdminTests.scala
+++ b/tests/src/test/scala/whisk/core/admin/WskAdminTests.scala
@@ -22,6 +22,7 @@ import scala.concurrent.duration.DurationInt
 import org.junit.runner.RunWith
 import org.scalatest.Matchers
 import org.scalatest.junit.JUnitRunner
+import org.scalatest.BeforeAndAfterAll
 
 import common.RunWskAdminCmd
 import common.TestHelpers
@@ -33,7 +34,26 @@ import whisk.core.entity.Subject
 import common.TestUtils
 
 @RunWith(classOf[JUnitRunner])
-class WskAdminTests extends TestHelpers with Matchers {
+class WskAdminTests extends TestHelpers with Matchers with BeforeAndAfterAll {
+
+  override def beforeAll() = {
+val wskadmin = new RunWskAdminCmd {}
+val testSpaces = Seq("testspace", "testspace1", "testspace2")
+testSpaces.foreach(testspace => {
+  val noIdentStr = s"""no identities found for namespace \"$testspace\
+  val identities = wskadmin.cli(Seq("user", "list", "-a", testspace))
+  if (identities.stdout.trim == noIdentStr) {
+// nothing to clean up.
+  } else {
+identities.stdout
+  .split("\n")
+  .foreach(ident => {
+val sub = ident.split("\\s+").last
+wskadmin.cli(Seq("user", "delete", sub, "-ns", testspace))
+  })
+  }
+})
+  }
 
   behavior of "Wsk Admin 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] tz70s commented on issue #3469: Ensure clean up testspace under wskadmin test.

2018-03-20 Thread GitBox
tz70s commented on issue #3469: Ensure clean up testspace under wskadmin test.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3469#issuecomment-374837104
 
 
   Reopen this pr later, b.c. I need to figure out why the test got failed and 
avoid disturbing upstream travis build.


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


With regards,
Apache Git Services


[GitHub] mrutkows closed pull request #811: Deprecating WithinOpenWhisk flag

2018-03-20 Thread GitBox
mrutkows closed pull request #811: Deprecating WithinOpenWhisk flag
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/811
 
 
   

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

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

diff --git a/cmd/root.go b/cmd/root.go
index ca660a96..0f936747 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -18,13 +18,9 @@
 package cmd
 
 import (
-   "encoding/json"
-   "errors"
-   "fmt"
"os"
"path"
"path/filepath"
-   "regexp"
"strings"
 
"github.com/apache/incubator-openwhisk-client-go/whisk"
@@ -57,53 +53,13 @@ func RootCmdImp(cmd *cobra.Command, args []string) error {
 // Execute adds all child commands to the root command sets flags 
appropriately.
 // This is called by main.main(). It only needs to happen once to the rootCmd.
 func Execute() {
-   if utils.Flags.WithinOpenWhisk {
-   err := substCmdArgs()
-   if err != nil {
-   wskprint.PrintOpenWhiskFromError(err)
-   return
-   }
-   }
-
if err := RootCmd.Execute(); err != nil {
wskprint.PrintOpenWhiskFromError(err)
os.Exit(-1)
-   } else {
-   if utils.Flags.WithinOpenWhisk {
-   // TODO() Why are we printing success here?
-   // TODO() maybe return report of what has been deployed.
-   
wskprint.PrintlnOpenWhiskSuccess(wski18n.T(wski18n.ID_MSG_DEPLOYMENT_SUCCEEDED))
-   }
}
 }
 
-// This function is only used when wskdeploy is being called as an Action and 
its input
-// (i.e., command and arguments) is JSON data (map).
-func substCmdArgs() error {
-   // Extract arguments from input JSON string
-   // { "cmd": ".." } // space-separated arguments
-
-   arg := os.Args[1]
-
-   // TODO() Move to proper status output/debug/trace
-   fmt.Println("arg is " + arg)
-   // unmarshal the string to a JSON object
-   var obj map[string]interface{}
-   json.Unmarshal([]byte(arg), )
-
-   if v, ok := obj["cmd"].(string); ok {
-   regex, _ := regexp.Compile("[ ]+")
-   os.Args = regex.Split("wskdeploy "+strings.TrimSpace(v), -1)
-   } else {
-   return 
errors.New(wski18n.T(wski18n.ID_ERR_JSON_MISSING_KEY_CMD))
-   }
-   return nil
-}
-
 func init() {
-   // TODO() move Env var. to some global const
-   utils.Flags.WithinOpenWhisk = len(os.Getenv("__OW_API_HOST")) > 0
-
cobra.OnInitialize(initConfig)
 
// Defining Persistent Flags of Whisk Deploy Root command (wskdeploy)
diff --git a/utils/flags.go b/utils/flags.go
index 6ecae60d..278527e0 100644
--- a/utils/flags.go
+++ b/utils/flags.go
@@ -23,7 +23,6 @@ import (
 )
 
 type WskDeployFlags struct {
-   WithinOpenWhisk  bool   // is this running within an OpenWhisk action?
ApiHost  string // OpenWhisk API host
Auth string // OpenWhisk API key
Namespacestring
diff --git a/wski18n/i18n_resources.go b/wski18n/i18n_resources.go
index b9ffde58..b22c9175 100644
--- a/wski18n/i18n_resources.go
+++ b/wski18n/i18n_resources.go
@@ -329,14 +329,14 @@ func AssetNames() []string {
 
 // _bindata is a table, holding each asset generator, mapped to its name.
 var _bindata = map[string]func() (*asset, error){
-   "wski18n/resources/de_DE.all.json": wski18nResourcesDe_deAllJson,
-   "wski18n/resources/en_US.all.json": wski18nResourcesEn_usAllJson,
-   "wski18n/resources/es_ES.all.json": wski18nResourcesEs_esAllJson,
-   "wski18n/resources/fr_FR.all.json": wski18nResourcesFr_frAllJson,
-   "wski18n/resources/it_IT.all.json": wski18nResourcesIt_itAllJson,
-   "wski18n/resources/ja_JA.all.json": wski18nResourcesJa_jaAllJson,
-   "wski18n/resources/ko_KR.all.json": wski18nResourcesKo_krAllJson,
-   "wski18n/resources/pt_BR.all.json": wski18nResourcesPt_brAllJson,
+   "wski18n/resources/de_DE.all.json":   wski18nResourcesDe_deAllJson,
+   "wski18n/resources/en_US.all.json":   wski18nResourcesEn_usAllJson,
+   "wski18n/resources/es_ES.all.json":   wski18nResourcesEs_esAllJson,
+   "wski18n/resources/fr_FR.all.json":   wski18nResourcesFr_frAllJson,
+   "wski18n/resources/it_IT.all.json":   wski18nResourcesIt_itAllJson,
+   "wski18n/resources/ja_JA.all.json":   wski18nResourcesJa_jaAllJson,
+   "wski18n/resources/ko_KR.all.json":   wski18nResourcesKo_krAllJson,
+   "wski18n/resources/pt_BR.all.json":   wski18nResourcesPt_brAllJson,
"wski18n/resources/zh_Hans.all.json": wski18nResourcesZh_hansAllJson,
"wski18n/resources/zh_Hant.all.json": wski18nResourcesZh_hantAllJson,
 }
@@ -380,17 +380,18 @@ type bintree 

[GitHub] mrutkows closed issue #791: Crash when running with __OW_API_KEY and __OW_API_HOST set

2018-03-20 Thread GitBox
mrutkows closed issue #791: Crash when running with __OW_API_KEY and 
__OW_API_HOST set
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/791
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #34: Remove swift:4.0, only swift:4.1

2018-03-20 Thread GitBox
csantanapr closed pull request #34: Remove swift:4.0, only swift:4.1
URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/34
 
 
   

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

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

diff --git a/README.md b/README.md
index 1062e48..5fefccc 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,6 @@
 
 ## Changelogs
 - [Swift 3.1.1 CHANGELOG.md](core/swift3.1.1Action/CHANGELOG.md)
-- [Swift 4.0   CHANGELOG.md](core/swift40Action/CHANGELOG.md)
 - [Swift 4.1   CHANGELOG.md](core/swift41Action/CHANGELOG.md)
 
 ## Quick Swift Action
@@ -117,7 +116,7 @@ To avoid the cold-start delay, you can compile your Swift 
file into a binary and
 
 - Run an interactive Swift action container.
   ```
-  docker run --rm -it -v "$(pwd):/owexec" openwhisk/action-swift-v4.0 bash
+  docker run --rm -it -v "$(pwd):/owexec" openwhisk/action-swift-v4.1 bash
   ```
   This puts you in a bash shell within the Docker container.
 
@@ -162,7 +161,7 @@ let package = Package(
 ```
   As you can see this example adds `SwiftyRequest` dependencies.
   
-  Notice that now with swift:4.0 is no longer required to include `CCurl`, 
`Kitura-net` and `SwiftyJSON` in your own `Package.swift`.
+  Notice that now with swift:4.1 is no longer required to include `CCurl`, 
`Kitura-net` and `SwiftyJSON` in your own `Package.swift`.
   You are free now to use no dependencies, or add the combination that you 
want with the versions you want.
 
 - Copy Package.swift to spm-build directory
@@ -194,7 +193,7 @@ let package = Package(
 
 - Upload it to OpenWhisk with the action name helloSwifty:
   ```
-  wsk action update helloSwiftly hello.zip openwhisk/action-swift-v4.0
+  wsk action update helloSwiftly hello.zip openwhisk/action-swift-v4.1
   ```
 
 - To check how much faster it is, run
@@ -219,15 +218,15 @@ Having a project directory `Hello` under a directory 
`actions` like the followin
 actions/Hello/Package.swift
 actions/Hello/Sources/main.swift
 ```
-Change to the parent directory then run the compile script specify the project 
directory, the kind `swift:3.1.1` or `swift:4.0` and any swiftc build flags 
like the following:
+Change to the parent directory then run the compile script specify the project 
directory, the kind `swift:3.1.1` or `swift:4.1` and any swiftc build flags 
like the following:
 ```
 cd actions/
-incubator-runtime-swift/tools/build/compile.sh Hello swift:4.0 -v
+incubator-runtime-swift/tools/build/compile.sh Hello swift:4.1 -v
 ```
 This will produce a zip `build/swift4/Hello.zip`
 
 ### SwiftyJSON using single source action file
-If you have a swift:3.1.1 action not compile, just as source using the 
`SwiftyJSON` package, you need to precompile your action and specify the 
version of SwiftyJSON you wan to use for swift:4.0 kind action.
+If you have a swift:3.1.1 action not compile, just as source using the 
`SwiftyJSON` package, you need to precompile your action and specify the 
version of SwiftyJSON you wan to use for swift:4.1 kind action.
 Take into account that starting with Swift 4 there is better support to manage 
JSON data natively.
 
 Note: This is only applicable to the base image provided for the Swift 4 
runtime, other downstream such as IBM Cloud Functions extending this image 
might provide additional SDK and packages including `SwiftyJSON` and IBM Watson 
SDK, check the vendor documentation for more specific information about 
packages and versions.
@@ -236,7 +235,7 @@ Note: This is only applicable to the base image provided 
for the Swift 4 runtime
 ```
 ./gradlew core:swift40Action:distDocker
 ```
-This will produce the image `whisk/action-swift-v4.0`
+This will produce the image `whisk/action-swift-v4.1`
 
 Build and Push image
 ```
@@ -246,7 +245,7 @@ docker login
 
 ### Swift 4.1 Experimental
 We have a runtime for swift 4.1, is experimental as we are trying beta builds 
released by Swift org.
-Follow same insructions for Swift 4.0 above and replace the kind wih 
`swift:4.1` and image with `openwhisk/action-swift-v4.0`
+Follow same insructions for Swift 4.1 above and replace the kind wih 
`swift:4.1` and image with `openwhisk/action-swift-v4.1`
 
 
 ## Codable Suppor with Swift 4.x
@@ -336,7 +335,7 @@ wsk action update myAction myAction.swift --kind swift:3.1.1
 
 ## Local development
 ```
-./gradlew core:swiftAction:distDocker
+./gradlew core:swift41Action:distDocker
 ```
 This will produce the image `whisk/action-swift-v3.1.1`
 
diff --git a/ansible/environments/local/group_vars/all 
b/ansible/environments/local/group_vars/all
index f11e4e0..2085010 100755
--- a/ansible/environments/local/group_vars/all
+++ b/ansible/environments/local/group_vars/all
@@ -47,13 +47,8 @@ runtimes_manifest:
   image:
 name: "action-swift-v3.1.1"
   deprecated: false
-- kind: 

[GitHub] csantanapr closed issue #30: Remove Swift 4.0, only support 4.1 and forward

2018-03-20 Thread GitBox
csantanapr closed issue #30: Remove Swift 4.0, only support 4.1 and forward
URL: https://github.com/apache/incubator-openwhisk-runtime-swift/issues/30
 
 
   


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


With regards,
Apache Git Services


[GitHub] dubee closed pull request #3472: Remove email address

2018-03-20 Thread GitBox
dubee closed pull request #3472: Remove email address
URL: https://github.com/apache/incubator-openwhisk/pull/3472
 
 
   

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

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

diff --git a/tests/src/test/scala/whisk/core/cli/test/ApiGwTests.scala 
b/tests/src/test/scala/whisk/core/cli/test/ApiGwTests.scala
index ed74c9ac9d..90b24346e7 100644
--- a/tests/src/test/scala/whisk/core/cli/test/ApiGwTests.scala
+++ b/tests/src/test/scala/whisk/core/cli/test/ApiGwTests.scala
@@ -611,8 +611,6 @@ abstract class ApiGwTests extends BaseApiGwTests {
   }
 
   it should "verify successful creation of a new API using an action name 
using all allowed characters" in {
-// Be aware: full action name is close to being truncated by the 'list' 
command
-// e.g. /l...@us.ibm.com/CLI_APIGWTEST9a-c@t ion  is currently at the 40 
char 'list' display max
 val testName = "CLI_APIGWTEST9"
 val testbasepath = "/" + testName + "_bp"
 val testrelpath = "/path"


 


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


With regards,
Apache Git Services


[GitHub] dubee closed pull request #250: Remove email addresses

2018-03-20 Thread GitBox
dubee closed pull request #250: Remove email addresses
URL: https://github.com/apache/incubator-openwhisk-cli/pull/250
 
 
   

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

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

diff --git a/notes.md b/notes.md
index ff27d424..ac0e0e71 100644
--- a/notes.md
+++ b/notes.md
@@ -156,7 +156,7 @@ client changes:
 Get namespace contents:
 
 wsk namespace get --> GET /v1/namespaces/_
-wsk namespace get wilso...@us.ibm.com --> GET /v1/namespaces/_/wilsonth--
+wsk namespace get namespace --> GET /v1/namespaces/_/user--
 
 Get list of namespaces available
 
diff --git a/tests/src/test/scala/whisk/core/cli/test/ApiGwTests.scala 
b/tests/src/test/scala/whisk/core/cli/test/ApiGwTests.scala
index 4bbe3957..c9aa5506 100644
--- a/tests/src/test/scala/whisk/core/cli/test/ApiGwTests.scala
+++ b/tests/src/test/scala/whisk/core/cli/test/ApiGwTests.scala
@@ -685,8 +685,6 @@ abstract class ApiGwTests extends BaseApiGwTests {
   }
 
   it should "verify successful creation of a new API using an action name 
using all allowed characters" in {
-// Be aware: full action name is close to being truncated by the 'list' 
command
-// e.g. /l...@us.ibm.com/CLI_APIGWTEST9a-c@t ion  is currently at the 40 
char 'list' display max
 val testName = "CLI_APIGWTEST9"
 val testbasepath = "/" + testName + "_bp"
 val testrelpath = "/path"


 


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


With regards,
Apache Git Services


[GitHub] dubee commented on issue #250: Remove email addresses

2018-03-20 Thread GitBox
dubee commented on issue #250: Remove email addresses
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/250#issuecomment-374769905
 
 
   Travis failed because of intermittent test failure to be fixed in this PR 
https://github.com/apache/incubator-openwhisk-cli/pull/247.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
mdeuser commented on issue #3464: Add wsk action get to CLI docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#issuecomment-374765536
 
 
   @dubee changes look ok... although i think this section probably needs 
additional rework to better integrate the web action aspects (web action are 
actions) and clarify the two kinds of `metadata` referenced.


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


With regards,
Apache Git Services


[GitHub] pritidesai commented on issue #811: Deprecating WithinOpenWhisk flag

2018-03-20 Thread GitBox
pritidesai commented on issue #811: Deprecating WithinOpenWhisk flag
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/811#issuecomment-374763837
 
 
   @beemarie `exec` deals with the set of env. variables specified in 
execOptions, its nothing to do with `wskdeploy`. Its more about injecting those 
env. variables (cloudant username etc) into env. where `wskdeploy` is being 
called:
   
   ```
   exec env CLOUDANT_USERNAME=myusername 
/nodejsAction/SNbFbbD4/lib/../../wskdeploy -v -m manifest.yaml --auth  
--apihost https://172.17.0.1:443;,
   ``` 


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


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #247: Fix intermittent test failure

2018-03-20 Thread GitBox
dubee commented on a change in pull request #247: Fix intermittent test failure
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/247#discussion_r175927899
 
 

 ##
 File path: tests/src/test/scala/system/basic/WskBasicTests.scala
 ##
 @@ -549,13 +549,18 @@ class WskBasicTests extends TestHelpers with 
WskTestHelpers {
 
 result.fields("name") shouldBe name.toJson
 result.fields("namespace") shouldBe ns.toJson
-result.fields("annotations") shouldBe JsArray(
+val receivedAnnotations = 
result.fields("annotations").convertTo[JsArray].elements
+val expectedAnnotations = JsArray(
   JsObject("key" -> JsString("description"), "value" -> JsString("Trigger 
description")),
   JsObject(
 "key" -> JsString("parameters"),
 "value" -> JsArray(
   JsObject("description" -> JsString("Parameter description 1"), 
"name" -> JsString("paramName1")),
-  JsObject("description" -> JsString("Parameter description 2"), 
"name" -> JsString("paramName2")
+  JsObject("description" -> JsString("Parameter description 2"), 
"name" -> JsString("paramName2").elements
+
+for (expectedItem <- expectedAnnotations) {
 
 Review comment:
   @mdeuser, giving it a try.


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


With regards,
Apache Git Services


[GitHub] dubee closed pull request #249: Use proper license headers

2018-03-20 Thread GitBox
dubee closed pull request #249: Use proper license headers
URL: https://github.com/apache/incubator-openwhisk-cli/pull/249
 
 
   

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

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

diff --git a/commands/qualified_name.go b/commands/qualified_name.go
index 8209ee88..bae3a3d4 100644
--- a/commands/qualified_name.go
+++ b/commands/qualified_name.go
@@ -1,11 +1,12 @@
 /*
- * Copyright 2015-2016 IBM Corporation
+ * 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
  *
- * Licensed 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
+ * 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,
diff --git a/tests/src/test/scala/common/TestCLIUtils.scala 
b/tests/src/test/scala/common/TestCLIUtils.scala
index 4bb67401..de824b15 100644
--- a/tests/src/test/scala/common/TestCLIUtils.scala
+++ b/tests/src/test/scala/common/TestCLIUtils.scala
@@ -1,11 +1,12 @@
 /*
- * Copyright 2015-2016 IBM Corporation
+ * 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
  *
- * Licensed 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
+ * 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,


 


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


With regards,
Apache Git Services


[GitHub] houshengbo commented on issue #251: Add the support to specify the version of the binaries

2018-03-20 Thread GitBox
houshengbo commented on issue #251: Add the support to specify the version of 
the binaries
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/251#issuecomment-374760632
 
 
   @jonpspri Please help me review this PR, 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] dubee closed pull request #248: Fix test to not compare namespace to subject

2018-03-20 Thread GitBox
dubee closed pull request #248: Fix test to not compare namespace to subject
URL: https://github.com/apache/incubator-openwhisk-cli/pull/248
 
 
   

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

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

diff --git a/tests/src/test/scala/system/basic/WskBasicTests.scala 
b/tests/src/test/scala/system/basic/WskBasicTests.scala
index 04ad24d7..3689f3be 100644
--- a/tests/src/test/scala/system/basic/WskBasicTests.scala
+++ b/tests/src/test/scala/system/basic/WskBasicTests.scala
@@ -947,7 +947,7 @@ class WskBasicTests extends TestHelpers with WskTestHelpers 
{
   getJSONFromResponse(result.stdout, 
true).fields("name").convertTo[String] shouldBe triggerName
   getJSONFromResponse(result.stdout, 
true).fields("version").convertTo[String] shouldBe "0.0.1"
   getJSONFromResponse(result.stdout, true).fields("publish") shouldBe 
false.toJson
-  getJSONFromResponse(result.stdout, 
true).fields("subject").convertTo[String] shouldBe ns
+  getJSONFromResponse(result.stdout, 
true).fields("subject").convertTo[String].length should not be (0)
   getJSONFromResponse(result.stdout, 
true).fields("activationId").convertTo[String] shouldBe activation.activationId
   getJSONFromResponse(result.stdout, true).fields("start") should not be 
JsObject()
   getJSONFromResponse(result.stdout, true).fields("end") shouldBe 0.toJson


 


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


With regards,
Apache Git Services


[GitHub] dgrove-oss commented on issue #167: Add webhook for slackbot notification of TravisCI jobs

2018-03-20 Thread GitBox
dgrove-oss commented on issue #167: Add webhook for slackbot notification of 
TravisCI jobs
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/167#issuecomment-374759296
 
 
   changed as requested; ready to 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] beemarie commented on issue #811: Deprecating WithinOpenWhisk flag

2018-03-20 Thread GitBox
beemarie commented on issue #811: Deprecating WithinOpenWhisk flag
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/811#issuecomment-374756424
 
 
   @pritidesai @mrutkows The code priti posted is how wskdeploy is being called 
from the deploy package.  The environment data (cloudant db, cloudant username, 
etc) is stored as execOptions for the exec command.  I don't know how that gets 
translated into the actual command, if it all?
   
   
https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback
   
   Is it possible for you to test the deploy package with your change so we can 
be sure?


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


With regards,
Apache Git Services


[GitHub] houshengbo opened a new pull request #251: Add the support to specify the version of the binaries

2018-03-20 Thread GitBox
houshengbo opened a new pull request #251: Add the support to specify the 
version of the binaries
URL: https://github.com/apache/incubator-openwhisk-cli/pull/251
 
 
   This PR changes the task name from release to releaseBinaries in
   order to make it consistent in the release process. It also adds
   packageVersion as a parameter to specify the version of the binaries
   to be released.
   
   Partially-closes: apache/incubator-openwhisk-release#9


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


With regards,
Apache Git Services


[GitHub] houshengbo commented on issue #63: Verify API Gateway legal NOTICE / CREDITS files ack. licenses/contribs.

2018-03-20 Thread GitBox
houshengbo commented on issue #63: Verify API Gateway legal NOTICE / CREDITS 
files ack. licenses/contribs.
URL: 
https://github.com/apache/incubator-openwhisk-release/issues/63#issuecomment-374753437
 
 
   closes: https://github.com/apache/incubator-openwhisk-release/issues/9


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


With regards,
Apache Git Services


[GitHub] houshengbo commented on issue #63: Verify API Gateway legal NOTICE / CREDITS files ack. licenses/contribs.

2018-03-20 Thread GitBox
houshengbo commented on issue #63: Verify API Gateway legal NOTICE / CREDITS 
files ack. licenses/contribs.
URL: 
https://github.com/apache/incubator-openwhisk-release/issues/63#issuecomment-374753437
 
 
   closes: https://github.com/apache/incubator-openwhisk-release/issues/9


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


With regards,
Apache Git Services


[GitHub] dubee opened a new pull request #3472: Remove email address

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


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


With regards,
Apache Git Services


[GitHub] dubee opened a new pull request #250: Remove email addresses

2018-03-20 Thread GitBox
dubee opened a new pull request #250: Remove email addresses
URL: https://github.com/apache/incubator-openwhisk-cli/pull/250
 
 
   Scrub email address from a couple of files.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #247: Fix intermittent test failure

2018-03-20 Thread GitBox
mdeuser commented on a change in pull request #247: Fix intermittent test 
failure
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/247#discussion_r175916324
 
 

 ##
 File path: tests/src/test/scala/system/basic/WskBasicTests.scala
 ##
 @@ -549,13 +549,18 @@ class WskBasicTests extends TestHelpers with 
WskTestHelpers {
 
 result.fields("name") shouldBe name.toJson
 result.fields("namespace") shouldBe ns.toJson
-result.fields("annotations") shouldBe JsArray(
+val receivedAnnotations = 
result.fields("annotations").convertTo[JsArray].elements
+val expectedAnnotations = JsArray(
   JsObject("key" -> JsString("description"), "value" -> JsString("Trigger 
description")),
   JsObject(
 "key" -> JsString("parameters"),
 "value" -> JsArray(
   JsObject("description" -> JsString("Parameter description 1"), 
"name" -> JsString("paramName1")),
-  JsObject("description" -> JsString("Parameter description 2"), 
"name" -> JsString("paramName2")
+  JsObject("description" -> JsString("Parameter description 2"), 
"name" -> JsString("paramName2").elements
+
+for (expectedItem <- expectedAnnotations) {
 
 Review comment:
   would this also work?  maybe a bit clearer
   ```expectedAnnotations should contain theSameElementsAs receivedAnnotations 
```


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


With regards,
Apache Git Services


[GitHub] dubee opened a new pull request #249: Use proper license headers

2018-03-20 Thread GitBox
dubee opened a new pull request #249: Use proper license headers
URL: https://github.com/apache/incubator-openwhisk-cli/pull/249
 
 
   The wrong license headers were being used in a couple of files.


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


With regards,
Apache Git Services


[GitHub] pritidesai commented on issue #811: Deprecating WithinOpenWhisk flag

2018-03-20 Thread GitBox
pritidesai commented on issue #811: Deprecating WithinOpenWhisk flag
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/811#issuecomment-374748897
 
 
   @mrutkows based on the `exec` command from [package 
deploy](https://github.com/apache/incubator-openwhisk-package-deploy/blob/7e5bbeaa0c2e01c2b3a0bf66550f4d97fd1774eb/packages/actions/lib/common.js#L34),
 `wskdeploy` is running with: (there is no JSON payload param)
   
   ```
   command = `printf 'y' | ${__dirname}/../../wskdeploy -v -m 
${manifestFileName} --auth ${wskAuth} --apihost ${wskApiHost}`;
   ```
   
   Such as:
   
   ```
   printf 'y' | /nodejsAction/SNbFbbD4/lib/../../wskdeploy -v -m manifest.yaml 
--auth  --apihost https://172.17.0.1:443;,
   ```
   
   @beemarie please confirm.


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


With regards,
Apache Git Services


[GitHub] pritidesai commented on issue #811: Deprecating WithinOpenWhisk flag

2018-03-20 Thread GitBox
pritidesai commented on issue #811: Deprecating WithinOpenWhisk flag
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/811#issuecomment-374748897
 
 
   @mrutkows based on the `exec` command from [package 
deploy](https://github.com/apache/incubator-openwhisk-package-deploy/blob/7e5bbeaa0c2e01c2b3a0bf66550f4d97fd1774eb/packages/actions/lib/common.js#L34),
 `wskdeploy` is running with:
   
   ```
   command = `printf 'y' | ${__dirname}/../../wskdeploy -v -m 
${manifestFileName} --auth ${wskAuth} --apihost ${wskApiHost}`;
   ```
   
   Such as:
   
   ```
   printf 'y' | /nodejsAction/SNbFbbD4/lib/../../wskdeploy -v -m manifest.yaml 
--auth  --apihost https://172.17.0.1:443;,
   ```
   
   @beemarie please confirm.


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


With regards,
Apache Git Services


[GitHub] dubee opened a new pull request #248: Fix test to not compare namespace to subject

2018-03-20 Thread GitBox
dubee opened a new pull request #248: Fix test to not compare namespace to 
subject
URL: https://github.com/apache/incubator-openwhisk-cli/pull/248
 
 
   `create a trigger, and fire a trigger to get its individual fields from an 
activation` directly compares a namespace to a subject which will result in a 
failure if the test namespace does not match the subject.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
mdeuser commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175910182
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -31,6 +31,7 @@ Learn how to create, invoke, and debug actions in your 
preferred development env
 In addition, learn about:
 
 * [Watching action output](#watching-action-output)
+* [Getting actions](#getting-actions)
 
 Review comment:
   ah.  my bad.  i misread the section header and was thinking of the action 
metadata associated with the action (i.e. memory limit, timeout, etc)..  
   
   ihmo, it's the use of the unqualified word `metadata` that lead to my 
confusion.  it's used in the `Getting actions` section and in the `Accessing 
action metadata...` section, but each represent a different set of properties.  
maybe the qualification is `action configuration metadata` vs `action runtime 
metadata`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
mdeuser commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175907988
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -1219,6 +1184,71 @@ This command starts a polling loop that continuously 
checks for logs from activa
 
   Similarly, whenever you run the poll utility, you see in real time the logs 
for any actions running on your behalf in OpenWhisk.
 
+## Getting actions
+
+Metadata that describes existing actions can be retrieved via the `wsk action 
get` command.
+
+```
+wsk action get hello
+ok: got action hello
+{
+"namespace": "u...@email.com",
+"name": "hello",
+"version": "0.0.1",
+"exec": {
+"kind": "nodejs:6",
 
 Review comment:
   :+1:   i saw some old output that had the `code` be 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] mdeuser commented on a change in pull request #244: Add --web-secure option to action create/update

2018-03-20 Thread GitBox
mdeuser commented on a change in pull request #244: Add --web-secure option to 
action create/update
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/244#discussion_r175903104
 
 

 ##
 File path: commands/action.go
 ##
 @@ -442,14 +457,109 @@ func parseAction(cmd *cobra.Command, args []string, 
update bool) (*whisk.Action,
return nil, noArtifactError()
}
 
+   whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
+   return action, err
+}
+
+func augmentAction(cmd *cobra.Command, args []string, action *whisk.Action, 
update bool) (*whisk.Action, error) {
+   var err error
+   var existingAction *whisk.Action = nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
+
+   if update {
+   if existingAction, _, err = Client.Actions.Get(action.Name, 
DO_NOT_FETCH_CODE); err != nil {
+   whiskErr, isWhiskError := err.(*whisk.WskError)
+
+   if (isWhiskError && whiskErr.ExitCode != 
whisk.EXIT_CODE_NOT_FOUND) || !isWhiskError {
+   return nil, actionGetError(action.Name, 
DO_NOT_FETCH_CODE, err)
+   }
+   }
+   }
+
+   // Augment the action's annotations with the --web related annotations
+   // FIXME MWD - avoid retrieving existing action TWICE!  once above and 
once in the webAction() below
+   if augmentedAction, err = augmentWebArg(cmd, args, augmentedAction, 
existingAction); err != nil {
+   return nil, err
+   }
+
+   // Augment the action's annotations with the --web-secure related 
annotations
+   if augmentedAction, err = augmentWebSecureArg(cmd, args, action, 
augmentedAction, existingAction); err != nil {
+   return nil, err
+   }
+
+   whisk.Debug(whisk.DbgInfo, "Augmented action struct: %#v\n", 
augmentedAction)
+   return augmentedAction, err
+}
+
+func augmentWebArg(cmd *cobra.Command, args []string, action *whisk.Action, 
existingAction *whisk.Action) (*whisk.Action, error) {
+   var err error
+   preserveAnnotations := action.Annotations == nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
 
 Review comment:
   @dubee good question...   not really.  in general, there are three separate 
"action" states that must be kept separate
   
   1. the original cli input that generated an action.  this action has the 
nicely parsed annotations/parameters
   2. the in-progress action which may or may not have been manipulated by 
other command line option processing
   3. the existing action (when present)
   
   the option augmentation logic is free to update the in-progress state, but 
not touch the original or existing action states.  this way each of the special 
command option processing will have all of the state to make its action 
augmentation decisions.
   
   i initially retained updating the action, but this became problematic when 
the --web and --web-secure needed to perform similar annotation preservation 
logic requiring each to know the original command line state, not the 
in-progress state.


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


With regards,
Apache Git Services


[GitHub] dubee opened a new pull request #247: Fix intermittent test failure

2018-03-20 Thread GitBox
dubee opened a new pull request #247: Fix intermittent test failure
URL: https://github.com/apache/incubator-openwhisk-cli/pull/247
 
 
   `create, and get a trigger summary` fails intermittently as the returned 
annotations array is not always in the expected order.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #244: Add --web-secure option to action create/update

2018-03-20 Thread GitBox
mdeuser commented on a change in pull request #244: Add --web-secure option to 
action create/update
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/244#discussion_r175904374
 
 

 ##
 File path: commands/action.go
 ##
 @@ -442,14 +457,109 @@ func parseAction(cmd *cobra.Command, args []string, 
update bool) (*whisk.Action,
return nil, noArtifactError()
}
 
+   whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
+   return action, err
+}
+
+func augmentAction(cmd *cobra.Command, args []string, action *whisk.Action, 
update bool) (*whisk.Action, error) {
+   var err error
+   var existingAction *whisk.Action = nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
+
+   if update {
+   if existingAction, _, err = Client.Actions.Get(action.Name, 
DO_NOT_FETCH_CODE); err != nil {
+   whiskErr, isWhiskError := err.(*whisk.WskError)
+
+   if (isWhiskError && whiskErr.ExitCode != 
whisk.EXIT_CODE_NOT_FOUND) || !isWhiskError {
+   return nil, actionGetError(action.Name, 
DO_NOT_FETCH_CODE, err)
+   }
+   }
+   }
+
+   // Augment the action's annotations with the --web related annotations
+   // FIXME MWD - avoid retrieving existing action TWICE!  once above and 
once in the webAction() below
+   if augmentedAction, err = augmentWebArg(cmd, args, augmentedAction, 
existingAction); err != nil {
+   return nil, err
+   }
+
+   // Augment the action's annotations with the --web-secure related 
annotations
+   if augmentedAction, err = augmentWebSecureArg(cmd, args, action, 
augmentedAction, existingAction); err != nil {
+   return nil, err
+   }
+
+   whisk.Debug(whisk.DbgInfo, "Augmented action struct: %#v\n", 
augmentedAction)
+   return augmentedAction, err
+}
+
+func augmentWebArg(cmd *cobra.Command, args []string, action *whisk.Action, 
existingAction *whisk.Action) (*whisk.Action, error) {
+   var err error
+   preserveAnnotations := action.Annotations == nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
+
if cmd.LocalFlags().Changed(WEB_FLAG) {
-   preserveAnnotations := action.Annotations == nil
-   action.Annotations, err = webAction(Flags.action.web, 
action.Annotations, qualifiedName.GetEntityName(), preserveAnnotations)
+   if existingAction == nil {
+   augmentedAction.Annotations, err = 
webAction(Flags.action.web, action.Annotations, action.Name, 
preserveAnnotations)
+   } else {
+   if augmentedAction.Annotations, err = 
webAction(Flags.action.web, action.Annotations, action.Name, 
preserveAnnotations); err == nil {
+   // Always carry forward any existing 
--web-secure annotation value
+   // Although it can be overwritten if 
--web-secure is set
+   webSecureAnnotations := 
getWebSecureAnnotations(existingAction)
+   if len(webSecureAnnotations) > 0 {
+   augmentedAction.Annotations = 
augmentedAction.Annotations.AppendKeyValueArr(webSecureAnnotations)
+   }
+   }
+   }
+   if err != nil {
+   return nil, err
+   }
}
 
-   whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
+   whisk.Debug(whisk.DbgInfo, "augmentWebArg: Augmented action struct: 
%#v\n", augmentedAction)
+   return augmentedAction, nil
+}
 
-   return action, err
+/*
+ * Return a whisk.Action augmented with --web-secure annotation updates
+ * originalAction:  a action constructed from command line argument
+ * action:  an action constructed from command line args + possible 
other augmentation (i.e. --web annotations)
+ * existingAction:  on an action update, this is the existing action
+ */
+func augmentWebSecureArg(cmd *cobra.Command, args []string, originalAction 
*whisk.Action, action *whisk.Action, existingAction *whisk.Action) 
(*whisk.Action, error) {
 
 Review comment:
   right.  since that logic for any new sugar flag is unique, each new flag 
would need to implement it's own "augmentation" function.  perhaps in another 
pr, there might be a table of these augmentation functions which are called in 
order during action create/update.


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


With regards,
Apache Git 

[GitHub] mrutkows commented on issue #791: Crash when running with __OW_API_KEY and __OW_API_HOST set

2018-03-20 Thread GitBox
mrutkows commented on issue #791: Crash when running with __OW_API_KEY and 
__OW_API_HOST set
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/791#issuecomment-374736872
 
 
   @pritidesai it seems that package-deploy does not use them, but did ask for 
Belinda to affirm herself that this detection of JSON parms is no longer needed.


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


With regards,
Apache Git Services


[GitHub] mrutkows commented on issue #811: Deprecating WithinOpenWhisk flag

2018-03-20 Thread GitBox
mrutkows commented on issue #811: Deprecating WithinOpenWhisk flag
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/811#issuecomment-374736355
 
 
   @beemarie Can you confirm that you no longer need to pass in arguments via a 
JSON structure when running 'wskdeploy' as an action.


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


With regards,
Apache Git Services


[GitHub] mdeuser commented on a change in pull request #244: Add --web-secure option to action create/update

2018-03-20 Thread GitBox
mdeuser commented on a change in pull request #244: Add --web-secure option to 
action create/update
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/244#discussion_r175903104
 
 

 ##
 File path: commands/action.go
 ##
 @@ -442,14 +457,109 @@ func parseAction(cmd *cobra.Command, args []string, 
update bool) (*whisk.Action,
return nil, noArtifactError()
}
 
+   whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
+   return action, err
+}
+
+func augmentAction(cmd *cobra.Command, args []string, action *whisk.Action, 
update bool) (*whisk.Action, error) {
+   var err error
+   var existingAction *whisk.Action = nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
+
+   if update {
+   if existingAction, _, err = Client.Actions.Get(action.Name, 
DO_NOT_FETCH_CODE); err != nil {
+   whiskErr, isWhiskError := err.(*whisk.WskError)
+
+   if (isWhiskError && whiskErr.ExitCode != 
whisk.EXIT_CODE_NOT_FOUND) || !isWhiskError {
+   return nil, actionGetError(action.Name, 
DO_NOT_FETCH_CODE, err)
+   }
+   }
+   }
+
+   // Augment the action's annotations with the --web related annotations
+   // FIXME MWD - avoid retrieving existing action TWICE!  once above and 
once in the webAction() below
+   if augmentedAction, err = augmentWebArg(cmd, args, augmentedAction, 
existingAction); err != nil {
+   return nil, err
+   }
+
+   // Augment the action's annotations with the --web-secure related 
annotations
+   if augmentedAction, err = augmentWebSecureArg(cmd, args, action, 
augmentedAction, existingAction); err != nil {
+   return nil, err
+   }
+
+   whisk.Debug(whisk.DbgInfo, "Augmented action struct: %#v\n", 
augmentedAction)
+   return augmentedAction, err
+}
+
+func augmentWebArg(cmd *cobra.Command, args []string, action *whisk.Action, 
existingAction *whisk.Action) (*whisk.Action, error) {
+   var err error
+   preserveAnnotations := action.Annotations == nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
 
 Review comment:
   @dubee good question...   not really.  in general, there are three separate 
"action" states that must be kept separate
   
   1. the original cli input that generated an action.  this action has the 
nicely parsed annotations/parameters
   2. the in-progress action which may or may not have been manipulated by 
other command line option processing
   3. the existing action (when present)
   
   the option augmentation logic is free to update the in-progress state, but 
not touch the original or existing action states.  this way each of the special 
command option processing will have all of the state to make its action 
augmentation decisions.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #246: Fix Go regex for path parameter parsing

2018-03-20 Thread GitBox
mdeuser commented on issue #246: Fix Go regex for path parameter parsing
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/246#issuecomment-374731987
 
 
   @drcariel -- would you mind reviewing


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #807: Deprecating Interactive Mode and introducing Preview

2018-03-20 Thread GitBox
mrutkows commented on issue #807: Deprecating Interactive Mode and introducing 
Preview
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/pull/807#issuecomment-374729320
 
 
   @csantanapr today!


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


With regards,
Apache Git Services


[GitHub] mrutkows closed pull request #807: Deprecating Interactive Mode and introducing Preview

2018-03-20 Thread GitBox
mrutkows closed pull request #807: Deprecating Interactive Mode and introducing 
Preview
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/807
 
 
   

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

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

diff --git a/cmd/export.go b/cmd/export.go
index 1f8655c3..437fb4f2 100644
--- a/cmd/export.go
+++ b/cmd/export.go
@@ -117,7 +117,7 @@ func ExportCmdImp(cmd *cobra.Command, args []string) error {
maniyaml := {}
maniyaml.Project.Name = projectName
 
-   config, _ = deployers.NewWhiskConfig(wskpropsPath, 
utils.Flags.DeploymentPath, utils.Flags.ManifestPath, false)
+   config, _ = deployers.NewWhiskConfig(wskpropsPath, 
utils.Flags.DeploymentPath, utils.Flags.ManifestPath)
client, _ = deployers.CreateNewClient(config)
 
// Init supported runtimes and action files extensions maps
diff --git a/cmd/report.go b/cmd/report.go
index 655a4b20..3ef86a90 100644
--- a/cmd/report.go
+++ b/cmd/report.go
@@ -42,7 +42,7 @@ var reportCmd = {
Short:  wski18n.T(wski18n.ID_CMD_DESC_SHORT_REPORT),
RunE: func(cmd *cobra.Command, args []string) error {
if wskpropsPath != "" {
-   config, _ := deployers.NewWhiskConfig(wskpropsPath, 
utils.Flags.DeploymentPath, utils.Flags.ManifestPath, false)
+   config, _ := deployers.NewWhiskConfig(wskpropsPath, 
utils.Flags.DeploymentPath, utils.Flags.ManifestPath)
client, _ := deployers.CreateNewClient(config)
return printDeploymentInfo(client)
} else {
@@ -51,7 +51,7 @@ var reportCmd = {
// TODO() we should not only use const. for config 
files like .wskprops, but have a dedicated
// set of functions in its own package to interact with 
it as a resource
propPath := path.Join(userHome, ".wskprops")
-   config, _ := deployers.NewWhiskConfig(propPath, 
utils.Flags.DeploymentPath, utils.Flags.ManifestPath, false)
+   config, _ := deployers.NewWhiskConfig(propPath, 
utils.Flags.DeploymentPath, utils.Flags.ManifestPath)
client, _ := deployers.CreateNewClient(config)
return printDeploymentInfo(client)
}
diff --git a/cmd/root.go b/cmd/root.go
index c29eca12..ca660a96 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -117,7 +117,7 @@ func init() {
RootCmd.PersistentFlags().StringVarP(, 
"manifest", "m", "", wski18n.T(wski18n.ID_CMD_FLAG_MANIFEST))
RootCmd.PersistentFlags().StringVarP(, 
"deployment", "d", "", wski18n.T(wski18n.ID_CMD_FLAG_DEPLOYMENT))
RootCmd.PersistentFlags().BoolVarP(, "strict", "s", 
false, wski18n.T(wski18n.ID_CMD_FLAG_STRICT))
-   RootCmd.PersistentFlags().BoolVarP(, 
"allow-interactive", "i", false, wski18n.T(wski18n.ID_CMD_FLAG_INTERACTIVE))
+   RootCmd.PersistentFlags().BoolVarP(, "preview", "", 
false, wski18n.T(wski18n.ID_CMD_FLAG_PREVIEW))
RootCmd.PersistentFlags().BoolVarP(, "verbose", 
"v", false, wski18n.T(wski18n.ID_CMD_FLAG_VERBOSE))
RootCmd.PersistentFlags().StringVarP(, "apihost", 
"", "", wski18n.T(wski18n.ID_CMD_FLAG_API_HOST))
RootCmd.PersistentFlags().StringVarP(, 
"namespace", "n", "", wski18n.T(wski18n.ID_CMD_FLAG_NAMESPACE))
@@ -230,7 +230,7 @@ func Deploy() error {
deployer.ProjectPath = projectPath
deployer.ManifestPath = utils.Flags.ManifestPath
deployer.DeploymentPath = utils.Flags.DeploymentPath
-   deployer.IsInteractive = utils.Flags.UseInteractive
+   deployer.Preview = utils.Flags.Preview
 
// master record of any dependency that has been downloaded
deployer.DependencyMaster = 
make(map[string]utils.DependencyRecord)
@@ -238,8 +238,7 @@ func Deploy() error {
clientConfig, error := deployers.NewWhiskConfig(
utils.Flags.CfgFile,
utils.Flags.DeploymentPath,
-   utils.Flags.ManifestPath,
-   deployer.IsInteractive)
+   utils.Flags.ManifestPath)
if error != nil {
return error
}
@@ -310,9 +309,9 @@ func Undeploy() error {
deployer.ProjectPath = utils.Flags.ProjectPath
deployer.ManifestPath = utils.Flags.ManifestPath
deployer.DeploymentPath = utils.Flags.DeploymentPath
-   deployer.IsInteractive = utils.Flags.UseInteractive
+   deployer.Preview = utils.Flags.Preview
 
-   clientConfig, error := 
deployers.NewWhiskConfig(utils.Flags.CfgFile, utils.Flags.DeploymentPath, 

[GitHub] mrutkows closed issue #693: whiskclient_test.go: "TestNewWhiskConfigInteractiveMode" incomplete/commented out

2018-03-20 Thread GitBox
mrutkows closed issue #693: whiskclient_test.go: 
"TestNewWhiskConfigInteractiveMode" incomplete/commented out
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/693
 
 
   


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


With regards,
Apache Git Services


[GitHub] mrutkows closed issue #758: Deprecate interactive mode in wskdeploy

2018-03-20 Thread GitBox
mrutkows closed issue #758: Deprecate interactive mode in wskdeploy
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/758
 
 
   


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


With regards,
Apache Git Services


[GitHub] bwmcadams opened a new pull request #3471: Fixes #3470 - Changed hardcoded timeouts for idle containers and pause grace to config entries

2018-03-20 Thread GitBox
bwmcadams opened a new pull request #3471: Fixes #3470 - Changed hardcoded 
timeouts for idle containers and pause grace to config entries
URL: https://github.com/apache/incubator-openwhisk/pull/3471
 
 
   
   
   
   ## Description
   
   Previously, the `idleTimeout` and `pauseGrace` settings for `ContainerProxy` 
have hardcoded defaults. This code changes to use pureconfig entries, allowing 
the defaults to be changed in configuration.
   
   
   
   Tests have been added to the `ContainerProxyTests` to verify the changes 
(and config parsing).
   
   ## Related issue and scope
   
   - [x] I opened an issue to propose and discuss this change (#3470 )
   
   ## My changes affect the following components
   
   
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [x] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [x] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   
   - [ ] Bug fix (generally a non-breaking change which closes an issue).
   - [x] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing 
behavior).
   
   ## Checklist:
   
   
   - [x] I signed an [Apache 
CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [x] I reviewed the [style 
guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness)
 and followed the recommendations (Travis CI will check :).
   - [x] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   
   


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


With regards,
Apache Git Services


[GitHub] bwmcadams opened a new issue #3470: Change ContainerProxy `unusedTimeout` and `pauseGrace` from hardcoded defaults to config driven

2018-03-20 Thread GitBox
bwmcadams opened a new issue #3470: Change ContainerProxy `unusedTimeout` and 
`pauseGrace` from hardcoded defaults to config driven
URL: https://github.com/apache/incubator-openwhisk/issues/3470
 
 
   
   
   ## Steps to reproduce the issue:
   
   1. Currently, `unusedTimeout` and `pauseGrace` have hardcoded defaults in 
`ContainerProxy`.
   2. This is not ideal.
   3. Preferred behavior should be pureconfig entries.
   
   ## Additional information you deem important:
   * Enhancement, not bug.


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


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
dubee commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175886022
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -1219,6 +1184,71 @@ This command starts a polling loop that continuously 
checks for logs from activa
 
   Similarly, whenever you run the poll utility, you see in real time the logs 
for any actions running on your behalf in OpenWhisk.
 
+## Getting actions
+
+Metadata that describes existing actions can be retrieved via the `wsk action 
get` command.
+
+```
+wsk action get hello
+ok: got action hello
+{
+"namespace": "u...@email.com",
+"name": "hello",
+"version": "0.0.1",
+"exec": {
+"kind": "nodejs:6",
 
 Review comment:
   @mdeuser, this doc update is related to 
https://github.com/apache/incubator-openwhisk-cli/commit/61df3c7e2c6cf2b31c7c6f70657504375d7ffcb8.


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


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
dubee commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175882446
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -1219,6 +1184,71 @@ This command starts a polling loop that continuously 
checks for logs from activa
 
   Similarly, whenever you run the poll utility, you see in real time the logs 
for any actions running on your behalf in OpenWhisk.
 
+## Getting actions
+
+Metadata that describes existing actions can be retrieved via the `wsk action 
get` command.
+
+```
+wsk action get hello
+ok: got action hello
+{
+"namespace": "u...@email.com",
+"name": "hello",
+"version": "0.0.1",
+"exec": {
+"kind": "nodejs:6",
+"binary": false
+},
+"annotations": [
+{
+"key": "exec",
+"value": "nodejs:6"
+}
+],
+"limits": {
+"timeout": 6,
+"memory": 256,
+"logs": 10
+},
+"publish": false
+}
+```
+
+### Getting an action URL
+
+An action can be invoked through the REST interface via an HTTPS request. To 
get an action URL, execute the following command:
+
+```
+wsk action get actionName --url
+```
+```
+ok: got action actionName
+https://${APIHOST}/api/v1/namespaces/${NAMESPACE}/actions/actionName
+```
+
+**Note:** Authentication must be provided when invoking an action via an HTTPS 
request. For more information regarding
 
 Review comment:
   I added the caveat just to be clear about how it works.


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


With regards,
Apache Git Services


[GitHub] dubee commented on issue #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
dubee commented on issue #3464: Add wsk action get to CLI docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#issuecomment-374713064
 
 
   @rabbah, @mdeuser, anything else?


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


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
dubee commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175545924
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -1219,6 +1184,71 @@ This command starts a polling loop that continuously 
checks for logs from activa
 
   Similarly, whenever you run the poll utility, you see in real time the logs 
for any actions running on your behalf in OpenWhisk.
 
+## Getting actions
+
+Metadata that describes existing actions can be retrieved via the `wsk action 
get` command.
+
+```
+wsk action get hello
+ok: got action hello
+{
+"namespace": "u...@email.com",
+"name": "hello",
+"version": "0.0.1",
+"exec": {
+"kind": "nodejs:6",
 
 Review comment:
   This is 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


[GitHub] dubee commented on a change in pull request #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
dubee commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175876601
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -31,6 +31,7 @@ Learn how to create, invoke, and debug actions in your 
preferred development env
 In addition, learn about:
 
 * [Watching action output](#watching-action-output)
+* [Getting actions](#getting-actions)
 
 Review comment:
   `Accessing action metadata within the action body` seems to be associated 
with action environment variables, which is not related to the action get 
command.


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


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
dubee commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175876068
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -1219,6 +1184,71 @@ This command starts a polling loop that continuously 
checks for logs from activa
 
   Similarly, whenever you run the poll utility, you see in real time the logs 
for any actions running on your behalf in OpenWhisk.
 
+## Getting actions
+
+Metadata that describes existing actions can be retrieved via the `wsk action 
get` command.
+
+```
+wsk action get hello
+ok: got action hello
+{
+"namespace": "u...@email.com",
+"name": "hello",
+"version": "0.0.1",
+"exec": {
+"kind": "nodejs:6",
 
 Review comment:
   Confused here. Code is no longer returned by 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] dubee commented on a change in pull request #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
dubee commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175876068
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -1219,6 +1184,71 @@ This command starts a polling loop that continuously 
checks for logs from activa
 
   Similarly, whenever you run the poll utility, you see in real time the logs 
for any actions running on your behalf in OpenWhisk.
 
+## Getting actions
+
+Metadata that describes existing actions can be retrieved via the `wsk action 
get` command.
+
+```
+wsk action get hello
+ok: got action hello
+{
+"namespace": "u...@email.com",
+"name": "hello",
+"version": "0.0.1",
+"exec": {
+"kind": "nodejs:6",
 
 Review comment:
   Confused here. The code is no longer returned by 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] dubee commented on a change in pull request #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
dubee commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175873830
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -1219,6 +1184,71 @@ This command starts a polling loop that continuously 
checks for logs from activa
 
   Similarly, whenever you run the poll utility, you see in real time the logs 
for any actions running on your behalf in OpenWhisk.
 
+## Getting actions
+
+Metadata that describes existing actions can be retrieved via the `wsk action 
get` command.
+
+```
+wsk action get hello
+ok: got action hello
+{
+"namespace": "u...@email.com",
+"name": "hello",
+"version": "0.0.1",
+"exec": {
+"kind": "nodejs:6",
+"binary": false
+},
+"annotations": [
+{
+"key": "exec",
+"value": "nodejs:6"
+}
+],
+"limits": {
+"timeout": 6,
+"memory": 256,
+"logs": 10
+},
+"publish": false
+}
+```
+
+### Getting an action URL
+
+An action can be invoked through the REST interface via an HTTPS request. To 
get an action URL, execute the following command:
+
+```
+wsk action get actionName --url
+```
+```
+ok: got action actionName
+https://${APIHOST}/api/v1/namespaces/${NAMESPACE}/actions/actionName
+```
+
+**Note:** Authentication must be provided when invoking an action via an HTTPS 
request. For more information regarding
+action invocations using the REST interface, see
+[Using REST APIs with OpenWhisk](rest_api.md#actions).
+
+### Saving action code
+
+Code associated with an existing action is fetched and saved locally. Saving 
is performed on all actions except sequences and docker actions. When saving 
action code to a file, the code is saved in the current working directory, and 
the saved file path is displayed.
 
 Review comment:
   @rabbah, a destination can only be provided using the `--save-as` 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] dubee commented on a change in pull request #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
dubee commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175865776
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -1219,6 +1184,71 @@ This command starts a polling loop that continuously 
checks for logs from activa
 
   Similarly, whenever you run the poll utility, you see in real time the logs 
for any actions running on your behalf in OpenWhisk.
 
+## Getting actions
+
+Metadata that describes existing actions can be retrieved via the `wsk action 
get` command.
+
+```
+wsk action get hello
+ok: got action hello
+{
+"namespace": "u...@email.com",
+"name": "hello",
+"version": "0.0.1",
+"exec": {
+"kind": "nodejs:6",
+"binary": false
+},
+"annotations": [
+{
+"key": "exec",
+"value": "nodejs:6"
+}
+],
+"limits": {
+"timeout": 6,
+"memory": 256,
+"logs": 10
+},
+"publish": false
+}
+```
+
+### Getting an action URL
+
+An action can be invoked through the REST interface via an HTTPS request. To 
get an action URL, execute the following command:
+
+```
+wsk action get actionName --url
+```
+```
+ok: got action actionName
+https://${APIHOST}/api/v1/namespaces/${NAMESPACE}/actions/actionName
+```
+
+**Note:** Authentication must be provided when invoking an action via an HTTPS 
request. For more information regarding
 
 Review comment:
   Hmm, I don't think we need a caveat here. There is an example in the web 
actions doc on how to use the `--url` flag. Also this doc says `action` not 
`web action`.


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


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
dubee commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175865776
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -1219,6 +1184,71 @@ This command starts a polling loop that continuously 
checks for logs from activa
 
   Similarly, whenever you run the poll utility, you see in real time the logs 
for any actions running on your behalf in OpenWhisk.
 
+## Getting actions
+
+Metadata that describes existing actions can be retrieved via the `wsk action 
get` command.
+
+```
+wsk action get hello
+ok: got action hello
+{
+"namespace": "u...@email.com",
+"name": "hello",
+"version": "0.0.1",
+"exec": {
+"kind": "nodejs:6",
+"binary": false
+},
+"annotations": [
+{
+"key": "exec",
+"value": "nodejs:6"
+}
+],
+"limits": {
+"timeout": 6,
+"memory": 256,
+"logs": 10
+},
+"publish": false
+}
+```
+
+### Getting an action URL
+
+An action can be invoked through the REST interface via an HTTPS request. To 
get an action URL, execute the following command:
+
+```
+wsk action get actionName --url
+```
+```
+ok: got action actionName
+https://${APIHOST}/api/v1/namespaces/${NAMESPACE}/actions/actionName
+```
+
+**Note:** Authentication must be provided when invoking an action via an HTTPS 
request. For more information regarding
 
 Review comment:
   Hmm, I don't think we need a caveat here. There is an example in the web 
actions doc on how to use the `--url` flag. Also the doc says `action` not `web 
action`.


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


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #244: Add --web-secure option to action create/update

2018-03-20 Thread GitBox
dubee commented on a change in pull request #244: Add --web-secure option to 
action create/update
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/244#discussion_r175850403
 
 

 ##
 File path: tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala
 ##
 @@ -48,8 +48,8 @@ import JsonArgsForTests._
 import whisk.http.Messages
 
 /**
- * Tests for basic CLI usage. Some of these tests require a deployed backend.
- */
+  * Tests for basic CLI usage. Some of these tests require a deployed backend.
 
 Review comment:
   Are these mostly formatting changes? Hard to tell.


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


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #244: Add --web-secure option to action create/update

2018-03-20 Thread GitBox
dubee commented on a change in pull request #244: Add --web-secure option to 
action create/update
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/244#discussion_r175849808
 
 

 ##
 File path: commands/action.go
 ##
 @@ -442,14 +457,109 @@ func parseAction(cmd *cobra.Command, args []string, 
update bool) (*whisk.Action,
return nil, noArtifactError()
}
 
+   whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
+   return action, err
+}
+
+func augmentAction(cmd *cobra.Command, args []string, action *whisk.Action, 
update bool) (*whisk.Action, error) {
+   var err error
+   var existingAction *whisk.Action = nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
+
+   if update {
+   if existingAction, _, err = Client.Actions.Get(action.Name, 
DO_NOT_FETCH_CODE); err != nil {
+   whiskErr, isWhiskError := err.(*whisk.WskError)
+
+   if (isWhiskError && whiskErr.ExitCode != 
whisk.EXIT_CODE_NOT_FOUND) || !isWhiskError {
+   return nil, actionGetError(action.Name, 
DO_NOT_FETCH_CODE, err)
+   }
+   }
+   }
+
+   // Augment the action's annotations with the --web related annotations
+   // FIXME MWD - avoid retrieving existing action TWICE!  once above and 
once in the webAction() below
+   if augmentedAction, err = augmentWebArg(cmd, args, augmentedAction, 
existingAction); err != nil {
+   return nil, err
+   }
+
+   // Augment the action's annotations with the --web-secure related 
annotations
+   if augmentedAction, err = augmentWebSecureArg(cmd, args, action, 
augmentedAction, existingAction); err != nil {
+   return nil, err
+   }
+
+   whisk.Debug(whisk.DbgInfo, "Augmented action struct: %#v\n", 
augmentedAction)
+   return augmentedAction, err
+}
+
+func augmentWebArg(cmd *cobra.Command, args []string, action *whisk.Action, 
existingAction *whisk.Action) (*whisk.Action, error) {
+   var err error
+   preserveAnnotations := action.Annotations == nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
+
if cmd.LocalFlags().Changed(WEB_FLAG) {
-   preserveAnnotations := action.Annotations == nil
-   action.Annotations, err = webAction(Flags.action.web, 
action.Annotations, qualifiedName.GetEntityName(), preserveAnnotations)
+   if existingAction == nil {
+   augmentedAction.Annotations, err = 
webAction(Flags.action.web, action.Annotations, action.Name, 
preserveAnnotations)
+   } else {
+   if augmentedAction.Annotations, err = 
webAction(Flags.action.web, action.Annotations, action.Name, 
preserveAnnotations); err == nil {
+   // Always carry forward any existing 
--web-secure annotation value
+   // Although it can be overwritten if 
--web-secure is set
+   webSecureAnnotations := 
getWebSecureAnnotations(existingAction)
+   if len(webSecureAnnotations) > 0 {
+   augmentedAction.Annotations = 
augmentedAction.Annotations.AppendKeyValueArr(webSecureAnnotations)
+   }
+   }
+   }
+   if err != nil {
+   return nil, err
+   }
}
 
-   whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
+   whisk.Debug(whisk.DbgInfo, "augmentWebArg: Augmented action struct: 
%#v\n", augmentedAction)
+   return augmentedAction, nil
+}
 
-   return action, err
+/*
+ * Return a whisk.Action augmented with --web-secure annotation updates
+ * originalAction:  a action constructed from command line argument
+ * action:  an action constructed from command line args + possible 
other augmentation (i.e. --web annotations)
+ * existingAction:  on an action update, this is the existing action
+ */
+func augmentWebSecureArg(cmd *cobra.Command, args []string, originalAction 
*whisk.Action, action *whisk.Action, existingAction *whisk.Action) 
(*whisk.Action, error) {
 
 Review comment:
   For instance, there should be a sugar flag for `-a web-custom-options 
true|false`, but there would be a lot of boilerplate code just to set that up 
by the looks of it.


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


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #244: Add --web-secure option to action create/update

2018-03-20 Thread GitBox
dubee commented on a change in pull request #244: Add --web-secure option to 
action create/update
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/244#discussion_r175849353
 
 

 ##
 File path: commands/action.go
 ##
 @@ -442,14 +457,109 @@ func parseAction(cmd *cobra.Command, args []string, 
update bool) (*whisk.Action,
return nil, noArtifactError()
}
 
+   whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
+   return action, err
+}
+
+func augmentAction(cmd *cobra.Command, args []string, action *whisk.Action, 
update bool) (*whisk.Action, error) {
+   var err error
+   var existingAction *whisk.Action = nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
+
+   if update {
+   if existingAction, _, err = Client.Actions.Get(action.Name, 
DO_NOT_FETCH_CODE); err != nil {
+   whiskErr, isWhiskError := err.(*whisk.WskError)
+
+   if (isWhiskError && whiskErr.ExitCode != 
whisk.EXIT_CODE_NOT_FOUND) || !isWhiskError {
+   return nil, actionGetError(action.Name, 
DO_NOT_FETCH_CODE, err)
+   }
+   }
+   }
+
+   // Augment the action's annotations with the --web related annotations
+   // FIXME MWD - avoid retrieving existing action TWICE!  once above and 
once in the webAction() below
+   if augmentedAction, err = augmentWebArg(cmd, args, augmentedAction, 
existingAction); err != nil {
+   return nil, err
+   }
+
+   // Augment the action's annotations with the --web-secure related 
annotations
+   if augmentedAction, err = augmentWebSecureArg(cmd, args, action, 
augmentedAction, existingAction); err != nil {
+   return nil, err
+   }
+
+   whisk.Debug(whisk.DbgInfo, "Augmented action struct: %#v\n", 
augmentedAction)
+   return augmentedAction, err
+}
+
+func augmentWebArg(cmd *cobra.Command, args []string, action *whisk.Action, 
existingAction *whisk.Action) (*whisk.Action, error) {
+   var err error
+   preserveAnnotations := action.Annotations == nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
+
if cmd.LocalFlags().Changed(WEB_FLAG) {
-   preserveAnnotations := action.Annotations == nil
-   action.Annotations, err = webAction(Flags.action.web, 
action.Annotations, qualifiedName.GetEntityName(), preserveAnnotations)
+   if existingAction == nil {
+   augmentedAction.Annotations, err = 
webAction(Flags.action.web, action.Annotations, action.Name, 
preserveAnnotations)
+   } else {
+   if augmentedAction.Annotations, err = 
webAction(Flags.action.web, action.Annotations, action.Name, 
preserveAnnotations); err == nil {
+   // Always carry forward any existing 
--web-secure annotation value
+   // Although it can be overwritten if 
--web-secure is set
+   webSecureAnnotations := 
getWebSecureAnnotations(existingAction)
+   if len(webSecureAnnotations) > 0 {
+   augmentedAction.Annotations = 
augmentedAction.Annotations.AppendKeyValueArr(webSecureAnnotations)
+   }
+   }
+   }
+   if err != nil {
+   return nil, err
+   }
}
 
-   whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
+   whisk.Debug(whisk.DbgInfo, "augmentWebArg: Augmented action struct: 
%#v\n", augmentedAction)
+   return augmentedAction, nil
+}
 
-   return action, err
+/*
+ * Return a whisk.Action augmented with --web-secure annotation updates
+ * originalAction:  a action constructed from command line argument
+ * action:  an action constructed from command line args + possible 
other augmentation (i.e. --web annotations)
+ * existingAction:  on an action update, this is the existing action
+ */
+func augmentWebSecureArg(cmd *cobra.Command, args []string, originalAction 
*whisk.Action, action *whisk.Action, existingAction *whisk.Action) 
(*whisk.Action, error) {
 
 Review comment:
   Seems like adding even more flags that are sugar for annotations would not 
be very easy to do with this method.


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


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #244: Add --web-secure option to action create/update

2018-03-20 Thread GitBox
dubee commented on a change in pull request #244: Add --web-secure option to 
action create/update
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/244#discussion_r175841358
 
 

 ##
 File path: commands/action.go
 ##
 @@ -442,14 +457,109 @@ func parseAction(cmd *cobra.Command, args []string, 
update bool) (*whisk.Action,
return nil, noArtifactError()
}
 
+   whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
+   return action, err
+}
+
+func augmentAction(cmd *cobra.Command, args []string, action *whisk.Action, 
update bool) (*whisk.Action, error) {
+   var err error
+   var existingAction *whisk.Action = nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
 
 Review comment:
   Hard to follow the code with all of the copies of the same action.


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


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #244: Add --web-secure option to action create/update

2018-03-20 Thread GitBox
dubee commented on a change in pull request #244: Add --web-secure option to 
action create/update
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/244#discussion_r175840729
 
 

 ##
 File path: commands/action.go
 ##
 @@ -442,14 +457,109 @@ func parseAction(cmd *cobra.Command, args []string, 
update bool) (*whisk.Action,
return nil, noArtifactError()
}
 
+   whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
+   return action, err
+}
+
+func augmentAction(cmd *cobra.Command, args []string, action *whisk.Action, 
update bool) (*whisk.Action, error) {
+   var err error
+   var existingAction *whisk.Action = nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
+
+   if update {
+   if existingAction, _, err = Client.Actions.Get(action.Name, 
DO_NOT_FETCH_CODE); err != nil {
+   whiskErr, isWhiskError := err.(*whisk.WskError)
+
+   if (isWhiskError && whiskErr.ExitCode != 
whisk.EXIT_CODE_NOT_FOUND) || !isWhiskError {
+   return nil, actionGetError(action.Name, 
DO_NOT_FETCH_CODE, err)
+   }
+   }
+   }
+
+   // Augment the action's annotations with the --web related annotations
+   // FIXME MWD - avoid retrieving existing action TWICE!  once above and 
once in the webAction() below
+   if augmentedAction, err = augmentWebArg(cmd, args, augmentedAction, 
existingAction); err != nil {
+   return nil, err
+   }
+
+   // Augment the action's annotations with the --web-secure related 
annotations
+   if augmentedAction, err = augmentWebSecureArg(cmd, args, action, 
augmentedAction, existingAction); err != nil {
+   return nil, err
+   }
+
+   whisk.Debug(whisk.DbgInfo, "Augmented action struct: %#v\n", 
augmentedAction)
+   return augmentedAction, err
+}
+
+func augmentWebArg(cmd *cobra.Command, args []string, action *whisk.Action, 
existingAction *whisk.Action) (*whisk.Action, error) {
+   var err error
+   preserveAnnotations := action.Annotations == nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
 
 Review comment:
   Can't we just modify `action` instead of creating a copy of it?


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


With regards,
Apache Git Services


[GitHub] dubee commented on a change in pull request #244: Add --web-secure option to action create/update

2018-03-20 Thread GitBox
dubee commented on a change in pull request #244: Add --web-secure option to 
action create/update
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/244#discussion_r175848990
 
 

 ##
 File path: commands/action.go
 ##
 @@ -442,14 +457,109 @@ func parseAction(cmd *cobra.Command, args []string, 
update bool) (*whisk.Action,
return nil, noArtifactError()
}
 
+   whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
+   return action, err
+}
+
+func augmentAction(cmd *cobra.Command, args []string, action *whisk.Action, 
update bool) (*whisk.Action, error) {
+   var err error
+   var existingAction *whisk.Action = nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
+
+   if update {
+   if existingAction, _, err = Client.Actions.Get(action.Name, 
DO_NOT_FETCH_CODE); err != nil {
+   whiskErr, isWhiskError := err.(*whisk.WskError)
+
+   if (isWhiskError && whiskErr.ExitCode != 
whisk.EXIT_CODE_NOT_FOUND) || !isWhiskError {
+   return nil, actionGetError(action.Name, 
DO_NOT_FETCH_CODE, err)
+   }
+   }
+   }
+
+   // Augment the action's annotations with the --web related annotations
+   // FIXME MWD - avoid retrieving existing action TWICE!  once above and 
once in the webAction() below
+   if augmentedAction, err = augmentWebArg(cmd, args, augmentedAction, 
existingAction); err != nil {
+   return nil, err
+   }
+
+   // Augment the action's annotations with the --web-secure related 
annotations
+   if augmentedAction, err = augmentWebSecureArg(cmd, args, action, 
augmentedAction, existingAction); err != nil {
+   return nil, err
+   }
+
+   whisk.Debug(whisk.DbgInfo, "Augmented action struct: %#v\n", 
augmentedAction)
+   return augmentedAction, err
+}
+
+func augmentWebArg(cmd *cobra.Command, args []string, action *whisk.Action, 
existingAction *whisk.Action) (*whisk.Action, error) {
+   var err error
+   preserveAnnotations := action.Annotations == nil
+   var augmentedAction *whisk.Action = new(whisk.Action)
+   *augmentedAction = *action
+
if cmd.LocalFlags().Changed(WEB_FLAG) {
-   preserveAnnotations := action.Annotations == nil
-   action.Annotations, err = webAction(Flags.action.web, 
action.Annotations, qualifiedName.GetEntityName(), preserveAnnotations)
+   if existingAction == nil {
+   augmentedAction.Annotations, err = 
webAction(Flags.action.web, action.Annotations, action.Name, 
preserveAnnotations)
 
 Review comment:
   If `preserveAnnotations` is true, pass in the action we already retrieved to 
`webAction()` to avoid fetching it again in there.


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


With regards,
Apache Git Services


[GitHub] tz70s opened a new pull request #3469: Ensure clean up testspace under wskadmin test.

2018-03-20 Thread GitBox
tz70s opened a new pull request #3469: Ensure clean up testspace under wskadmin 
test.
URL: https://github.com/apache/incubator-openwhisk/pull/3469
 
 
   Fix up testsuite `block and unblock a user respectively` fails when
   `testspace` contains pre-existing users.
   
   Signed-off-by: Tzu-Chiao Yeh 
   
   
   
   
   ## Description
   
   The change clean up **all** users under namespace `testspace`, `testspace1` 
and `testspace2`.
   Also, with some small changes due to running `Scalariform` format.
   
   To reproduce this, create a pre-existed user under `testspace`.
   ```bash
   ./bin/wskadmin user create test-123 -ns testspace
   ```
   The test should now be passed.
   
   
   
   ## Related issue and scope
   
   - [ ] I opened an issue to propose and discuss this change (#)
   - [ ] Reference issue #3137 
   
   ## My changes affect the following components
   
   
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [x] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   
   - [x] Bug fix (generally a non-breaking change which closes an issue).
   - [ ] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing 
behavior).
   
   ## Checklist:
   
   
   - [x] I signed an [Apache 
CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [x] I reviewed the [style 
guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness)
 and followed the recommendations (Travis CI will check :).
   - [ ] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.


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


With regards,
Apache Git Services


[GitHub] mdeuser commented on a change in pull request #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
mdeuser commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175824240
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -31,6 +31,7 @@ Learn how to create, invoke, and debug actions in your 
preferred development env
 In addition, learn about:
 
 * [Watching action output](#watching-action-output)
+* [Getting actions](#getting-actions)
 
 Review comment:
   oh.. maybe move `Accessing action metadata within the action body` 
underneath this `Getting Actions` section since it's all related to action 
retrieval.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
mdeuser commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175823953
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -31,6 +31,7 @@ Learn how to create, invoke, and debug actions in your 
preferred development env
 In addition, learn about:
 
 * [Watching action output](#watching-action-output)
+* [Getting actions](#getting-actions)
 
 Review comment:
   ok. makes sense.


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


With regards,
Apache Git Services


[GitHub] chetanmeh commented on issue #3412: Changes to runtimes variables in support of retiring 'whisk/*' runtimes

2018-03-20 Thread GitBox
chetanmeh commented on issue #3412: Changes to runtimes variables in support of 
retiring 'whisk/*' runtimes
URL: 
https://github.com/apache/incubator-openwhisk/pull/3412#issuecomment-374636516
 
 
   >  Ideally in this scenery, one would use ‘shell:’ to invoke an entry point 
in the invoker jar to dump the JSON to stdout.
   
   Makes sense. We can add a utility main class in common to dump the config. 
And in ansible just invoke
   
   ```
   java -cp typesafe-config.jar:openwhisk-common.jar whisk.utils.ConfigDumper 
/path/to/output.json
   ```


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


With regards,
Apache Git Services


[GitHub] jonpspri commented on issue #3412: Changes to runtimes variables in support of retiring 'whisk/*' runtimes

2018-03-20 Thread GitBox
jonpspri commented on issue #3412: Changes to runtimes variables in support of 
retiring 'whisk/*' runtimes
URL: 
https://github.com/apache/incubator-openwhisk/pull/3412#issuecomment-374627781
 
 
   I was thinking about something along @chetanmeh ‘s way of thinking.  
Although I’d rather go the other way... a JSON or YAML config file that is used 
for configuration of the scala code.  Then we’re less likely to run into 
synchronization problems and edits/overrides are understood.  I expect that’s a 
non-starter from an effort standpoint.
   
   Can we leave gradle out of this solution?  Ideally in this scenery, one 
would use ‘shell:’ to invoke an entry point in the invoker jar to dump the JSON 
to stdout.  That way we avoid all sorts of build out-of-sync issues.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #3435: CLI docs update and markdown linting.

2018-03-20 Thread GitBox
rabbah commented on a change in pull request #3435: CLI docs update and 
markdown linting.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3435#discussion_r175794906
 
 

 ##
 File path: ansible/README.md
 ##
 @@ -172,24 +172,44 @@ Use `ansible-playbook -i environments/ 
openwhisk.yml` to avoid wipi
 ### Configuring the installation of `wsk` CLI
 There are two installation modes to install `wsk` CLI: remote and local.
 
-The mode "remote" means to download the `wsk` binaries from available web 
links. By default, OpenWhisk sets
-the installation mode to remote and downloads the binaries from the CLI 
[release page](https://github.com/apache/incubator-openwhisk-cli/releases), 
where OpenWhisk publishes the official `wsk` binaries.
+The mode "remote" means to download the `wsk` binaries from available web 
links.
+By default, OpenWhisk sets the installation mode to remote and downloads the
+binaries from the CLI
+[release page](https://github.com/apache/incubator-openwhisk-cli/releases),
+where OpenWhisk publishes the official `wsk` binaries.
 
-The mode "local" means to build and install the `wsk` binaries from local CLI 
project. You can download the source code
-of OpenWhisk CLI via [this 
link](https://github.com/apache/incubator-openwhisk-cli). Let's assume your 
OpenWhisk CLI home directory is . After you download the 
source code, use the gradle command to build the binaries:
+The mode "local" means to build and install the `wsk` binaries from local CLI
 
 Review comment:
   hehe I approved nonetheless and ready to 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] jonpspri commented on a change in pull request #3435: CLI docs update and markdown linting.

2018-03-20 Thread GitBox
jonpspri commented on a change in pull request #3435: CLI docs update and 
markdown linting.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3435#discussion_r175794097
 
 

 ##
 File path: ansible/README.md
 ##
 @@ -172,24 +172,44 @@ Use `ansible-playbook -i environments/ 
openwhisk.yml` to avoid wipi
 ### Configuring the installation of `wsk` CLI
 There are two installation modes to install `wsk` CLI: remote and local.
 
-The mode "remote" means to download the `wsk` binaries from available web 
links. By default, OpenWhisk sets
-the installation mode to remote and downloads the binaries from the CLI 
[release page](https://github.com/apache/incubator-openwhisk-cli/releases), 
where OpenWhisk publishes the official `wsk` binaries.
+The mode "remote" means to download the `wsk` binaries from available web 
links.
+By default, OpenWhisk sets the installation mode to remote and downloads the
+binaries from the CLI
+[release page](https://github.com/apache/incubator-openwhisk-cli/releases),
+where OpenWhisk publishes the official `wsk` binaries.
 
-The mode "local" means to build and install the `wsk` binaries from local CLI 
project. You can download the source code
-of OpenWhisk CLI via [this 
link](https://github.com/apache/incubator-openwhisk-cli). Let's assume your 
OpenWhisk CLI home directory is . After you download the 
source code, use the gradle command to build the binaries:
+The mode "local" means to build and install the `wsk` binaries from local CLI
 
 Review comment:
   Jeez.  It wasn’t even my typo — I just added a line feed.  Will attempt to 
correct, though.


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


With regards,
Apache Git Services


[GitHub] jonpspri commented on issue #3467: Remove actionControllers tests from incubator-openwhisk repo

2018-03-20 Thread GitBox
jonpspri commented on issue #3467: Remove actionControllers tests from 
incubator-openwhisk repo
URL: 
https://github.com/apache/incubator-openwhisk/pull/3467#issuecomment-374624880
 
 
   Maybe it can be, but should we move it into a different namespace from the 
runtime-specific code (maybe also out of the tests directory since it will at 
that point be more of a library)? That would reduce the likelihood of 
collisions and make it clear when a given runtime has migrated to the new 
paradigm (whatever that may be).


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


With regards,
Apache Git Services


[GitHub] tz70s opened a new issue #3468: Docker daemon error under ubuntu xenial

2018-03-20 Thread GitBox
tz70s opened a new issue #3468: Docker daemon error under ubuntu xenial
URL: https://github.com/apache/incubator-openwhisk/issues/3468
 
 
   
   
   ## Environment details:
   
   Local deployment under ubuntu xenial.
   
   ## Steps to reproduce the issue:
   
   ```bash
   # Equivalent steps in tools/ubuntu-setup/docker-xenial.sh
   sudo -E bash -c 'echo '\''DOCKER_OPTS="-H tcp://0.0.0.0:4243 -H 
unix:///var/run/docker.sock --storage-driver=aufs"'\'' >> /etc/default/docker'
   sudo gpasswd -a "$(whoami)" docker
   sudo -E bash -c 'echo '\''export DOCKER_HOST="tcp://0.0.0.0:4243"'\'' >> 
/etc/bash.bashrc'
   sudo service docker restart
   
   docker ps
   ```
   
   ## Provide the expected results and outputs:
   
   Normal `docker ps` output.
   
   ## Provide the actual results and outputs:
   
   ```bash
   Cannot connect to the Docker daemon at tcp://0.0.0.0:4243. Is the docker 
daemon running?
   ```
   
   ## Additional information you deem important:
   
   I've got fixed under this 
[solution](https://stackoverflow.com/questions/44678725/cannot-connect-to-the-docker-daemon-at-unix-var-run-docker-sock-is-the-docker).
   
   Therefore, it _might_ need to rewrite some steps in the installation under 
ubuntu xenial. Related #708 may be required to fix together. Further more, it's 
better communicate under secure port 2376.
   
   Additional ask, is there any reason to use `aufs` storage-driver instead of 
`overlay2`? 


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


With regards,
Apache Git Services


[GitHub] dgrove-oss commented on issue #3412: Changes to runtimes variables in support of retiring 'whisk/*' runtimes

2018-03-20 Thread GitBox
dgrove-oss commented on issue #3412: Changes to runtimes variables in support 
of retiring 'whisk/*' runtimes
URL: 
https://github.com/apache/incubator-openwhisk/pull/3412#issuecomment-374607395
 
 
   I'd like to have just one place to get these defaults.  I like @chetanmeh's 
suggestion of parsing application.conf into ansible so we could make 
application.conf available to the non-Scala parts of the system. 
   @markusthoemmes any thoughts?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #3467: Remove actionControllers tests from incubator-openwhisk repo

2018-03-20 Thread GitBox
rabbah commented on issue #3467: Remove actionControllers tests from 
incubator-openwhisk repo
URL: 
https://github.com/apache/incubator-openwhisk/pull/3467#issuecomment-374605804
 
 
   We will need to designate a single place as the canonical root for the 
common code. Maybe it can still be this repo. 


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


With regards,
Apache Git Services


[GitHub] jonpspri opened a new pull request #3467: Remove actionControllers tests from incubator-openwhisk repo

2018-03-20 Thread GitBox
jonpspri opened a new pull request #3467: Remove actionControllers tests from 
incubator-openwhisk repo
URL: https://github.com/apache/incubator-openwhisk/pull/3467
 
 
   ## Description
   
   When the various action controllers were spun out into their own 
repositories, they took their test suites with them.  However, the original 
source code for the test suites was left in `incubator-openwhisk` .  That was 
fine until we started compiling JAR files to support testing and leaving them 
in local maven.  Now the JAR files including the actionController tests can 
create classpath conflicts with the test being compiled from the individual 
runtimes, challenging the validity of the tests.
   
   This PR deletes the not-canonical versions of the tests from 
incubator-runtime.  There are certain utility classes that are duplicated among 
the runtime repos that should maybe eventually be factored further into an SDK, 
but for the moment simplicity in the test process is needed to ensure test 
validity.
   
   ## Related issue and scope
   
   - [ ] I opened an issue to propose and discuss this change (#)
   
   ## My changes affect the following components
   
   
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [X] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   
   - [X] Bug fix (generally a non-breaking change which closes an issue).
   - [ ] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing 
behavior).
   
   ## Checklist:
   
   
   - [X] I signed an [Apache 
CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [X] I reviewed the [style 
guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness)
 and followed the recommendations (Travis CI will check :).
   - [ ] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   


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


With regards,
Apache Git Services


[GitHub] jonpspri commented on issue #24: Make AdoptOpenJDK Eclipse OpenJ9 the Java runtime for Java actions

2018-03-20 Thread GitBox
jonpspri commented on issue #24: Make AdoptOpenJDK Eclipse OpenJ9 the Java 
runtime for Java actions
URL: 
https://github.com/apache/incubator-openwhisk-runtime-java/pull/24#issuecomment-374599948
 
 
   @Param-S The same unicode test case as above.  Hold tight — I seem to have 
some classpath issues and may not be running the correct test issues.  Will be 
filing a PR over in `incubator-openwhisk` about that shortly.


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


With regards,
Apache Git Services


[GitHub] chetanmeh commented on issue #3453: Introduce a AttachmentStore SPI

2018-03-20 Thread GitBox
chetanmeh commented on issue #3453: Introduce a AttachmentStore SPI
URL: 
https://github.com/apache/incubator-openwhisk/pull/3453#issuecomment-374598806
 
 
   >  dont follow the need for the volatile attachments.
   
   The updates to state are performed via stream stage and hence is single 
threaded. However reads can happen concurrently in other threads so the 
reference to map is marked as `var` and `volatile`


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


With regards,
Apache Git Services


[GitHub] chetanmeh commented on a change in pull request #3453: Introduce a AttachmentStore SPI

2018-03-20 Thread GitBox
chetanmeh commented on a change in pull request #3453: Introduce a 
AttachmentStore SPI
URL: 
https://github.com/apache/incubator-openwhisk/pull/3453#discussion_r175763836
 
 

 ##
 File path: 
common/scala/src/main/scala/whisk/core/database/AttachmentStore.scala
 ##
 @@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package whisk.core.database
+
+import akka.http.scaladsl.model.ContentType
+import akka.stream.scaladsl.{Sink, Source}
+import akka.util.ByteString
+import whisk.common.TransactionId
+import whisk.core.entity.DocInfo
+
+import scala.concurrent.{ExecutionContext, Future}
+
+trait AttachmentStore {
+
+  /** Execution context for futures */
+  protected[core] implicit val executionContext: ExecutionContext
+
+  /**
+   * Attaches a "file" of type `contentType` to an existing document. The 
revision for the document must be set.
+   */
+  protected[core] def attach(doc: DocInfo, name: String, contentType: 
ContentType, docStream: Source[ByteString, _])(
+implicit transid: TransactionId): Future[DocInfo]
+
+  /**
+   * Retrieves a saved attachment, streaming it into the provided Sink.
+   */
+  protected[core] def readAttachment[T](doc: DocInfo, name: String, sink: 
Sink[ByteString, Future[T]])(
+implicit transid: TransactionId): Future[(ContentType, T)]
+
+  /**
+   * Deletes all attachments linked to given document
+   */
+  protected[core] def deleteAttachments(doc: DocInfo)(implicit transid: 
TransactionId): Future[Boolean]
 
 Review comment:
   Can be done ... currently its named as per method introduced with 
apache/incubator-openwhisk#3366. `deleteAttachments` conveys the intention 
clearly while detach is bit cryptic i.e. it may be interpreted as  that 
attachment still exist just link with main document broken 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 pull request #34: Remove swift:4.0, only swift:4.1

2018-03-20 Thread GitBox
csantanapr opened a new pull request #34: Remove swift:4.0, only swift:4.1
URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/34
 
 
   Remove swift:4.0 as swift:4.1 is the only right now being used.


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


With regards,
Apache Git Services


[GitHub] tz70s opened a new pull request #3466: Support alternative path for python in whiskprops

2018-03-20 Thread GitBox
tz70s opened a new pull request #3466: Support alternative path for python in 
whiskprops
URL: https://github.com/apache/incubator-openwhisk/pull/3466
 
 
   By default, the path of python2.7 is located at `/usr/bin/`
   instead of `/usr/local/bin/`. Since folks may desire to use homebrew
   installation and the path _might_ be relocated at `/usr/local/bin/`. Support 
path
   from `/usr/bin` both is better to avoid python3 override the default
   `python` without any penalty.
   
   Signed-off-by: Tzu-Chiao Yeh 
   
   
   
   
   ## Description
   
   
   
   ## Related issue and scope
   
   - [ ] I opened an issue to propose and discuss this change (#)
   
   Not sure the small change is needed to open an additional issue? Didn't find 
similar issue, though.
   
   ## My changes affect the following components
   
   
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [ ] Loadbalancer
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [x] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   
   - [ ] Bug fix (generally a non-breaking change which closes an issue).
   - [x] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing 
behavior).
   
   ## Checklist:
   
   
   - [x] I signed an [Apache 
CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [x] I reviewed the [style 
guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness)
 and followed the recommendations (Travis CI will check :).
   - [ ] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.
   
   


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


With regards,
Apache Git Services


[GitHub] jonpspri commented on issue #3412: Changes to runtimes variables in support of retiring 'whisk/*' runtimes

2018-03-20 Thread GitBox
jonpspri commented on issue #3412: Changes to runtimes variables in support of 
retiring 'whisk/*' runtimes
URL: 
https://github.com/apache/incubator-openwhisk/pull/3412#issuecomment-374580802
 
 
   Hi @dgrove-oss, I missed that memo, so forgive me if I’m catching up.  
Currently there’s logic in the ansible deploy that pre-fetches the images 
listed in ‘runtime_manifest.json’ and therefore needs to know the defaults as 
defined in application.conf.  Unfortunately, ansible doesn’t natively support 
parsing application.conf (one of several reasons I dislike the pure config 
approach).  For the time being, that means I do have to keep that separate list 
of overrides in group_vars/all.  Ideally, I’d want to do away with the 
pre-loading because Controller/Invoker were smart enough to initialize their 
own runtimes space, but I don’t think we’re there yet.


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


With regards,
Apache Git Services


[GitHub] jonpspri commented on issue #3457: Ansible 2.4 deprecates ‘include’ in favor of ‘import_*’ and ‘include_tasks’

2018-03-20 Thread GitBox
jonpspri commented on issue #3457: Ansible 2.4 deprecates ‘include’ in favor of 
‘import_*’ and ‘include_tasks’
URL: 
https://github.com/apache/incubator-openwhisk/pull/3457#issuecomment-374578440
 
 
   Agreed re PG.  WIll do it with @csantanapr later today.


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


With regards,
Apache Git Services


[GitHub] dgrove-oss commented on issue #3412: Changes to runtimes variables in support of retiring 'whisk/*' runtimes

2018-03-20 Thread GitBox
dgrove-oss commented on issue #3412: Changes to runtimes variables in support 
of retiring 'whisk/*' runtimes
URL: 
https://github.com/apache/incubator-openwhisk/pull/3412#issuecomment-374577087
 
 
   I thought we decided to move the misc defaults to pureconfig 
(https://github.com/apache/incubator-openwhisk/blob/8fb3a6fda1700b8cde1de300492b1461a176df15/common/scala/src/main/resources/application.conf#L131-#L137)
 and removed them from ansible.  Why do they need to move back to ansible? (we 
don't use ansible to deploy on kube, which was why moving the defaults out of 
ansible was desirable)
   


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


With regards,
Apache Git Services


[GitHub] dgrove-oss commented on issue #3412: Changes to runtimes variables in support of retiring 'whisk/*' runtimes

2018-03-20 Thread GitBox
dgrove-oss commented on issue #3412: Changes to runtimes variables in support 
of retiring 'whisk/*' runtimes
URL: 
https://github.com/apache/incubator-openwhisk/pull/3412#issuecomment-374577087
 
 
   I thought we decided to move the misc defaults to pureconfig 
(https://github.com/apache/incubator-openwhisk/blob/8fb3a6fda1700b8cde1de300492b1461a176df15/common/scala/src/main/resources/application.conf#L131-#L137)
 and removed them from ansible.  Why do they need to move back to ansible (we 
don't use ansible to deploy on kube, which was why moving the defaults out of 
ansible was desirable).
   


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


With regards,
Apache Git Services


[GitHub] dgrove-oss commented on issue #3412: Changes to runtimes variables in support of retiring 'whisk/*' runtimes

2018-03-20 Thread GitBox
dgrove-oss commented on issue #3412: Changes to runtimes variables in support 
of retiring 'whisk/*' runtimes
URL: 
https://github.com/apache/incubator-openwhisk/pull/3412#issuecomment-374577087
 
 
   I thought we decided to move the misc defaults to pureconfig 
(https://github.com/apache/incubator-openwhisk/blob/8fb3a6fda1700b8cde1de300492b1461a176df15/common/scala/src/main/resources/application.conf#L131-#L137)
 and removed them from ansible.  Why do they need to move back to ansible (we 
don't use ansible to deploy on kube, which was why moving the defaults out of 
ansible was desirable)?
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #3464: Add wsk action get to CLI docs

2018-03-20 Thread GitBox
mdeuser commented on a change in pull request #3464: Add wsk action get to CLI 
docs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3464#discussion_r175737539
 
 

 ##
 File path: docs/actions.md
 ##
 @@ -1219,6 +1184,71 @@ This command starts a polling loop that continuously 
checks for logs from activa
 
   Similarly, whenever you run the poll utility, you see in real time the logs 
for any actions running on your behalf in OpenWhisk.
 
+## Getting actions
+
+Metadata that describes existing actions can be retrieved via the `wsk action 
get` command.
+
+```
+wsk action get hello
+ok: got action hello
+{
+"namespace": "u...@email.com",
+"name": "hello",
+"version": "0.0.1",
+"exec": {
+"kind": "nodejs:6",
+"binary": false
+},
+"annotations": [
+{
+"key": "exec",
+"value": "nodejs:6"
+}
+],
+"limits": {
+"timeout": 6,
+"memory": 256,
+"logs": 10
+},
+"publish": false
+}
+```
+
+### Getting an action URL
+
+An action can be invoked through the REST interface via an HTTPS request. To 
get an action URL, execute the following command:
 
 Review comment:
   @rabbah - the `action get --url` will return the web action (i.e. 
`/api/v1/web`) url for web actions, not the non-web action (i.e. 
`/api/v1/namespaces`) url.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to 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 #3208: Source files for images in docs folder

2018-03-20 Thread GitBox
csantanapr commented on issue #3208: Source files for images in docs folder
URL: 
https://github.com/apache/incubator-openwhisk/issues/3208#issuecomment-374567561
 
 
   @shazron 
   Which open source tools could we use to edit PSD/EPS? 
   I’m +1 with draw.io
   
   


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


With regards,
Apache Git Services


[GitHub] sciabarracom commented on issue #319: plugable model for adding action language support

2018-03-20 Thread GitBox
sciabarracom commented on issue #319: plugable model for adding action language 
support
URL: 
https://github.com/apache/incubator-openwhisk/issues/319#issuecomment-374524170
 
 
   HI Imesh actually the "pluggable" support is already written. It lives in 
sciabarracom/incubator-openwhisk-runtime-go and it is in the process of being 
merged with the new runtime. However I am already working to extend it for 
Swift but it is actually a general implementation of it for arbitrary binaries. 
Once done for swift and go it will be a matter of documenting it.


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


With regards,
Apache Git Services


[GitHub] imesh commented on issue #319: plugable model for adding action language support

2018-03-20 Thread GitBox
imesh commented on issue #319: plugable model for adding action language support
URL: 
https://github.com/apache/incubator-openwhisk/issues/319#issuecomment-374522746
 
 
   Thanks @rabbah for the update and all your help on implementing it!


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


With regards,
Apache Git Services


[GitHub] cbickel commented on a change in pull request #3342: #3168 Rate limit requests to download CLI, Docker and iOS SDKs

2018-03-20 Thread GitBox
cbickel commented on a change in pull request #3342:  #3168 Rate limit requests 
to download CLI, Docker and iOS SDKs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3342#discussion_r175682262
 
 

 ##
 File path: ansible/roles/nginx/templates/nginx.conf.j2
 ##
 @@ -94,18 +97,26 @@ http {
 }
 
 location /blackbox.tar.gz {
+limit_req zone=mylimit burst=20 nodelay;
+
 return 301 
https://github.com/apache/incubator-openwhisk-runtime-docker/releases/download/sdk%400.1.0/blackbox-0.1.0.tar.gz;
 }
 # leaving this for a while for clients out there to update to the new 
endpoint
 location /blackbox-0.1.0.tar.gz {
+limit_req zone=mylimit burst=20 nodelay;
+
 return 301 /blackbox.tar.gz;
 }
 
 location /OpenWhiskIOSStarterApp.zip {
+limit_req zone=mylimit burst=20 nodelay;
 
 Review comment:
   As we only return a 301 to a github address: Do we really need to throttle 
this request (and the others with 301)?


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


With regards,
Apache Git Services


[GitHub] cbickel commented on issue #3342: #3168 Rate limit requests to download CLI, Docker and iOS SDKs

2018-03-20 Thread GitBox
cbickel commented on issue #3342:  #3168 Rate limit requests to download CLI, 
Docker and iOS SDKs
URL: 
https://github.com/apache/incubator-openwhisk/pull/3342#issuecomment-374511609
 
 
   @mptap 
   Thanks a lot for your contribution. I like the idea of limiting the download 
of some attributes, to prevent dos attacks.
   
   But I also have two concerns: 
   - If this nginx is not the front-door, (e.g. Openwhisk is only one of many 
offerings of one company), than the rate limit would apply on the frontdoor in 
front of this nginx, right? Then users may experience issues in downloading the 
CLI, because others do this as well.
   - If a company or university wants to introduce OpenWhisk, the 
students/employees may try to download the CLI at once. In most cases, this is 
one IP as well. Then the first impression for some of them may be a bad 
experience.
   
   A agree, that these two examples are only edge-cases. But I think as this is 
the first experience of a new user, we have to think about it.
   
   One solution to work around this (especially the first problem) may be to 
make the limits configurable (and add the ability to disable them).
   
   Do you think it makes sense to write a short test, to check that the limits 
are really applied? (Also to avoid, that they are not applied at some day 
anymore, because of some configuration changes by other contributors)


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


With regards,
Apache Git Services


[GitHub] cbickel commented on a change in pull request #3451: Fix several loadbalancer bugs.

2018-03-20 Thread GitBox
cbickel commented on a change in pull request #3451: Fix several loadbalancer 
bugs.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3451#discussion_r175671605
 
 

 ##
 File path: 
core/controller/src/main/scala/whisk/core/loadBalancer/ShardingContainerPoolBalancer.scala
 ##
 @@ -247,17 +254,17 @@ class ShardingContainerPoolBalancer(config: WhiskConfig, 
controllerInstance: Ins
 
 activations.remove(aid) match {
   case Some(entry) =>
+totalActivations.decrement()
+activationsPerNamespace.get(entry.namespaceId).foreach(_.decrement())
+schedulingState.invokerSlots.lift(invoker.toInt).foreach(_.release())
 
 Review comment:
   Yes, we wanted to free up the slots earlier to avoid unnecessary overload 
situations under very high load.


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


With regards,
Apache Git Services


[GitHub] cbickel commented on a change in pull request #3451: Fix several loadbalancer bugs.

2018-03-20 Thread GitBox
cbickel commented on a change in pull request #3451: Fix several loadbalancer 
bugs.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3451#discussion_r175671248
 
 

 ##
 File path: 
core/controller/src/main/scala/whisk/core/loadBalancer/ShardingContainerPoolBalancer.scala
 ##
 @@ -71,6 +72,10 @@ class ShardingContainerPoolBalancer(config: WhiskConfig, 
controllerInstance: Ins
   /** State needed for scheduling. */
   private val schedulingState = ShardingContainerPoolBalancerState()()
 
+  actorSystem.scheduler.schedule(0.seconds, 10.seconds) {
 
 Review comment:
   We took the 10 seconds interval by purpose.
   This is a value that changes every few milliseconds (depending how long the 
actions run). By sending several values and taking an average, the value, that 
will be displayed in a Dashboard later is much more accurate than a single 
snapshot which is taken only once a minute.


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


With regards,
Apache Git Services