[GitHub] chetanmeh commented on issue #3306: Script to generate IntelliJ Run Configuration for Controller and Invoker
chetanmeh commented on issue #3306: Script to generate IntelliJ Run Configuration for Controller and Invoker URL: https://github.com/apache/incubator-openwhisk/pull/3306#issuecomment-372904173 @rabbah Can you review this This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] chetanmeh commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping
chetanmeh commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping URL: https://github.com/apache/incubator-openwhisk/issues/3431#issuecomment-372903541 @develpr This may be due to vagrant setup failing in between previously. Vagrant file has instructions to modify the PATH ```bash # Setup OpenWhisk CLI su vagrant -c 'mkdir ${HOME}/bin' su vagrant -c 'ln -s ${OPENWHISK_HOME}/tools/admin/wskadmin ${HOME}/bin/wskadmin' su vagrant -c 'ln -s ${OPENWHISK_HOME}/tools/build/redo ${HOME}/bin/wskdev' echo ${OPENWHISK_HOME}/bin/wsk -i '"$@"' > ${HOME}/bin/wsk chmod +x ${HOME}/bin/wsk chown vagrant:vagrant ${HOME}/bin/wsk PATH=${PATH}:${HOME}/bin ``` Which may have got missed due to previous issues with ansible version causing the script to not complete. May be try rebuilding the vagrant box Also for such setup issues Slack [Slack](https://github.com/apache/incubator-openwhisk#slack) may be faster for you This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on issue #3421: Add ElasticSearch Log Store
dubeejw commented on issue #3421: Add ElasticSearch Log Store URL: https://github.com/apache/incubator-openwhisk/pull/3421#issuecomment-372867292 PG2 2918 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah closed pull request #104: v3.13.0 NPM version bump
rabbah closed pull request #104: v3.13.0 NPM version bump URL: https://github.com/apache/incubator-openwhisk-client-js/pull/104 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/package.json b/package.json index 654f279..af298ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openwhisk", - "version": "3.12.0", + "version": "3.13.0", "description": "JavaScript client library for the OpenWhisk platform", "main": "lib/main.js", "typings": "lib/main.d.ts", This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah closed issue #103: 3.13.0 release
rabbah closed issue #103: 3.13.0 release URL: https://github.com/apache/incubator-openwhisk-client-js/issues/103 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] codecov-io commented on issue #104: v3.13.0 NPM version bump
codecov-io commented on issue #104: v3.13.0 NPM version bump URL: https://github.com/apache/incubator-openwhisk-client-js/pull/104#issuecomment-372890484 # [Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/104?src=pr=h1) Report > Merging [#104](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/104?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-openwhisk-client-js/commit/9dfcd1a9e9eac1f826e2c99721fd28913210743a?src=pr=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/104/graphs/tree.svg?height=150=650=j2mPEx0Tkq=pr)](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/104?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #104 +/- ## === Coverage 99.17% 99.17% === Files 14 14 Lines 364 364 === Hits 361 361 Misses 33 ``` -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/104?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/104?src=pr=footer). Last update [9dfcd1a...5066e00](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/104?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] csantanapr opened a new pull request #104: v3.13.0 NPM version bump
csantanapr opened a new pull request #104: v3.13.0 NPM version bump URL: https://github.com/apache/incubator-openwhisk-client-js/pull/104 Closes #103 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] csantanapr opened a new issue #103: 3.13.0 release
csantanapr opened a new issue #103: 3.13.0 release URL: https://github.com/apache/incubator-openwhisk-client-js/issues/103 Minor release, rather than patch, as #99 is a new feature. ## release notes ### 3.13.0 (2018.03.14) - Adds an optional query parameter for action fetches that determines if action code will be retrieved or not (#99) ## process - `npm version minor` to bump `package.json` to 3.13.0 - Push version commit and git tags to Github - Travis CI will auto-publish new version to NPM - Draft [Github release](https://github.com/apache/incubator-openwhisk-client-js/releases) from tags with notes above. _Need to write up these instructions in the repository._ This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #99: Add Code Query Parameter
csantanapr closed pull request #99: Add Code Query Parameter URL: https://github.com/apache/incubator-openwhisk-client-js/pull/99 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 8d6af41..0009c8e 100644 --- a/README.md +++ b/README.md @@ -249,15 +249,11 @@ ow.packages.get({name: '...'}) ow.feeds.get({name: '...', trigger: '...'}) ``` -The following optional parameters are supported: +The following optional parameters are supported for all resource retrievals: - `namespace` - set custom namespace for endpoint -This method also supports passing the `name` property directly without wrapping within an object. - -```javascript -const name = "actionName" -ow.actions.get(name) -``` +Optional parameters for action resource retrievals are shown below: +- `code` - set to `true` or `false` depending on whether action code should be included or excluded respectively If you pass in an array for the first parameter, the `get` call will be executed for each array item. The function returns a Promise which resolves with the results when all operations have finished. diff --git a/lib/actions.js b/lib/actions.js index 87ca22c..87d190b 100644 --- a/lib/actions.js +++ b/lib/actions.js @@ -21,6 +21,13 @@ class Actions extends Resources { return super.list(options) } + get (options) { +options = options || {} +options.qs = this.qs(options, ['code']) + +return this.operation_with_id('GET', options) + } + invoke (options) { options = options || {} if (options.blocking && options.result) { diff --git a/test/integration/actions.test.js b/test/integration/actions.test.js index d61bd94..86b92f0 100644 --- a/test/integration/actions.test.js +++ b/test/integration/actions.test.js @@ -137,6 +137,38 @@ test('create, get and delete with parameters an action', t => { }).catch(errors) }) +test('get an action with and without its code', t => { + const errors = err => { +console.log(err) +t.fail() + } + + const actions = new Actions(new Client(options)) + return actions.create({actionName: 'random_action_get_test', action: 'function main() {return {payload:"testing"}}'}).then(result => { +t.is(result.name, 'random_action_get_test') +t.is(result.namespace, NAMESPACE) +t.is(result.exec.kind, 'nodejs:6') +t.is(result.exec.code, 'function main() {return {payload:"testing"}}') +return actions.get({actionName: 'random_action_get_test', code: false}).then(action_result => { + t.is(action_result.name, 'random_action_get_test') + t.is(action_result.namespace, NAMESPACE) + t.is(action_result.exec.code, undefined) + return actions.get({actionName: 'random_action_get_test', code: true}).then(action_result => { +t.is(action_result.name, 'random_action_get_test') +t.is(action_result.namespace, NAMESPACE) +t.is(action_result.exec.code, 'function main() {return {payload:"testing"}}') +return actions.get({actionName: 'random_action_get_test'}).then(action_result => { + t.is(action_result.name, 'random_action_get_test') + t.is(action_result.namespace, NAMESPACE) + t.is(action_result.exec.code, 'function main() {return {payload:"testing"}}') + t.pass() + return actions.delete({actionName: 'random_action_get_test'}).catch(errors) +}).catch(errors) + }).catch(errors) +}).catch(errors) + }).catch(errors) +}) + test('invoke action with fully-qualified name', t => { const errors = err => { console.log(err) diff --git a/test/unit/actions.test.js b/test/unit/actions.test.js index fd16af1..1a5ec1c 100644 --- a/test/unit/actions.test.js +++ b/test/unit/actions.test.js @@ -49,6 +49,25 @@ test('should retrieve action from identifier', t => { return actions.get({name: '12345'}) }) + +test('should retrieve action from identifier with code query parameter', t => { + t.plan(3) + const ns = '_' + const client = {} + const actions = new Actions(client) + const code = { +code: false + } + + client.request = (method, path, options) => { +t.is(method, 'GET') +t.is(path, `namespaces/${ns}/actions/12345`) +t.deepEqual(options.qs, code) + } + + return actions.get({name: '12345', code: false}) +}) + test('should retrieve action from string identifier', t => { t.plan(2) const ns = '_' @@ -60,7 +79,7 @@ test('should retrieve action from string identifier', t => { t.is(path, `namespaces/${ns}/actions/12345`) } - return actions.get('12345') + return actions.get({name: '12345'}) }) test('should delete action from identifier', t => { This is an automated message from the Apache Git
[GitHub] csantanapr closed pull request #98: ShortDesc name field is optional
csantanapr closed pull request #98: ShortDesc name field is optional URL: https://github.com/apache/incubator-openwhisk-client-js/pull/98 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/lib/main.d.ts b/lib/main.d.ts index a981ecd..87b86c4 100644 --- a/lib/main.d.ts +++ b/lib/main.d.ts @@ -131,7 +131,7 @@ declare namespace openwhisk { // Descriptions interface ShortDesc { -name: string; +name?: string; annotations?: KeyVal[]; version?: string; } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] csantanapr commented on issue #98: ShortDesc name field is optional
csantanapr commented on issue #98: ShortDesc name field is optional URL: https://github.com/apache/incubator-openwhisk-client-js/pull/98#issuecomment-372887567 rebased. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] csantanapr opened a new issue #3433: Remove all runtimes unit tests
csantanapr opened a new issue #3433: Remove all runtimes unit tests URL: https://github.com/apache/incubator-openwhisk/issues/3433 Runtimes unit tests are already moved to their corresponding repos. Also the CLI have moved to it's own repo. The unit tests under `actionContainers` should be remove. But the common classes should remain as the this core repo serves as a common location for shared test utilities/helpers. cc @rabbah This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pritidesai commented on issue #790: Add support to export binary (zip and jar) actions
pritidesai commented on issue #790: Add support to export binary (zip and jar) actions URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/790#issuecomment-372887027 we have two new IDs in `wski18`, thanks @kpavel This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #790: Add support to export binary (zip and jar) actions
pritidesai commented on issue #790: Add support to export binary (zip and jar) actions URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/790#issuecomment-372887027 we have two new IDs in `wski18` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] codecov-io commented on issue #98: ShortDesc name field is optional
codecov-io commented on issue #98: ShortDesc name field is optional URL: https://github.com/apache/incubator-openwhisk-client-js/pull/98#issuecomment-372886770 # [Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/98?src=pr=h1) Report > Merging [#98](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/98?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-openwhisk-client-js/commit/80075e32cb4abc85dd1e655d2ffebd292c8877b8?src=pr=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/98/graphs/tree.svg?width=650=150=pr=j2mPEx0Tkq)](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/98?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #98 +/- ## === Coverage 99.16% 99.16% === Files 14 14 Lines 361 361 === Hits 358 358 Misses 33 ``` -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/98?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/98?src=pr=footer). Last update [80075e3...0169c1f](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/98?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pritidesai closed pull request #800: Display error message for each missing wskprop value.
pritidesai closed pull request #800: Display error message for each missing wskprop value. URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/800 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/deployers/manifestreader.go b/deployers/manifestreader.go index e9e8271b..fa541169 100644 --- a/deployers/manifestreader.go +++ b/deployers/manifestreader.go @@ -278,7 +278,7 @@ func (reader *ManifestReader) SetSequences(actions []utils.ActionRecord) error { // If the sequence action exists in actions, return error _, exists := reader.serviceDeployer.Deployment.Packages[seqAction.Packagename].Actions[seqAction.Action.Name] if exists == true { - // TODO(): i18n of error message (or create a new named error) + // TODO(798): i18n of error message (or create a new named error) err := errors.New("Sequence action's name [" + seqAction.Action.Name + "] is already used by an action.") return wskderrors.NewYAMLParserErr(reader.serviceDeployer.ManifestPath, err) diff --git a/deployers/servicedeployer.go b/deployers/servicedeployer.go index 0ef55d8e..e49526ef 100644 --- a/deployers/servicedeployer.go +++ b/deployers/servicedeployer.go @@ -402,6 +402,7 @@ func (deployer *ServiceDeployer) DeployDependencies() error { } if len(dependentPackages) > 1 { + // TODO(799) i18n errMessage := "GitHub dependency " + depName + " has multiple packages in manifest file: " + strings.Join(dependentPackages, ", ") + ". " + "One GitHub dependency can only be associated with single package in manifest file." + diff --git a/deployers/whiskclient.go b/deployers/whiskclient.go index be5fcf6c..7f60359a 100644 --- a/deployers/whiskclient.go +++ b/deployers/whiskclient.go @@ -288,22 +288,30 @@ func NewWhiskConfig(proppath string, deploymentPath string, manifestPath string, func validateClientConfig(credential PropertyValue, apiHost PropertyValue, namespace PropertyValue) error { - // Display error message based upon which config value was missing + // Display error message for each config value found missing if len(credential.Value) == 0 || len(apiHost.Value) == 0 || len(namespace.Value) == 0 { - var errmsg string + + var errorMsg string = "" if len(credential.Value) == 0 { - errmsg = wski18n.T(wski18n.ID_MSG_CONFIG_MISSING_AUTHKEY) + errorMsg = wskderrors.AppendDetailToErrorMessage( + errorMsg, wski18n.T(wski18n.ID_MSG_CONFIG_MISSING_AUTHKEY), 1) } if len(apiHost.Value) == 0 { - errmsg = wski18n.T(wski18n.ID_MSG_CONFIG_MISSING_APIHOST) + errorMsg = wskderrors.AppendDetailToErrorMessage( + errorMsg, wski18n.T(wski18n.ID_MSG_CONFIG_MISSING_APIHOST), 1) + } if len(namespace.Value) == 0 { - errmsg = wski18n.T(wski18n.ID_MSG_CONFIG_MISSING_NAMESPACE) + errorMsg = wskderrors.AppendDetailToErrorMessage( + errorMsg, wski18n.T(wski18n.ID_MSG_CONFIG_MISSING_NAMESPACE), 1) + } - return wskderrors.NewWhiskClientInvalidConfigError(errmsg) + if len(errorMsg) > 0 { + return wskderrors.NewWhiskClientInvalidConfigError(errorMsg) + } } // Show caller what final values we used for credential, apihost and namespace diff --git a/deployers/whiskclient_test.go b/deployers/whiskclient_test.go index dc45e950..f27f9916 100644 --- a/deployers/whiskclient_test.go +++ b/deployers/whiskclient_test.go @@ -22,6 +22,8 @@ package deployers import ( "github.com/apache/incubator-openwhisk-client-go/whisk" "github.com/apache/incubator-openwhisk-wskdeploy/utils" + "github.com/apache/incubator-openwhisk-wskdeploy/wski18n" + "github.com/apache/incubator-openwhisk-wskdeploy/wskprint" "github.com/stretchr/testify/assert" "testing" ) @@ -47,6 +49,11 @@ const ( WSKPROPS_CERT = "test_cert_file" ) +func init() { + // Setup "trace" flag for unit tests based upon "go test" -v flag + utils.Flags.Trace = wskprint.DetectGoTestVerbose() +} + func initializeFlags() { utils.Flags.Auth = ""
[GitHub] ningyougang opened a new pull request #3432: Introduce jmx for kafka
ningyougang opened a new pull request #3432: Introduce jmx for kafka URL: https://github.com/apache/incubator-openwhisk/pull/3432 - jmx is introduced into controller and invoker, in the actual scene, we not only collect kafka producer and consumer metrics but also collect kafka server metrics. So it is necessary to introduce jmx for kakfa. - Fix bug:jmx support for controller/invoker ## Description ## Related issue and scope ~~- [ ] I opened an issue to propose and discuss this change (#)~~ ## My changes affect the following components - [ ] API - [ ] Controller - [x] 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 - [x] Bug fix (jmx support for invoker/controller). - [x] Enhancement or new feature (introduce jmx support for kafka). - [ ] 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] rabbah commented on a change in pull request #3420: Add swift:4.1 with Codable to default set of runtimes
rabbah commented on a change in pull request #3420: Add swift:4.1 with Codable to default set of runtimes URL: https://github.com/apache/incubator-openwhisk/pull/3420#discussion_r174333706 ## File path: docs/reference.md ## @@ -378,13 +378,19 @@ Python 2 actions are executed using Python 2.7.12. This is the default runtime f ### Swift 3 Swift 3 actions are executed using Swift 3.1.1 `--kind swift:3.1.1`. -The default `--kind swift:default` is Swift 3.1.1. Swift 3.1.1 actions can use the following packages: - KituraNet version 1.7.6, https://github.com/IBM-Swift/Kitura-net - SwiftyJSON version 15.0.1, https://github.com/IBM-Swift/SwiftyJSON - Watson Developer Cloud SDK version 0.16.0, https://github.com/watson-developer-cloud/swift-sdk +### Swift 4 +Swift 3 actions are executed using Swift 4.1 `--kind swift:4.1`. Review comment: swift 4 actions? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3420: Add swift:4.1 with Codable to default set of runtimes
rabbah commented on a change in pull request #3420: Add swift:4.1 with Codable to default set of runtimes URL: https://github.com/apache/incubator-openwhisk/pull/3420#discussion_r174333493 ## File path: docs/actions.md ## @@ -685,17 +686,45 @@ func main(args: [String:Any]) -> [String:Any] { } } ``` +In this example the Swift action consume a dictionary and produce a dictionary. + +You can create a OpenWhisk action called `helloSwift` from this function as Review comment: s/a/an/ This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3420: Add swift:4.1 with Codable to default set of runtimes
rabbah commented on a change in pull request #3420: Add swift:4.1 with Codable to default set of runtimes URL: https://github.com/apache/incubator-openwhisk/pull/3420#discussion_r174333476 ## File path: docs/actions.md ## @@ -685,17 +686,45 @@ func main(args: [String:Any]) -> [String:Any] { } } ``` +In this example the Swift action consume a dictionary and produce a dictionary. Review comment: s/consume/consumes/ s/produce/produces/ This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] daisy-ycguo commented on issue #62: [For technical review] Generate release note
daisy-ycguo commented on issue #62: [For technical review] Generate release note URL: https://github.com/apache/incubator-openwhisk-release/pull/62#issuecomment-372874379 @houshengbo `rm -rf .git` will remove all the git information and `git log` will report error. I do need to keep `.git` folder and remove it just before packaging. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] pritidesai closed pull request #789: Add assets annotation tags when assets exported
pritidesai closed pull request #789: Add assets annotation tags when assets exported URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/789 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/parsers/yamlparser.go b/parsers/yamlparser.go index 2267e065..b8a58b6b 100644 --- a/parsers/yamlparser.go +++ b/parsers/yamlparser.go @@ -19,6 +19,7 @@ package parsers import ( "github.com/apache/incubator-openwhisk-client-go/whisk" + "github.com/apache/incubator-openwhisk-wskdeploy/utils" "github.com/apache/incubator-openwhisk-wskdeploy/wskenv" ) @@ -353,6 +354,17 @@ func (pkg *Package) GetApis() []*whisk.Api { } //YAML functions*// +func filterAnnotations(annotations whisk.KeyValueArr) map[string]interface{} { + res := make(map[string]interface{}) + for _, a := range annotations { + if a.Key != utils.MANAGED { + res[a.Key] = a.Value + } + } + + return res +} + func (yaml *YAML) ComposeParsersPackage(wskpag whisk.Package) *Package { pkg := new(Package) pkg.Packagename = wskpag.Name @@ -365,6 +377,7 @@ func (yaml *YAML) ComposeParsersPackage(wskpag whisk.Package) *Package { pkg.Inputs[keyval.Key] = *param } + pkg.Annotations = filterAnnotations(wskpag.Annotations) return pkg } @@ -382,6 +395,7 @@ func (yaml *YAML) ComposeParsersAction(wskact whisk.Action) *Action { action.Inputs[keyval.Key] = *param } + action.Annotations = filterAnnotations(wskact.Annotations) return action } @@ -396,6 +410,7 @@ func (yaml *YAML) ComposeParsersTrigger(wsktrg whisk.Trigger) *Trigger { trigger.Inputs[keyval.Key] = *param } + trigger.Annotations = filterAnnotations(wsktrg.Annotations) return trigger } @@ -406,5 +421,6 @@ func (yaml *YAML) ComposeParsersRule(wskrule whisk.Rule) *Rule { rule.Action = wskrule.Action.(map[string]interface{})["name"].(string) rule.Trigger = wskrule.Trigger.(map[string]interface{})["name"].(string) + rule.Annotations = filterAnnotations(wskrule.Annotations) return rule } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] codecov-io commented on issue #99: Add Code Query Parameter
codecov-io commented on issue #99: Add Code Query Parameter URL: https://github.com/apache/incubator-openwhisk-client-js/pull/99#issuecomment-372808959 # [Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=h1) Report > Merging [#99](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-openwhisk-client-js/commit/80075e32cb4abc85dd1e655d2ffebd292c8877b8?src=pr=desc) will **increase** coverage by `<.01%`. > The diff coverage is `100%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99/graphs/tree.svg?width=650=pr=j2mPEx0Tkq=150)](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=tree) ```diff @@Coverage Diff @@ ## master #99 +/- ## == + Coverage 99.16% 99.17% +<.01% == Files 14 14 Lines 361 364 +3 == + Hits 358 361 +3 Misses 33 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=tree) | Coverage Δ | | |---|---|---| | [lib/actions.js](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99/diff?src=pr=tree#diff-bGliL2FjdGlvbnMuanM=) | `100% <100%> (ø)` | :arrow_up: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=footer). Last update [80075e3...9b17e3c](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ddragosd commented on issue #762: wskdeploy only supports /whisk.system bindings or github.com packages
ddragosd commented on issue #762: wskdeploy only supports /whisk.system bindings or github.com packages URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/762#issuecomment-372870448 many 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] dubeejw commented on issue #3421: Add ElasticSearch Log Store
dubeejw commented on issue #3421: Add ElasticSearch Log Store URL: https://github.com/apache/incubator-openwhisk/pull/3421#issuecomment-372867292 PG2 2918 ⏳ This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on issue #3421: Add ElasticSearch Log Store
dubeejw commented on issue #3421: Add ElasticSearch Log Store URL: https://github.com/apache/incubator-openwhisk/pull/3421#issuecomment-372867292 PG2 2981 ⏳ This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 opened a new pull request #801: WIP - Adding Docker and Native support
pritidesai opened a new pull request #801: WIP - Adding Docker and Native support URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/801 Closes #623 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah closed pull request #242: Use HTTP instead of HTTPS for controller
rabbah closed pull request #242: Use HTTP instead of HTTPS for controller URL: https://github.com/apache/incubator-openwhisk-cli/pull/242 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/tools/travis/test_openwhisk.sh b/tools/travis/test_openwhisk.sh index 4ee46dcb..8d2453ee 100755 --- a/tools/travis/test_openwhisk.sh +++ b/tools/travis/test_openwhisk.sh @@ -68,7 +68,7 @@ $ANSIBLE_CMD couchdb.yml $ANSIBLE_CMD initdb.yml $ANSIBLE_CMD apigateway.yml $ANSIBLE_CMD wipe.yml -$ANSIBLE_CMD openwhisk.yml -e cli_installation_mode=local -e openwhisk_cli_home=$TRAVIS_BUILD_DIR +$ANSIBLE_CMD openwhisk.yml -e cli_installation_mode=local -e openwhisk_cli_home=$TRAVIS_BUILD_DIR -e controllerProtocolForSetup=http # Run the test cases under openwhisk to ensure the quality of the runnint API. cd $TRAVIS_BUILD_DIR This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah closed issue #243: Travis is currently failing
rabbah closed issue #243: Travis is currently failing URL: https://github.com/apache/incubator-openwhisk-cli/issues/243 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw closed pull request #240: adding something to test latest openwhisk on master - do not merge
dubeejw closed pull request #240: adding something to test latest openwhisk on master - do not merge URL: https://github.com/apache/incubator-openwhisk-cli/pull/240 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 a80aee92..cb5a1e34 100644 --- a/README.md +++ b/README.md @@ -188,3 +188,5 @@ Travis CI as the continuous delivery service for Linux and Mac. OpenWhisk CLI is a Go project. Currently Travis CI supports the environments of Linux and Mac, but it is not available for Windows. We will add support of AppVeyor CI in future to run the test cases and build the binary for Windows. + +Test Test Test This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw closed pull request #241: WIP: test latest cli code
dubeejw closed pull request #241: WIP: test latest cli code URL: https://github.com/apache/incubator-openwhisk-cli/pull/241 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/CONTRIBUTING.md b/CONTRIBUTING.md index aafe376a..7a434bb1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,6 +16,7 @@ # --> + # Contributing to OpenWhisk CLI ## Set up the development environment This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on issue #242: Use HTTP instead of HTTPS for controller
dubeejw commented on issue #242: Use HTTP instead of HTTPS for controller URL: https://github.com/apache/incubator-openwhisk-cli/pull/242#issuecomment-372863727 @csantanapr, @houshengbo, @pritidesai, @mdeuser, whoever gets to this first, please merge. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on a change in pull request #3421: Add ElasticSearch Log Store
dubeejw commented on a change in pull request #3421: Add ElasticSearch Log Store URL: https://github.com/apache/incubator-openwhisk/pull/3421#discussion_r174313574 ## File path: core/controller/src/main/scala/whisk/core/controller/ApiUtils.scala ## @@ -184,7 +184,11 @@ trait ReadOps extends Directives { onComplete(factory.get(datastore, docid)) { case Success(entity) => logging.debug(this, s"[PROJECT] entity success") -complete(OK, project(entity)) + +onComplete(project(entity)) { Review comment: Displays error thrown from log store `fetchLogs`. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3421: Add ElasticSearch Log Store
rabbah commented on a change in pull request #3421: Add ElasticSearch Log Store URL: https://github.com/apache/incubator-openwhisk/pull/3421#discussion_r173699456 ## File path: common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchLogStore.scala ## @@ -0,0 +1,130 @@ +/* + * 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.containerpool.logging + +import java.nio.file.{Path, Paths} +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +import akka.actor.ActorSystem +import akka.http.scaladsl.model.HttpRequest +import akka.http.scaladsl.model.Uri +import akka.stream.scaladsl.Flow +import akka.http.scaladsl.model.HttpResponse +import akka.http.scaladsl.model._ + +import whisk.common.AkkaLogging +import whisk.core.entity.{ActivationLogs, Identity, WhiskActivation} +import whisk.core.containerpool.logging.ElasticSearchJsonProtocol._ +import whisk.core.ConfigKeys + +import scala.concurrent.Future +import scala.concurrent.Promise +import scala.util.Try + +import spray.json._ + +import pureconfig._ + +// Schema of logs in ES +case class UserLogEntry(message: String, tenantId: String, stream: String, time: String, action: String) + +object UserLogEntry extends DefaultJsonProtocol { + implicit val serdes = +jsonFormat(UserLogEntry.apply, "message", "ALCH_TENANT_ID", "stream_str", "time_date", "action_str") +} + +case class ElasticSearchLogStoreConfig(protocol: String, + host: String, + port: Int, + logMessageField: String, + activationIdField: String, + requiredHeaders: String) + +/** + * Docker based implementation of a LogStore. + * + * Relies on docker's implementation details with regards to the JSON log-driver. When using the JSON log-driver + * docker writes stdout/stderr to a JSON formatted file which is read by this store. Logs are written in the + * activation record itself. + * + * Additionally writes logs to a separate file which can be processed by any backend service asynchronously. + */ +class ElasticSearchLogStore( + system: ActorSystem, + httpFlow: Option[Flow[(HttpRequest, Promise[HttpResponse]), (Try[HttpResponse], Promise[HttpResponse]), Any]] = None, + destinationDirectory: Path = Paths.get("logs"), + elasticSearchConfig: ElasticSearchLogStoreConfig = +loadConfigOrThrow[ElasticSearchLogStoreConfig](ConfigKeys.elasticSearch)) +extends DockerToActivationFileLogStore(system, destinationDirectory) { + + implicit val actorSystem = system Review comment: Which of these fields need to be public? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on a change in pull request #3421: Add ElasticSearch Log Store
dubeejw commented on a change in pull request #3421: Add ElasticSearch Log Store URL: https://github.com/apache/incubator-openwhisk/pull/3421#discussion_r174153522 ## File path: common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchLogStore.scala ## @@ -0,0 +1,138 @@ +/* + * 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.containerpool.logging + +import java.nio.file.{Path, Paths} +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +import akka.actor.ActorSystem +import akka.http.scaladsl.model.HttpRequest +import akka.http.scaladsl.model.Uri +import akka.stream.scaladsl.Flow +import akka.http.scaladsl.model.HttpResponse +import akka.http.scaladsl.model._ + +import whisk.common.AkkaLogging +import whisk.core.entity.{ActivationLogs, Identity, WhiskActivation} +import whisk.core.containerpool.logging.ElasticSearchJsonProtocol._ +import whisk.core.ConfigKeys + +import scala.concurrent.Future +import scala.concurrent.Promise +import scala.util.Try + +import spray.json._ + +import pureconfig._ + +// Schema of logs in ES +case class UserLogEntry(message: String, stream: String, time: String, action: String) + +object UserLogEntry extends DefaultJsonProtocol { + implicit val serdes = +jsonFormat(UserLogEntry.apply, "message", "stream_str", "time_date", "action_str") +} + +case class ElasticSearchLogStoreConfig(protocol: String, + host: String, + port: Int, + logMessageField: String, + activationIdField: String, + requiredHeaders: String) + +/** + * Docker based implementation of a LogStore. + * + * Relies on docker's implementation details with regards to the JSON log-driver. When using the JSON log-driver + * docker writes stdout/stderr to a JSON formatted file which is read by this store. Logs are written in the + * activation record itself. + * + * Additionally writes logs to a separate file which can be processed by any backend service asynchronously. + */ +class ElasticSearchLogStore( + system: ActorSystem, + httpFlow: Option[Flow[(HttpRequest, Promise[HttpResponse]), (Try[HttpResponse], Promise[HttpResponse]), Any]] = None, + destinationDirectory: Path = Paths.get("logs"), + elasticSearchConfig: ElasticSearchLogStoreConfig = +loadConfigOrThrow[ElasticSearchLogStoreConfig](ConfigKeys.elasticSearch)) +extends DockerToActivationFileLogStore(system, destinationDirectory) { + + implicit val actorSystem = system + implicit val logging = new AkkaLogging(system.log) + + private val protocol = elasticSearchConfig.protocol + private val host = elasticSearchConfig.host + private val port = elasticSearchConfig.port + private val logMessageField = elasticSearchConfig.logMessageField + private val activationIdField = elasticSearchConfig.activationIdField + private val requiredHeaders = elasticSearchConfig.requiredHeaders.split(",") + private val esClient = new ElasticSearchRestClient(protocol, host, port, httpFlow) + + private def transcribeLogs(queryResult: EsSearchResult): ActivationLogs = { +val logs = queryResult.hits.hits.map(hit => { + val userLogEntry = hit.source.convertTo[UserLogEntry] + s"${userLogEntry.time} ${userLogEntry.stream}: ${userLogEntry.message.stripLineEnd}" +}) + +ActivationLogs(logs) + } + + private def extractRequiredHeaders(request: HttpRequest) = +request.headers.filter { + case header: HttpHeader if requiredHeaders.contains(header.lowercaseName) => true + case _ => false +}.toList + + private def generatePayload(activation: WhiskActivation) = { +val logQuery = s"_type: $logMessageField AND $activationIdField: ${activation.activationId}" +val queryString = EsQueryString(EsQueryValue(logQuery)) +val sort = Some(Array(EsQueryTimestamp(EsQueryOrder("asc")).toJson)) + +EsQuery(queryString.toJson, sort).toJson.asJsObject + } + + private def generatePath(user: Identity) = { +val date =
[GitHub] tysonnorris commented on issue #2833: MesosContainerFactory
tysonnorris commented on issue #2833: MesosContainerFactory URL: https://github.com/apache/incubator-openwhisk/pull/2833#issuecomment-372843744 I think this should work now; please try again when possible. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw opened a new issue #243: Travis is currently failing
dubeejw opened a new issue #243: Travis is currently failing URL: https://github.com/apache/incubator-openwhisk-cli/issues/243 https://github.com/apache/incubator-openwhisk-cli/pull/240 shows that Travis is failing with the error below. ``` whisk.core.cli.test.WskConfigTests > Wsk CLI config should show api build using http apihost FAILED org.scalatest.exceptions.TestFailedException: /home/travis/gopath/src/github.com/apache/incubator-openwhisk/bin/wsk property get --apibuild -i whisk API build Unknown error: Unable to obtain API build information: Get http://172.17.0.1:10001/api/v1: read tcp 172.17.0.1:36772->172.17.0.1:10001: read: connection reset by peer exit code: 3 was not equal to 0 ``` Failure is likely related to https://github.com/apache/incubator-openwhisk/commit/a8476ab970b4f8804d0d26fa319fe4aaa7c9ab04. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw opened a new pull request #242: Get build version using HTTPS
dubeejw opened a new pull request #242: Get build version using HTTPS URL: https://github.com/apache/incubator-openwhisk-cli/pull/242 Fixes Travis test failure. ``` whisk.core.cli.test.WskConfigTests > Wsk CLI config should show api build using http apihost FAILED org.scalatest.exceptions.TestFailedException: /home/travis/gopath/src/github.com/apache/incubator-openwhisk/bin/wsk property get --apibuild -i whisk API build Unknown error: Unable to obtain API build information: Get http://172.17.0.1:10001/api/v1: read tcp 172.17.0.1:36772->172.17.0.1:10001: read: connection reset by peer exit code: 3 was not equal to 0 ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] csantanapr commented on issue #3420: Add swift:4.1 with Codable to default set of runtimes
csantanapr commented on issue #3420: Add swift:4.1 with Codable to default set of runtimes URL: https://github.com/apache/incubator-openwhisk/pull/3420#issuecomment-372000671 ## Swift 4.x support Some examples of using Codable In and Out ### Codable style function signature Create file `helloCodableAsync.swift` ```swift // Domain model/entity struct Employee: Codable { let id: Int? let name: String? } // codable main function func main(input: Employee, respondWith: (Employee?, Error?) -> Void) -> Void { // For simplicity, just passing same Employee instance forward respondWith(input, nil) } ``` ``` wsk action update helloCodableAsync helloCodableAsync.swift swift:4.1 ``` ok: updated action helloCodableAsync ``` wsk action invoke helloCodableAsync -r -p id 42 -p name Carlos ``` ```json { "id": 42, "name": "Carlos" } ``` ### Codable Error Handling Create file `helloCodableAsync.swift` ```swift struct Employee: Codable { let id: Int? let name: String? } enum VendingMachineError: Error { case invalidSelection case insufficientFunds(coinsNeeded: Int) case outOfStock } func main(input: Employee, respondWith: (Employee?, Error?) -> Void) -> Void { // Return real error do{ throw VendingMachineError.insufficientFunds(coinsNeeded: 5) } catch { respondWith(nil, error) } } ``` ``` wsk action update helloCodableError helloCodableError.swift swift:4.1 ``` ok: updated action helloCodableError ``` wsk action invoke helloCodableError -b -p id 42 -p name Carlos ``` ```json { "name": "helloCodableError", "response": { "result": { "error": "insufficientFunds(5)" }, "status": "application error", "success": false } ``` ### Packaging an action as a Swift executable using Swift 4 When you create an OpenWhisk Swift action with a Swift source file, it has to be compiled into a binary before the action is run. Once done, subsequent calls to the action are much faster until the container holding your action is purged. This delay is known as the cold-start delay. To avoid the cold-start delay, you can compile your Swift file into a binary and then upload to OpenWhisk in a zip file. As you need the OpenWhisk scaffolding, the easiest way to create the binary is to build it within the same environment as it will be run in. These are the steps: - Run an interactive Swift action container. ``` docker run --rm -it -v "$(pwd):/owexec" openwhisk/action-swift-v4.0 bash ``` This puts you in a bash shell within the Docker container. - Copy the source code and prepare to build it. ``` cp /owexec/hello.swift /swift4Action/spm-build/Sources/Action/main.swift ``` ``` cat /swift4Action/epilogue.swift >> /swift4Action/spm-build/Sources/Action/main.swift ``` ``` echo '_run_main(mainFunction:main)' >> /swift4Action/spm-build/Sources/Action/main.swift ``` Copy any additional source files to `/swift4Action/spm-build/Sources/Action/` - (Optional) Create the `Package.swift` file to add dependencies. ```swift // swift-tools-version:4.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "Action", products: [ .executable( name: "Action", targets: ["Action"] ) ], dependencies: [ .package(url: "https://github.com/IBM-Swift/SwiftyRequest.git;, .upToNextMajor(from: "1.0.0")) ], targets: [ .target( name: "Action", dependencies: ["SwiftyRequest"], path: "." ) ``` 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`. 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 ``` cp /owexec/Package.swift /swift4Action/spm-build/Package.swift ``` - Change to the spm-build directory. ``` cd /swift4Action/spm-build ``` - Compile your Swift Action. ``` swift build -c release ``` - Create the zip archive. ``` zip /owexec/hello.zip .build/release/Action ``` - Exit the Docker container. ``` exit ``` This has created hello.zip in the same directory as hello.swift. - Upload it to OpenWhisk with the action name helloSwifty: ``` wsk action update helloSwiftly hello.zip openwhisk/action-swift-v4.0
[GitHub] csantanapr commented on issue #3420: Add swift:4.1 with Codable to default set of runtimes
csantanapr commented on issue #3420: Add swift:4.1 with Codable to default set of runtimes URL: https://github.com/apache/incubator-openwhisk/pull/3420#issuecomment-372836494 added initial stab at docs This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3420: Add swift:4.1 with Codable to default set of runtimes
csantanapr commented on issue #3420: Add swift:4.1 with Codable to default set of runtimes URL: https://github.com/apache/incubator-openwhisk/pull/3420#issuecomment-372000528 TODOs - [x] Update Docs This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on issue #3426: CLI Builds not found in expected location
dubeejw commented on issue #3426: CLI Builds not found in expected location URL: https://github.com/apache/incubator-openwhisk/issues/3426#issuecomment-372815217 To first clean the environment: `ansible-playbook -i environments/ openwhisk.yml -e mode=clean`. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on issue #3426: CLI Builds not found in expected location
dubeejw commented on issue #3426: CLI Builds not found in expected location URL: https://github.com/apache/incubator-openwhisk/issues/3426#issuecomment-372815082 @jonpspri, FYI. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on issue #99: Add Code Query Parameter
dubeejw commented on issue #99: Add Code Query Parameter URL: https://github.com/apache/incubator-openwhisk-client-js/pull/99#issuecomment-372811662 @jthomas, Travis is passing for this one now. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw closed pull request #260: Update MessageHubMultiWorkersTest to use ExtendedCouchDbRestClient
dubeejw closed pull request #260: Update MessageHubMultiWorkersTest to use ExtendedCouchDbRestClient URL: https://github.com/apache/incubator-openwhisk-package-kafka/pull/260 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/packages/MessageHubMultiWorkersTest.scala b/tests/src/test/scala/system/packages/MessageHubMultiWorkersTest.scala index f6ce723..7ea14ec 100644 --- a/tests/src/test/scala/system/packages/MessageHubMultiWorkersTest.scala +++ b/tests/src/test/scala/system/packages/MessageHubMultiWorkersTest.scala @@ -20,24 +20,26 @@ import system.utils.KafkaUtils import scala.concurrent.duration.DurationInt import scala.language.postfixOps - import org.junit.runner.RunWith import org.scalatest.BeforeAndAfterAll import org.scalatest.FlatSpec import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner - import common.JsHelpers import common.TestHelpers import common.StreamLogging +import common.WhiskProperties import common.Wsk import common.WskActorSystem import common.WskProps import common.WskTestHelpers import spray.json.DefaultJsonProtocol._ import spray.json.{pimpAny, _} -import whisk.core.database.test.DatabaseScriptTestUtils -import whisk.utils.JsHelpers +import whisk.core.WhiskConfig +import whisk.core.database.test.ExtendedCouchDbRestClient +import whisk.utils.{JsHelpers, retry} + +import scala.concurrent.Await @RunWith(classOf[JUnitRunner]) class MessageHubMultiWorkersTest extends FlatSpec @@ -47,8 +49,7 @@ class MessageHubMultiWorkersTest extends FlatSpec with TestHelpers with WskTestHelpers with JsHelpers - with StreamLogging - with DatabaseScriptTestUtils { + with StreamLogging { val topic = "test" @@ -57,8 +58,17 @@ class MessageHubMultiWorkersTest extends FlatSpec val messagingPackage = "/whisk.system/messaging" val messageHubFeed = "messageHubFeed" + + val dbProtocol = WhiskProperties.getProperty("db.protocol") + val dbHost = WhiskProperties.getProperty("db.host") + val dbPort = WhiskProperties.getProperty("db.port").toInt + val dbUsername = WhiskProperties.getProperty("db.username") + val dbPassword = WhiskProperties.getProperty("db.password") + val dbPrefix = WhiskProperties.getProperty(WhiskConfig.dbPrefix) val dbName = s"${dbPrefix}ow_kafka_triggers" + val client = new ExtendedCouchDbRestClient(dbProtocol, dbHost, dbPort, dbUsername, dbPassword, dbName) + val kafkaUtils = new KafkaUtils behavior of "Mussage Hub Feed" @@ -76,10 +86,14 @@ class MessageHubMultiWorkersTest extends FlatSpec createTrigger(assetHelper, firstTrigger, parameters) createTrigger(assetHelper, secondTrigger, parameters) - val documents = getAllDocs(dbName).fields("rows").convertTo[List[JsObject]] + retry({ +val result = Await.result(client.getAllDocs(includeDocs = Some(true)), 15.seconds) +result should be('right) +val documents = result.right.get.fields("rows").convertTo[List[JsObject]] - validateTriggerAssignment(documents, firstTrigger, worker0) - validateTriggerAssignment(documents, secondTrigger, worker0) +validateTriggerAssignment(documents, firstTrigger, worker0) +validateTriggerAssignment(documents, secondTrigger, worker0) + }) } it should "assign a trigger to worker0 and a trigger to worker1 when both workers are available" in withAssetCleaner(wskprops) { @@ -96,10 +110,14 @@ class MessageHubMultiWorkersTest extends FlatSpec createTrigger(assetHelper, firstTrigger, parameters) createTrigger(assetHelper, secondTrigger, parameters) - val documents = getAllDocs(dbName).fields("rows").convertTo[List[JsObject]] + retry({ +val result = Await.result(client.getAllDocs(includeDocs = Some(true)), 15.seconds) +result should be('right) +val documents = result.right.get.fields("rows").convertTo[List[JsObject]] - validateTriggerAssignment(documents, firstTrigger, worker0) - validateTriggerAssignment(documents, secondTrigger, worker1) +validateTriggerAssignment(documents, firstTrigger, worker0) +validateTriggerAssignment(documents, secondTrigger, worker1) + }) } it should "assign a trigger to worker1 when worker0 is removed and there is an assignment imbalance" in withAssetCleaner(wskprops) { @@ -120,12 +138,16 @@ class MessageHubMultiWorkersTest extends FlatSpec createTrigger(assetHelper, thirdTrigger, parameters = constructParams(List(worker0, worker1))) createTrigger(assetHelper, fourthTrigger, parameters = constructParams(List(worker1))) - val documents = getAllDocs(dbName).fields("rows").convertTo[List[JsObject]] + retry({ +val result =
[GitHub] codecov-io commented on issue #99: Add Code Query Parameter
codecov-io commented on issue #99: Add Code Query Parameter URL: https://github.com/apache/incubator-openwhisk-client-js/pull/99#issuecomment-372808959 # [Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=h1) Report > Merging [#99](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-openwhisk-client-js/commit/80075e32cb4abc85dd1e655d2ffebd292c8877b8?src=pr=desc) will **increase** coverage by `<.01%`. > The diff coverage is `100%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99/graphs/tree.svg?width=650=150=pr=j2mPEx0Tkq)](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=tree) ```diff @@Coverage Diff @@ ## master #99 +/- ## == + Coverage 99.16% 99.17% +<.01% == Files 14 14 Lines 361 364 +3 == + Hits 358 361 +3 Misses 33 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=tree) | Coverage ? | | |---|---|---| | [lib/actions.js](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99/diff?src=pr=tree#diff-bGliL2FjdGlvbnMuanM=) | `100% <100%> (?)` | :arrow_up: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `? = absolute (impact)`, `? = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=footer). Last update [80075e3...055665c](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/99?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on a change in pull request #99: Add Code Query Parameter
dubeejw commented on a change in pull request #99: Add Code Query Parameter URL: https://github.com/apache/incubator-openwhisk-client-js/pull/99#discussion_r174272933 ## File path: test/unit/actions.test.js ## @@ -60,7 +79,7 @@ test('should retrieve action from string identifier', t => { t.is(path, `namespaces/${ns}/actions/12345`) } - return actions.get('12345') Review comment: @jthomas, yes this change was needed to prevent an error now that `action.get` doesn't use the default `get` method from `resources.js`. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] develpr closed issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping
develpr closed issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping URL: https://github.com/apache/incubator-openwhisk/issues/3431 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] develpr commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping
develpr commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping URL: https://github.com/apache/incubator-openwhisk/issues/3431#issuecomment-372805522 @chetanmeh sorry you're right, and I just took a look at the diff and bumped the version of ansible in my local version. That does seem to have resolved that issue, though I now end up with: ``` default: set_fact 0.04s default: set_fact 0.04s default: set_fact 0.03s default: ++ sudo su -c 'mkdir ${HOME}/bin' default: ++ sudo su -c 'ln -s ${OPENWHISK_HOME}/tools/admin/wskadmin ${HOME}/bin/wskadmin' default: ++ sudo su -c 'ln -s ${OPENWHISK_HOME}/tools/build/redo ${HOME}/bin/wskdev' default: ++ echo /home/vagrant/openwhisk/bin/wsk -i '"$@"' default: /tmp/vagrant-shell: line 22: /home/vagrant/bin/wsk: No such file or directory The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. ``` I think that the spirit of my issue is solved in reality and I should probably open a new ticket. (though I won't complain if anybody has any pro-tips to add here about this ;)). Thank you very much all for a quick reply response! This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw closed pull request #102: Fixes #100
dubeejw closed pull request #102: Fixes #100 URL: https://github.com/apache/incubator-openwhisk-client-js/pull/102 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 81cdbb2..8d6af41 100644 --- a/README.md +++ b/README.md @@ -493,16 +493,16 @@ Swagger parameter must be a well-formed JSON string, containing a valid Swagger ## Debugging -Setting an environment parameter (`NODE_DEBUG=request`) will dump the HTTP requests from the client library and responses received to `stderr`. +Setting an environment parameter (`DEBUG=needle`) will dump the HTTP requests from the client library and responses received to `stderr`. ```bash -NODE_DEBUG=request node script.js +DEBUG=needle node script.js ``` This parameter can also be set dynamically at runtime, provided this happens before the `openwhisk` module is required. ```javascript -process.env.NODE_DEBUG='request'; +process.env.DEBUG='needle'; var openwhisk = require('openwhisk'); ``` diff --git a/test/integration/triggers.test.js b/test/integration/triggers.test.js index 4b68e2b..04515db 100644 --- a/test/integration/triggers.test.js +++ b/test/integration/triggers.test.js @@ -5,11 +5,12 @@ const test = require('ava') const Triggers = require('../../lib/triggers.js') +const Rules = require('../../lib/rules.js') const Client = require('../../lib/client.js') const Utils = require('./utils.js') const envParams = ['API_KEY', 'API_HOST', 'NAMESPACE'] -const options = Utils.autoOptions(); +const options = Utils.autoOptions() // check that mandatory configuration properties are available envParams.forEach(key => { @@ -52,7 +53,7 @@ test('list all triggers using options namespace', t => { test('get a non-existing trigger, expecting 404', async t => { const triggers = new Triggers(new Client(options)) await triggers.get({name: 'glorfindel'}).catch(err => { - t.is(err.statusCode, 404) +t.is(err.statusCode, 404) }) }) @@ -107,11 +108,16 @@ test('fire a trigger', t => { } const triggers = new Triggers(new Client(options)) + const rules = new Rules(new Client(options)) + return triggers.create({triggerName: 'random_fire_test'}).then(result => { -return triggers.invoke({triggerName: 'random_fire_test'}).then(update_result => { - t.true(update_result.hasOwnProperty('activationId')) - t.pass() - return triggers.delete({triggerName: 'random_fire_test'}).catch(errors) +return rules.create({ruleName: 'echo_rule', action: `/whisk.system/utils/echo`, trigger: `/${NAMESPACE}/random_fire_test`}).then(rule_result => { + return triggers.invoke({triggerName: 'random_fire_test'}).then(update_result => { +t.true(update_result.hasOwnProperty('activationId')) +t.pass() +return triggers.delete({triggerName: 'random_fire_test'}) + .then(() => rules.delete({ruleName: 'echo_rule'})) + }).catch(errors) }).catch(errors) }).catch(errors) }) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw closed issue #100: Travis Test Breakage
dubeejw closed issue #100: Travis Test Breakage URL: https://github.com/apache/incubator-openwhisk-client-js/issues/100 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] abaruni opened a new pull request #260: Update MessageHubMultiWorkersTest to use ExtendedCouchDbRestClient
abaruni opened a new pull request #260: Update MessageHubMultiWorkersTest to use ExtendedCouchDbRestClient URL: https://github.com/apache/incubator-openwhisk-package-kafka/pull/260 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ScottChapman commented on issue #101: please add ignore_certs env var
ScottChapman commented on issue #101: please add ignore_certs env var URL: https://github.com/apache/incubator-openwhisk-client-js/issues/101#issuecomment-372778594 > This is specific to openwhisk actions making an openwhisk api call. @rabbah - right, exactly; that's what all the client libraries do. They shouldn't require any customizations to be able to run in a deployment. They should be picking that up from the deployment environment itself. I understand that what you are saying is that this isn't what is happening today. I am just saying as a developer that's how I would expect it to work. IMHO... This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ScottChapman commented on issue #101: please add ignore_certs env var
ScottChapman commented on issue #101: please add ignore_certs env var URL: https://github.com/apache/incubator-openwhisk-client-js/issues/101#issuecomment-372778594 > This is specific to openwhisk actions making an openwhisk api call. @rabbah - right, exactly; that's what all the client libraries do. They shouldn't require any customizations to be able to run in a deployment. They should be picking that up from the deployment environment itself. I understand that what you are saying is that this isn't what is happening today. I am just saying as a developer that's how I would expect it to work... This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah commented on issue #101: please add ignore_certs env var
rabbah commented on issue #101: please add ignore_certs env var URL: https://github.com/apache/incubator-openwhisk-client-js/issues/101#issuecomment-372762702 > I would think you would have the same issue with any of the client libraries you are making available for action development Why? This is specific to openwhisk actions making an openwhisk api call. Any other client issue would be beyond scope. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #101: please add ignore_certs env var
rabbah commented on issue #101: please add ignore_certs env var URL: https://github.com/apache/incubator-openwhisk-client-js/issues/101#issuecomment-372762237 We don?t have such a setting today - so we?d need to think about how to add it, thread it through the invoker, and into the runtimes containers. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] aviweit commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping
aviweit commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping URL: https://github.com/apache/incubator-openwhisk/issues/3431#issuecomment-372761399 @develpr , I did not use Vagrant but a regular install via Ansible on my fresh Ubuntu 14.04 VM. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ScottChapman commented on issue #101: please add ignore_certs env var
ScottChapman commented on issue #101: please add ignore_certs env var URL: https://github.com/apache/incubator-openwhisk-client-js/issues/101#issuecomment-372761362 @rabbah - shouldn't that be defined as part of the configuration of the deployment? I would think you would have the same issue with any of the client libraries you are making available for action development. I would expect that any deployment setup and configures the defaults to be used by the clients. @jthomas - I think you probably want someone more familiar with doing development on this package to make the change. For example you probably should have a test, and run some run on the PR. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] chetanmeh commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping
chetanmeh commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping URL: https://github.com/apache/incubator-openwhisk/issues/3431#issuecomment-372757312 @develpr not sure on that. With PR #3430 ansible version would get bumped which may have some impact on how sudo is handled. As current travis is running with updated ansible fine I expect it should fix issues with Vagrant setup also. @vvraskin 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] develpr commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping
develpr commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping URL: https://github.com/apache/incubator-openwhisk/issues/3431#issuecomment-372755922 Thanks @chetanmeh - do you happen to know if this also resolved the ancillary (I think?) issue regarding the missing `vagrant` user? Sorry I probably should have opened a seperate ticket (and I still can / will if it 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 #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping
chetanmeh commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping URL: https://github.com/apache/incubator-openwhisk/issues/3431#issuecomment-372755014 This should get fixed with #3430 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #101: please add ignore_certs env var
rabbah commented on issue #101: please add ignore_certs env var URL: https://github.com/apache/incubator-openwhisk-client-js/issues/101#issuecomment-372753829 @jthomas this would be ok if running locally with node. We do not know in a deployment if the certificate is trusted or not. This is the aforementioned backend support which would be required. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] develpr commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping
develpr commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping URL: https://github.com/apache/incubator-openwhisk/issues/3431#issuecomment-372753015 @aviweit out of curiosity, did you modify the `Vagrantfile` to change the `su vagrant` as I mentioned that I did? I ask because it would be good to confirm if this issue we're both experiencing could be related to this change I made. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] aviweit commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping
aviweit commented on issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping URL: https://github.com/apache/incubator-openwhisk/issues/3431#issuecomment-372742409 I just got a similar certificate issue when installing all-in-one on ubuntu 14 VM, during step: sudo ansible-playbook openwhisk.yml ``` TASK [controller : wait until the Controller in this host is up and running] * Tuesday 13 March 2018 16:39:14 + (0:00:11.536) 0:00:53.889 * FAILED - RETRYING: wait until the Controller in this host is up and running (12 retries left). FAILED - RETRYING: wait until the Controller in this host is up and running (11 retries left). FAILED - RETRYING: wait until the Controller in this host is up and running (10 retries left). FAILED - RETRYING: wait until the Controller in this host is up and running (9 retries left). FAILED - RETRYING: wait until the Controller in this host is up and running (8 retries left). FAILED - RETRYING: wait until the Controller in this host is up and running (7 retries left). FAILED - RETRYING: wait until the Controller in this host is up and running (6 retries left). FAILED - RETRYING: wait until the Controller in this host is up and running (5 retries left). FAILED - RETRYING: wait until the Controller in this host is up and running (4 retries left). FAILED - RETRYING: wait until the Controller in this host is up and running (3 retries left). FAILED - RETRYING: wait until the Controller in this host is up and running (2 retries left). FAILED - RETRYING: wait until the Controller in this host is up and running (1 retries left). fatal: [controller0]: FAILED! => {"attempts": 12, "changed": false, "content": "", "failed": true, "msg": "Status code was not [200]: Request failed: ", "redirected": false, "status": -1, "url": "https://172 .17.0.1:10001/ping"} Status code was not [200]: Request failed: PLAY RECAP *** controller0: ok=20 changed=3unreachable=0failed=1 kafka0 : ok=12 changed=6unreachable=0failed=0 ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] duynguyen commented on a change in pull request #2: Add DC/OS universe for OpenWhisk and orchestration scripts
duynguyen commented on a change in pull request #2: Add DC/OS universe for OpenWhisk and orchestration scripts URL: https://github.com/apache/incubator-openwhisk-deploy-mesos/pull/2#discussion_r174203845 ## File path: dcos-deploy-script/Makefile ## @@ -0,0 +1,127 @@ +DCOS_ENDPOINT ?= +APIGATEWAY_DNS ?= +OPENWHISK_UNIVERSE ?= +WSK_NAMESPACE ?= guest +WSK_AUTH_TOKEN ?= + +cli: Review comment: yep +1. Should it be in another PR 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] duynguyen commented on a change in pull request #2: Add DC/OS universe for OpenWhisk and orchestration scripts
duynguyen commented on a change in pull request #2: Add DC/OS universe for OpenWhisk and orchestration scripts URL: https://github.com/apache/incubator-openwhisk-deploy-mesos/pull/2#discussion_r174203845 ## File path: dcos-deploy-script/Makefile ## @@ -0,0 +1,127 @@ +DCOS_ENDPOINT ?= +APIGATEWAY_DNS ?= +OPENWHISK_UNIVERSE ?= +WSK_NAMESPACE ?= guest +WSK_AUTH_TOKEN ?= + +cli: Review comment: yep +1 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mdeuser commented on issue #3418: support cleanup of cloudant/kafka trigger dbs
mdeuser commented on issue #3418: support cleanup of cloudant/kafka trigger dbs URL: https://github.com/apache/incubator-openwhisk/pull/3418#issuecomment-372734774 is this part of a broader "clean up" effort to rid the environment of all entities (i.e. actions, triggers, rules, apis, etc) associated with a deleted 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] jthomas commented on issue #98: ShortDesc name field is optional
jthomas commented on issue #98: ShortDesc name field is optional URL: https://github.com/apache/incubator-openwhisk-client-js/pull/98#issuecomment-372730574 Can you re-base this PR once #102 is merged to resolve the build issue? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jthomas commented on issue #99: Add Code Query Parameter
jthomas commented on issue #99: Add Code Query Parameter URL: https://github.com/apache/incubator-openwhisk-client-js/pull/99#issuecomment-372730542 Can you re-base this PR once #102 is merged to resolve the build issue? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jthomas commented on issue #98: ShortDesc name field is optional
jthomas commented on issue #98: ShortDesc name field is optional URL: https://github.com/apache/incubator-openwhisk-client-js/pull/98#issuecomment-372730574 Can you re-base this PR to resolve the build issue now I've fixed the trigger failure? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jthomas commented on issue #99: Add Code Query Parameter
jthomas commented on issue #99: Add Code Query Parameter URL: https://github.com/apache/incubator-openwhisk-client-js/pull/99#issuecomment-372730542 Can you re-base this PR to resolve the build issue now I've fixed the trigger failure? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jthomas commented on issue #101: please add ignore_certs env var
jthomas commented on issue #101: please add ignore_certs env var URL: https://github.com/apache/incubator-openwhisk-client-js/issues/101#issuecomment-372729726 I think having `ignore_certs` as an env param is a valid suggestion. It'll be consistent with setting other properties using env params and doesn't require you to disable cert checking for all hosts using the global node env params. This should be `__OW_IGNORE_CERTS` to be consistent with the other params. @ScottChapman would you be comfortable opening a PR for this? It should be a simple change at https://github.com/apache/incubator-openwhisk-client-js/blob/master/lib/client.js#L64-L72 along with adding this flag to the README. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #2008: Support Default Parameters for Sequences
rabbah commented on issue #2008: Support Default Parameters for Sequences URL: https://github.com/apache/incubator-openwhisk/issues/2008#issuecomment-372726303 help wanted :) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jthomas commented on a change in pull request #99: Add Code Query Parameter
jthomas commented on a change in pull request #99: Add Code Query Parameter URL: https://github.com/apache/incubator-openwhisk-client-js/pull/99#discussion_r174194664 ## File path: test/unit/actions.test.js ## @@ -60,7 +79,7 @@ test('should retrieve action from string identifier', t => { t.is(path, `namespaces/${ns}/actions/12345`) } - return actions.get('12345') Review comment: Did you mean to make this change? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jthomas commented on issue #100: Travis Test Breakage
jthomas commented on issue #100: Travis Test Breakage URL: https://github.com/apache/incubator-openwhisk-client-js/issues/100#issuecomment-372724018 @csantanapr is correct. Fixed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah commented on issue #2220: Ansible error while deploying to distributed environment
rabbah commented on issue #2220: Ansible error while deploying to distributed environment URL: https://github.com/apache/incubator-openwhisk/issues/2220#issuecomment-372719236 @davglass would you consider a kube based deployment? i'm afraid these playbooks are not supported and break from time to time because of a lack of test coverage, and will need to dig into the failure to see what's wrong/how to fix. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] codecov-io commented on issue #102: Fixes #100
codecov-io commented on issue #102: Fixes #100 URL: https://github.com/apache/incubator-openwhisk-client-js/pull/102#issuecomment-372718809 # [Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/102?src=pr=h1) Report > Merging [#102](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/102?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-openwhisk-client-js/commit/de5a0ebdad2c281ed2efc91f54344a89e81a9dd1?src=pr=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/102/graphs/tree.svg?height=150=650=j2mPEx0Tkq=pr)](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/102?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #102 +/- ## === Coverage 99.16% 99.16% === Files 14 14 Lines 361 361 === Hits 358 358 Misses 33 ``` -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/102?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `? = absolute (impact)`, `? = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/102?src=pr=footer). Last update [de5a0eb...61f38d5](https://codecov.io/gh/apache/incubator-openwhisk-client-js/pull/102?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah commented on issue #3249: #3243 - Use gradle scoverage to collect test coverage stats
rabbah commented on issue #3249: #3243 - Use gradle scoverage to collect test coverage stats URL: https://github.com/apache/incubator-openwhisk/pull/3249#issuecomment-372717356 @markusthoemmes @csantanapr bump. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3418: support cleanup of cloudant/kafka trigger dbs
rabbah commented on issue #3418: support cleanup of cloudant/kafka trigger dbs URL: https://github.com/apache/incubator-openwhisk/pull/3418#issuecomment-372714019 Thanks @cbickel for the followup - Really my issue with this method https://github.com/apache/incubator-openwhisk/pull/3418/files#diff-212d21ddb36d91d8394a7e6de713df59R124 Where I think you can solve this by having an additional delimiter argument to the script perhaps. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3418: support cleanup of cloudant/kafka trigger dbs
cbickel commented on issue #3418: support cleanup of cloudant/kafka trigger dbs URL: https://github.com/apache/incubator-openwhisk/pull/3418#issuecomment-372708265 @rabbah We discussed again, and we will move the script somewhere 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] jthomas opened a new pull request #102: Fixes #100
jthomas opened a new pull request #102: Fixes #100 URL: https://github.com/apache/incubator-openwhisk-client-js/pull/102 Hook up test trigger to action with rule to ensure there is an activation record. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] kpavel commented on issue #790: Add support to export binary (zip and jar) actions
kpavel commented on issue #790: Add support to export binary (zip and jar) actions URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/790#issuecomment-372698812 @mrutkows done This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mrutkows opened a new pull request #800: WIP: Display error message for each missing wskprop value.
mrutkows opened a new pull request #800: WIP: Display error message for each missing wskprop value. URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/800 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mrutkows opened a new issue #799: Add i18n err msg in servicedeployer.go, DeployDependencies()
mrutkows opened a new issue #799: Add i18n err msg in servicedeployer.go, DeployDependencies() URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/799 Need an error string added to i18n translated messages/IDs: ``` errMessage := "GitHub dependency " + depName + " has multiple packages in manifest file: " + strings.Join(dependentPackages, ", ") + ". " + "One GitHub dependency can only be associated with single package in manifest file." + "There is no way to reference actions from multiple packages of any GitHub dependencies." return wskderrors.NewYAMLFileFormatError(deployer.ManifestPath, errMessage) ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mrutkows opened a new issue #798: Add i18n string/ID in manifestreader.go, SetSequences()
mrutkows opened a new issue #798: Add i18n string/ID in manifestreader.go, SetSequences() URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/798 hardcoded error string/message needs to be added to translations: ``` if exists == true { // TODO(): i18n of error message (or create a new named error) err := errors.New("Sequence action's name [" + seqAction.Action.Name + "] is already used by an action.") return wskderrors.NewYAMLParserErr(reader.serviceDeployer.ManifestPath, err) } ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mrutkows opened a new issue #797: Add i18n strings for warning messages in InterpolateStringWithEnvVar() function
mrutkows opened a new issue #797: Add i18n strings for warning messages in InterpolateStringWithEnvVar() function URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/797 In environment.go, function InterpolateStringWithEnvVar(): add i18n strings/IDs for: ``` // TODO() i18n wskprint.PrintlnOpenWhiskWarning("Missing Environment Variable " + substr + ".") // TODO() i18n wskprint.PrintlnOpenWhiskWarning("Missing Environment Variable " + substr + ".") ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 a change in pull request #62: [For technical review] Generate release note
houshengbo commented on a change in pull request #62: [For technical review] Generate release note URL: https://github.com/apache/incubator-openwhisk-release/pull/62#discussion_r174159776 ## File path: tools/package_source_code.sh ## @@ -33,5 +33,7 @@ rsync -rtp --exclude .*\* --exclude bin\* --exclude build\* $OPENWHISK_SOURCE_DI for repo in $(echo $repos | sed "s/,/ /g") do repo_name=$(echo "$repo" | sed -e 's/^"//' -e 's/"$//') -cd $OPENWHISK_CLEANED_SOURCE_DIR/$repo_name && tar czf ${CURRENT_VERSION_DIR}/${repo_name}-${version}-sources.tar.gz . +cd $OPENWHISK_CLEANED_SOURCE_DIR/$repo_name Review comment: no need to change this file. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] houshengbo commented on a change in pull request #62: [For technical review] Generate release note
houshengbo commented on a change in pull request #62: [For technical review] Generate release note URL: https://github.com/apache/incubator-openwhisk-release/pull/62#discussion_r174159633 ## File path: tools/download_source_code.sh ## @@ -33,7 +33,7 @@ function git_clone_repo() { git clone --depth $clone_depth -b $BRANCH $REPO $OPENWHISK_SOURCE_DIR/$PROJECT_NAME cd $OPENWHISK_SOURCE_DIR/$PROJECT_NAME git reset --hard $HASH -rm -rf .git +#rm -rf .git Review comment: rm -rf .git can stay here. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] develpr opened a new issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping
develpr opened a new issue #3431: Vagrant provisioning results in SSLV3_ALERT_BAD_CERTIFICATE and failure to ping https://172.17.0.1:10001/ping URL: https://github.com/apache/incubator-openwhisk/issues/3431 ## Environment details: *Vagrant install quick start method used* Host: macOS High Sierra Vagrant: 2.0.2 VirtualBox: 5.2.8 ## Steps to reproduce the issue: 1. clone `https://github.com/apache/incubator-openwhisk` 2. cd `/tools/vagrant` 3. `./hello` *NOTE: as noticed below, I had issues with the base box and the `vagrant` user not being available / created with the base box used.* I got around this by adding just replacing `su vagrant` with `sudo su` to the provisioning script in the `Vagrantfile`. ## Provide the expected results and outputs: I expected the results outlined in the readme / quick start ## Provide the actual results and outputs: There seems to be a failure, I think connecting to CouchDB. Console output: ``` ... snip snip snip... default: default: TASK [controller : create seed nodes list] * default: Tuesday 13 March 2018 14:44:39 + (0:00:00.200) 0:01:13.806 * default: ok: [controller0] => (item=(0, u'172.17.0.1')) default: default: TASK [controller : (re)start controller] *** default: Tuesday 13 March 2018 14:44:39 + (0:00:00.224) 0:01:14.030 * default: changed: [controller0] default: default: TASK [controller : wait until the Controller in this host is up and running] *** default: Tuesday 13 March 2018 14:44:41 + (0:00:01.350) 0:01:15.381 * default: FAILED - RETRYING: wait until the Controller in this host is up and running (12 retries left). default: FAILED - RETRYING: wait until the Controller in this host is up and running (11 retries left). default: FAILED - RETRYING: wait until the Controller in this host is up and running (10 retries left). default: FAILED - RETRYING: wait until the Controller in this host is up and running (9 retries left). default: FAILED - RETRYING: wait until the Controller in this host is up and running (8 retries left). default: FAILED - RETRYING: wait until the Controller in this host is up and running (7 retries left). default: FAILED - RETRYING: wait until the Controller in this host is up and running (6 retries left). default: FAILED - RETRYING: wait until the Controller in this host is up and running (5 retries left). default: FAILED - RETRYING: wait until the Controller in this host is up and running (4 retries left). default: FAILED - RETRYING: wait until the Controller in this host is up and running (3 retries left). default: FAILED - RETRYING: wait until the Controller in this host is up and running (2 retries left). default: FAILED - RETRYING: wait until the Controller in this host is up and running (1 retries left). default: fatal: [controller0]: FAILED! => {"attempts": 12, "changed": false, "content": "", "failed": true, "msg": "Status code was not [200]: Request failed: ", "redirected": false, "status": -1, "url": "https://172.17.0.1:10001/ping"} default: default: Status code was not [200]: Request failed: default: default: PLAY RECAP * default: controller0: ok=20 changed=7unreachable=0 failed=1 default: kafka0 : ok=12 changed=7unreachable=0 failed=0 default: Tuesday 13 March 2018 14:45:44 + (0:01:03.162) 0:02:18.544 * default: === default: controller : wait until the Controller in this host is up and running -- 63.16s default: zookeeper : pull the zookeeper:3.4 image --- 32.15s default: kafka : pull the wurstmeister/kafka:0.11.0.1 image - 20.30s default: zookeeper : wait until the Zookeeper in this host is up and running - 7.31s default: kafka : wait until the kafka server started up -- 5.50s default: controller : (re)start controller --- 1.35s default: controller : copy certificates -- 1.09s default: controller : copy jmxremote password file --- 0.73s default: zookeeper : (re)start zookeeper - 0.70s default: controller : copy nginx certificate keystore 0.66s default: kafka : (re)start kafka
[GitHub] kpavel commented on issue #789: Add assets annotation tags when assets exported
kpavel commented on issue #789: Add assets annotation tags when assets exported URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/789#issuecomment-372691395 @mrutkows the idea is to export all the annotations asset already has, excluding the "MANAGED" annotation. We should omit it to prevent future deployments ambiguity, e.g. user deploys same manifest without --managed on another OW instance. If user deploys it with --manage, it will use managing project name which we already export to the manifest. The MANAGE annotation will be added automatically to the assets in the new deployment. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #795: Rules become inactive
mrutkows closed issue #795: Rules become inactive URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/795 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on a change in pull request #3421: Add ElasticSearch Log Store
dubeejw commented on a change in pull request #3421: Add ElasticSearch Log Store URL: https://github.com/apache/incubator-openwhisk/pull/3421#discussion_r174153522 ## File path: common/scala/src/main/scala/whisk/core/containerpool/logging/ElasticSearchLogStore.scala ## @@ -0,0 +1,138 @@ +/* + * 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.containerpool.logging + +import java.nio.file.{Path, Paths} +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +import akka.actor.ActorSystem +import akka.http.scaladsl.model.HttpRequest +import akka.http.scaladsl.model.Uri +import akka.stream.scaladsl.Flow +import akka.http.scaladsl.model.HttpResponse +import akka.http.scaladsl.model._ + +import whisk.common.AkkaLogging +import whisk.core.entity.{ActivationLogs, Identity, WhiskActivation} +import whisk.core.containerpool.logging.ElasticSearchJsonProtocol._ +import whisk.core.ConfigKeys + +import scala.concurrent.Future +import scala.concurrent.Promise +import scala.util.Try + +import spray.json._ + +import pureconfig._ + +// Schema of logs in ES +case class UserLogEntry(message: String, stream: String, time: String, action: String) + +object UserLogEntry extends DefaultJsonProtocol { + implicit val serdes = +jsonFormat(UserLogEntry.apply, "message", "stream_str", "time_date", "action_str") +} + +case class ElasticSearchLogStoreConfig(protocol: String, + host: String, + port: Int, + logMessageField: String, + activationIdField: String, + requiredHeaders: String) + +/** + * Docker based implementation of a LogStore. + * + * Relies on docker's implementation details with regards to the JSON log-driver. When using the JSON log-driver + * docker writes stdout/stderr to a JSON formatted file which is read by this store. Logs are written in the + * activation record itself. + * + * Additionally writes logs to a separate file which can be processed by any backend service asynchronously. + */ +class ElasticSearchLogStore( + system: ActorSystem, + httpFlow: Option[Flow[(HttpRequest, Promise[HttpResponse]), (Try[HttpResponse], Promise[HttpResponse]), Any]] = None, + destinationDirectory: Path = Paths.get("logs"), + elasticSearchConfig: ElasticSearchLogStoreConfig = +loadConfigOrThrow[ElasticSearchLogStoreConfig](ConfigKeys.elasticSearch)) +extends DockerToActivationFileLogStore(system, destinationDirectory) { + + implicit val actorSystem = system + implicit val logging = new AkkaLogging(system.log) + + private val protocol = elasticSearchConfig.protocol + private val host = elasticSearchConfig.host + private val port = elasticSearchConfig.port + private val logMessageField = elasticSearchConfig.logMessageField + private val activationIdField = elasticSearchConfig.activationIdField + private val requiredHeaders = elasticSearchConfig.requiredHeaders.split(",") + private val esClient = new ElasticSearchRestClient(protocol, host, port, httpFlow) + + private def transcribeLogs(queryResult: EsSearchResult): ActivationLogs = { +val logs = queryResult.hits.hits.map(hit => { + val userLogEntry = hit.source.convertTo[UserLogEntry] + s"${userLogEntry.time} ${userLogEntry.stream}: ${userLogEntry.message.stripLineEnd}" +}) + +ActivationLogs(logs) + } + + private def extractRequiredHeaders(request: HttpRequest) = +request.headers.filter { + case header: HttpHeader if requiredHeaders.contains(header.lowercaseName) => true + case _ => false +}.toList + + private def generatePayload(activation: WhiskActivation) = { +val logQuery = s"_type: $logMessageField AND $activationIdField: ${activation.activationId}" +val queryString = EsQueryString(EsQueryValue(logQuery)) +val sort = Some(Array(EsQueryTimestamp(EsQueryOrder("asc")).toJson)) + +EsQuery(queryString.toJson, sort).toJson.asJsObject + } + + private def generatePath(user: Identity) = { +val date =
[GitHub] kpavel opened a new pull request #796: Resolves #795
kpavel opened a new pull request #796: Resolves #795 URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/796 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] kpavel opened a new issue #795: Rules become inactive
kpavel opened a new issue #795: Rules become inactive URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/795 Consecutive deployments of manifest containing trigger with feed action (and rule) result in inactive rule. The rule seems to become inactive automatically when its trigger get deleted (part of the wskdeploy feed action 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 Services
[GitHub] mrutkows commented on issue #789: Add assets annotation tags when assets exported
mrutkows commented on issue #789: Add assets annotation tags when assets exported URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/789#issuecomment-372685417 @kpavel @pritidesai why would we filter out managed annotations? If they are removed on export, then their usefulness is lost to external tooling (e.g., IDEs) which the managed feature was authored for. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] Param-S commented on a change in pull request #24: Make AdoptOpenJDK Eclipse OpenJ9 the Java runtime for Java actions
Param-S commented on a change in pull request #24: Make AdoptOpenJDK Eclipse OpenJ9 the Java runtime for Java actions URL: https://github.com/apache/incubator-openwhisk-runtime-java/pull/24#discussion_r174123978 ## File path: core/javaAction/Dockerfile ## @@ -1,38 +1,11 @@ -FROM buildpack-deps:trusty-curl - -ENV DEBIAN_FRONTEND noninteractive - -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - Review comment: Thanks @rabbah @csantanapr Restoring the environment variable solved the issue. All checks passed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] Param-S commented on a change in pull request #24: Make AdoptOpenJDK Eclipse OpenJ9 the Java runtime for Java actions
Param-S commented on a change in pull request #24: Make AdoptOpenJDK Eclipse OpenJ9 the Java runtime for Java actions URL: https://github.com/apache/incubator-openwhisk-runtime-java/pull/24#discussion_r174123978 ## File path: core/javaAction/Dockerfile ## @@ -1,38 +1,11 @@ -FROM buildpack-deps:trusty-curl - -ENV DEBIAN_FRONTEND noninteractive - -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - Review comment: Thanks @rabbah @csantanap Restoring the environment variable solved the issue. All checks passed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] csantanapr commented on issue #3420: Add swift:4.1 with Codable to default set of runtimes
csantanapr commented on issue #3420: Add swift:4.1 with Codable to default set of runtimes URL: https://github.com/apache/incubator-openwhisk/pull/3420#issuecomment-372652546 PG4/1469 ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 closed pull request #3424: Send active-ack in any case of a parseable message.
cbickel closed pull request #3424: Send active-ack in any case of a parseable message. URL: https://github.com/apache/incubator-openwhisk/pull/3424 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/common/scala/src/main/scala/whisk/http/ErrorResponse.scala b/common/scala/src/main/scala/whisk/http/ErrorResponse.scala index 0f466d3246..97d2008db9 100644 --- a/common/scala/src/main/scala/whisk/http/ErrorResponse.scala +++ b/common/scala/src/main/scala/whisk/http/ErrorResponse.scala @@ -205,6 +205,8 @@ object Messages { } } + val namespacesBlacklisted = "The action was not invoked due to a blacklisted namespace." + val actionRemovedWhileInvoking = "Action could not be found or may have been deleted." val actionMismatchWhileInvoking = "Action version is not compatible and cannot be invoked." val actionFetchErrorWhileInvoking = "Action could not be fetched." diff --git a/core/invoker/src/main/scala/whisk/core/invoker/InvokerReactive.scala b/core/invoker/src/main/scala/whisk/core/invoker/InvokerReactive.scala index afe0c899e2..0729103a6f 100644 --- a/core/invoker/src/main/scala/whisk/core/invoker/InvokerReactive.scala +++ b/core/invoker/src/main/scala/whisk/core/invoker/InvokerReactive.scala @@ -37,7 +37,7 @@ import whisk.core.entity.size._ import whisk.http.Messages import whisk.spi.SpiLoader -import scala.concurrent.Future +import scala.concurrent.{ExecutionContext, Future} import scala.concurrent.duration._ import scala.util.{Failure, Success} @@ -46,8 +46,8 @@ class InvokerReactive(config: WhiskConfig, instance: InstanceId, producer: Messa logging: Logging) { implicit val materializer: ActorMaterializer = ActorMaterializer() - implicit val ec = actorSystem.dispatcher - implicit val cfg = config + implicit val ec: ExecutionContext = actorSystem.dispatcher + implicit val cfg: WhiskConfig = config private val logsProvider = SpiLoader.get[LogStoreProvider].logStore(actorSystem) logging.info(this, s"LogStoreProvider: ${logsProvider.getClass}") @@ -59,7 +59,7 @@ class InvokerReactive(config: WhiskConfig, instance: InstanceId, producer: Messa * task or actor because further operation does not make sense if something * goes wrong here. Initialization will throw an exception upon failure. */ - val containerFactory = + private val containerFactory = SpiLoader .get[ContainerFactoryProvider] .getContainerFactory( @@ -90,26 +90,26 @@ class InvokerReactive(config: WhiskConfig, instance: InstanceId, producer: Messa } /** Initialize message consumers */ - val topic = s"invoker${instance.toInt}" - val maximumContainers = config.invokerNumCore.toInt * config.invokerCoreShare.toInt - val msgProvider = SpiLoader.get[MessagingProvider] - val consumer = msgProvider.getConsumer( + private val topic = s"invoker${instance.toInt}" + private val maximumContainers = config.invokerNumCore.toInt * config.invokerCoreShare.toInt + private val msgProvider = SpiLoader.get[MessagingProvider] + private val consumer = msgProvider.getConsumer( config, topic, topic, maximumContainers, maxPollInterval = TimeLimit.MAX_DURATION + 1.minute) - val activationFeed = actorSystem.actorOf(Props { + private val activationFeed = actorSystem.actorOf(Props { new MessageFeed("activation", logging, consumer, maximumContainers, 500.milliseconds, processActivationMessage) }) /** Sends an active-ack. */ - val ack = (tid: TransactionId, - activationResult: WhiskActivation, - blockingInvoke: Boolean, - controllerInstance: InstanceId) => { -implicit val transid = tid + private val ack = (tid: TransactionId, + activationResult: WhiskActivation, + blockingInvoke: Boolean, + controllerInstance: InstanceId) => { +implicit val transid: TransactionId = tid def send(res: Either[ActivationId, WhiskActivation], recovery: Boolean = false) = { val msg = CompletionMessage(transid, res, instance) @@ -129,8 +129,8 @@ class InvokerReactive(config: WhiskConfig, instance: InstanceId, producer: Messa } /** Stores an activation in the database. */ - val store = (tid: TransactionId, activation: WhiskActivation) => { -implicit val transid = tid + private val store = (tid: TransactionId, activation: WhiskActivation) => { +implicit val transid: TransactionId = tid logging.debug(this, "recording the activation result to the data store") WhiskActivation.put(activationStore, activation)(tid, notifier = None).andThen { case Success(id) => logging.debug(this, s"recorded activation") @@ -139,18 +139,16 @@ class InvokerReactive(config: WhiskConfig,
[GitHub] markusthoemmes commented on issue #3430: Bump ansible version
markusthoemmes commented on issue #3430: Bump ansible version URL: https://github.com/apache/incubator-openwhisk/pull/3430#issuecomment-372643883 @jonpspri can you elaborate? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services