[GitHub] chetanmeh commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore
chetanmeh commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore URL: https://github.com/apache/incubator-openwhisk/pull/3369#discussion_r172005653 ## File path: common/scala/src/main/resources/application.conf ## @@ -106,6 +106,23 @@ whisk { activations-ddoc = "whisks.v2.1.0" activations-filter-ddoc = "whisks-filters.v2.1.0" } + +# CouchDB related configuration Review comment: The design docs are used by layers above `ArtifactStore` and hence not internal to it. Infact the view names are used for other [custom stores][1] to determine how to frame the queries. So they need to be kept separately [1]: https://github.com/chetanmeh/openwhisk-mongo/blob/master/common/mongo/src/main/scala/whisk/core/database/mongo/MongoViewMapper.scala This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] chetanmeh commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore
chetanmeh commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore URL: https://github.com/apache/incubator-openwhisk/pull/3369#discussion_r172005583 ## File path: tests/src/test/scala/ha/ShootComponentsTests.scala ## @@ -67,13 +70,13 @@ class ShootComponentsTests val controller0DockerHost = WhiskProperties.getBaseControllerHost() val couchDB0DockerHost = WhiskProperties.getBaseDBHost() - val dbProtocol = WhiskProperties.getProperty(WhiskConfig.dbProtocol) + val dbConfig = loadConfigOrThrow[CouchDbConfig](ConfigKeys.couchdb) + val dbProtocol = dbConfig.protocol val dbHostsList = WhiskProperties.getDBHosts - val dbPort = WhiskProperties.getProperty(WhiskConfig.dbPort) - val dbUsername = WhiskProperties.getProperty(WhiskConfig.dbUsername) - val dbPassword = WhiskProperties.getProperty(WhiskConfig.dbPassword) - val dbPrefix = WhiskProperties.getProperty(WhiskConfig.dbPrefix) - val dbWhiskAuth = WhiskProperties.getProperty(WhiskConfig.dbAuths) + val dbPort = dbConfig.port + val dbUsername = dbConfig.username + val dbPassword = dbConfig.password + val dbWhiskAuth = dbConfig.databases.get("WhiskAuth").get Review comment: Problem here is `WhiskAuth` is scoped to `core` package and test lives outside of that package. So need to use the string value explicitly This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370113952 I think I'm ready for review and final merge of this PR This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] csantanapr commented on issue #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370113609 > With now 4.2 announced 4.1 is stable, so skip/remove 4.0 support only do 4.1 for now Going to move this to a new issue https://github.com/apache/incubator-openwhisk-runtime-swift/issues/30 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] csantanapr commented on issue #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370027301 Thanks @jthomas for the review and starting the work to externalize the epilogue in to it's own library/package. >Support @escaping closures to allow users to use with async calls. ``` func _run_main(mainFunction: (In, @escaping (Out?, Error?) -> Void) -> Void) { } ``` This just needs the annotation adding and doesn't affect existing code or people who don't use that. Guess what I have in my TODOs? ### TODOS: - [x] Finish with the Codable test cases - [x] Use `@escaping` instead for the callback - [x] Refresh again with latest 4.1 snapshot - [x] With now 4.2 announced 4.1 is stable, so skip/remove 4.0 support only do 4.1 for now >https://github.com/jthomas/OpenWhiskAction/blob/swift4/Sources/epilogue.swift#L84-L93 This helps the user understand when there has been problems using the Codable API versus something else. I will add the one for more verbose errors ? - [x] Improved error handled to give more descriptive messages, e.g. >Sync method style APIs should probably support throws. This enables uses to use normal error handling to surface issues. I thought about this one, will look into this but probably a different PR since it's an improvement to dictionary sync that we have today. https://github.com/apache/incubator-openwhisk-runtime-swift/issues/29 Super happy that someone is trying this stuff ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #30: Remove Swift 4.0, only support 4.1 and forward
csantanapr opened a new issue #30: Remove Swift 4.0, only support 4.1 and forward URL: https://github.com/apache/incubator-openwhisk-runtime-swift/issues/30 Swift 4.2 is already announce as the next release https://swift.org/blog/4-2-release-process/ I propose we start Swift 4 support with 4.1, and remove Swift 4.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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370113363 Woot ! - [x] Improved error handled to give more descriptive messages, e.g. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370113363 Woot ! - [ ] Improved error handled to give more descriptive messages, e.g. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370027301 Thanks @jthomas for the review and starting the work to externalize the epilogue in to it's own library/package. >Support @escaping closures to allow users to use with async calls. ``` func _run_main(mainFunction: (In, @escaping (Out?, Error?) -> Void) -> Void) { } ``` This just needs the annotation adding and doesn't affect existing code or people who don't use that. Guess what I have in my TODOs? ### TODOS: - [x] Finish with the Codable test cases - [x] Use `@escaping` instead for the callback - [x] Refresh again with latest 4.1 snapshot - [ ] With now 4.2 announced 4.1 is stable, so skip/remove 4.0 support only do 4.1 for now >https://github.com/jthomas/OpenWhiskAction/blob/swift4/Sources/epilogue.swift#L84-L93 This helps the user understand when there has been problems using the Codable API versus something else. I will add the one for more verbose errors ? - [x] Improved error handled to give more descriptive messages, e.g. >Sync method style APIs should probably support throws. This enables uses to use normal error handling to surface issues. I thought about this one, will look into this but probably a different PR since it's an improvement to dictionary sync that we have today. https://github.com/apache/incubator-openwhisk-runtime-swift/issues/29 Super happy that someone is trying this stuff ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #765: WIP: Update deploymentreader.go tests and fix bind logic.
mrutkows opened a new pull request #765: WIP: Update deploymentreader.go tests and fix bind logic. URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/765 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #760: WIP: rewrite deploymentreader_test.go
mrutkows commented on issue #760: WIP: rewrite deploymentreader_test.go URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/760#issuecomment-370108256 Ended up with a big mess of merge conflicts... going to start over. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mrutkows closed pull request #760: WIP: rewrite deploymentreader_test.go
mrutkows closed pull request #760: WIP: rewrite deploymentreader_test.go URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/760 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/deploymentreader.go b/deployers/deploymentreader.go index dd15c8bc..4b331b3f 100644 --- a/deployers/deploymentreader.go +++ b/deployers/deploymentreader.go @@ -18,10 +18,10 @@ package deployers import ( + "fmt" "github.com/apache/incubator-openwhisk-client-go/whisk" "github.com/apache/incubator-openwhisk-wskdeploy/parsers" "github.com/apache/incubator-openwhisk-wskdeploy/utils" - "github.com/apache/incubator-openwhisk-wskdeploy/wskderrors" "github.com/apache/incubator-openwhisk-wskdeploy/wskenv" "github.com/apache/incubator-openwhisk-wskdeploy/wski18n" "github.com/apache/incubator-openwhisk-wskdeploy/wskprint" @@ -46,7 +46,6 @@ func (reader *DeploymentReader) HandleYaml() error { deploymentParser := parsers.NewYAMLParser() deployment, err := deploymentParser.ParseDeployment(dep.DeploymentPath) - reader.DeploymentDescriptor = deployment return err @@ -68,41 +67,58 @@ func (reader *DeploymentReader) BindAssets() error { return nil } -func (reader *DeploymentReader) bindPackageInputsAndAnnotations() error { - +func (reader *DeploymentReader) getPackageMap() map[string]parsers.Package { packMap := make(map[string]parsers.Package) - if reader.DeploymentDescriptor.GetProject().Packages == nil { - if reader.DeploymentDescriptor.Packages != nil { + //fmt.Println(fmt.Sprintf("length[%s]=%v", "packages",len(reader.DeploymentDescriptor.Packages) )) + //fmt.Println(fmt.Sprintf("length[%s]=%v", "application",len(reader.DeploymentDescriptor.Application.Packages) )) + //fmt.Println(fmt.Sprintf("length[%s]=%v", "project.packages",len(reader.DeploymentDescriptor.GetProject().Packages) )) + + // Create local packages list from Deployment file for us to iterate over + // either from top-level or under project schema + if len(reader.DeploymentDescriptor.GetProject().Packages) == 0 { + + if len(reader.DeploymentDescriptor.Packages) > 0 { + wskprint.PrintOpenWhiskVerbose(true, + fmt.Sprintf("Deployment file [%s]: Found top-level packages", + reader.DeploymentDescriptor.Filepath, + reader.DeploymentDescriptor.Filepath)) for packName, depPacks := range reader.DeploymentDescriptor.Packages { depPacks.Packagename = packName packMap[packName] = depPacks } } } else { + wskprint.PrintOpenWhiskVerbose(true, + fmt.Sprintf("Deployment file [%s]: Found packages under project [%s]", + reader.DeploymentDescriptor.Filepath, reader.DeploymentDescriptor.GetProject().Name)) for packName, depPacks := range reader.DeploymentDescriptor.GetProject().Packages { depPacks.Packagename = packName packMap[packName] = depPacks } } + return packMap +} + +func (reader *DeploymentReader) bindPackageInputsAndAnnotations() error { + + // retrieve "packages" list from depl. file; either at top-level or under "Project" schema + packMap := reader.getPackageMap() + for packName, pack := range packMap { serviceDeployPack := reader.serviceDeployer.Deployment.Packages[packName] if serviceDeployPack == nil { - warningString := wski18n.T( - wski18n.ID_ERR_DEPLOYMENT_NAME_NOT_FOUND_X_key_X_name_X, - map[string]interface{}{ - wski18n.KEY_KEY: wski18n.PACKAGE_NAME, - wski18n.KEY_NAME: packName}) - wskprint.PrintlnOpenWhiskWarning(warningString) + displayEntityNotFoundInDeploymentWarning(parsers.YAML_KEY_PACKAGE, packName) break } - keyValArr := make(whisk.KeyValueArr, 0) - if len(pack.Inputs) > 0 { + + keyValArr := make(whisk.KeyValueArr, 0) + for name, input := range pack.Inputs { var keyVal whisk.KeyValue @@ -144,13 +160,7 @@ func (reader *DeploymentReader) bindPackageInputsAndAnnotations() error {
[GitHub] mrutkows closed pull request #764: Deprecating Application in favor of Project
mrutkows closed pull request #764: Deprecating Application in favor of Project URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/764 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/cmd/export.go b/cmd/export.go index c6ea0e33..1cf6a596 100644 --- a/cmd/export.go +++ b/cmd/export.go @@ -275,6 +275,4 @@ func ExportCmdImp(cmd *cobra.Command, args []string) error { func init() { RootCmd.AddCommand(exportCmd) - exportCmd.Flags().StringVarP(&utils.Flags.ProjectPath, "project", "p", ".", "name of the managed project") - exportCmd.Flags().StringVarP(&utils.Flags.ManifestPath, "manifest", "m", "", "path to manifest file to save exported data") } diff --git a/cmd/report.go b/cmd/report.go index c1159e6a..787e16a8 100644 --- a/cmd/report.go +++ b/cmd/report.go @@ -65,16 +65,6 @@ func init() { reportCmd.Flags().StringVarP(&wskpropsPath, "wskproppath", "w", path.Join(os.Getenv("HOME"), ".wskprops"), wski18n.T(wski18n.ID_CMD_FLAG_CONFIG)) - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // reportCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // reportCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") } func printDeploymentInfo(client *whisk.Client) error { diff --git a/cmd/root.go b/cmd/root.go index aeec488c..7225924b 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -39,15 +39,15 @@ import ( var stderr = "" var stdout = "" +// Whisk Deploy has root command: wskdeploy +// wskdeploy is being created using Cobra Library var RootCmd = &cobra.Command{ Use: "wskdeploy", SilenceErrors: true, SilenceUsage: true, Short: wski18n.T(wski18n.ID_CMD_DESC_SHORT_ROOT), Long: wski18n.T(wski18n.ID_CMD_DESC_LONG_ROOT), - // Uncomment the following line if your bare application - // has an action associated with it: - RunE: RootCmdImp, + RunE: RootCmdImp, } func RootCmdImp(cmd *cobra.Command, args []string) error { @@ -106,22 +106,15 @@ func init() { cobra.OnInitialize(initConfig) - // Here you will define your flags and configuration settings. - // Cobra supports Persistent Flags, which, if defined here, - // will be global for your application. - - // TODO(#682) add in-line descriptions to i18n resource file - RootCmd.PersistentFlags().StringVar(&utils.Flags.CfgFile, "config", "", wski18n.T(wski18n.ID_CMD_FLAG_CONFIG)) - // Cobra also supports local flags, which will only run - // when this action is called directly. + // Defining Persistent Flags of Whisk Deploy Root command (wskdeploy) + // Persistent flags are global in terms of its availability and acceptable + // with any other Whisk Deploy command e.g. undeploy, export, etc. // TODO() Publish command, not completed // TODO() Report command, not completed - // TODO() What does toggle do? adding this flag seems to produce an error - // TODO() Why are "project" and "manifest" flags NOT persistent? - RootCmd.Flags().BoolP("toggle", "t", false, wski18n.T(wski18n.ID_CMD_FLAG_TOGGLE_HELP)) - RootCmd.Flags().StringVarP(&utils.Flags.ProjectPath, "project", "p", ".", wski18n.T(wski18n.ID_CMD_FLAG_PROJECT)) - RootCmd.Flags().StringVarP(&utils.Flags.ManifestPath, "manifest", "m", "", wski18n.T(wski18n.ID_CMD_FLAG_MANIFEST)) - RootCmd.Flags().StringVarP(&utils.Flags.DeploymentPath, "deployment", "d", "", wski18n.T(wski18n.ID_CMD_FLAG_DEPLOYMENT)) + RootCmd.PersistentFlags().StringVar(&utils.Flags.CfgFile, "config", "", wski18n.T(wski18n.ID_CMD_FLAG_CONFIG)) + RootCmd.PersistentFlags().StringVarP(&utils.Flags.ProjectPath, "project", "p", ".", wski18n.T(wski18n.ID_CMD_FLAG_PROJECT)) + RootCmd.PersistentFlags().StringVarP(&utils.Flags.ManifestPath, "manifest", "m", "", wski18n.T(wski18n.ID_CMD_FLAG_MANIFEST)) + RootCmd.PersistentFlags().StringVarP(&utils.Flags.DeploymentPath, "deployment", "d", "", wski18n.T(wski18n.ID_CMD_FLAG_DEPLOYMENT)) RootCmd.PersistentFlags().BoolVarP(&utils.Flags.Strict, "strict", "s", false, wski18n.T(wski18n.ID_CMD_FLAG_STRICT)) RootCmd.PersistentFlags().BoolVarP(&utils.Flags.UseInteractive, "allow-interactive", "i", false, wski18n.T(wski18n.ID_CMD_FLAG_INTERACTIVE)) RootCmd.PersistentFlags().BoolVarP(&utils.Flags.Verbose, "verbose", "v", false, wski18n.T(wski18n.ID_C
[GitHub] mrutkows closed issue #696: Deprecate "Application" keyword (in favor of Project)
mrutkows closed issue #696: Deprecate "Application" keyword (in favor of Project) URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/696 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3232: Making prewarm kind (and count) configurable
rabbah commented on issue #3232: Making prewarm kind (and count) configurable URL: https://github.com/apache/incubator-openwhisk/pull/3232#issuecomment-370094992 @hsane2001 can you open an issue to discuss the desired feature. I think the approach here establishes a bit of the foundation to do what you like. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3232: Making prewarm kind (and count) configurable
rabbah commented on a change in pull request #3232: Making prewarm kind (and count) configurable URL: https://github.com/apache/incubator-openwhisk/pull/3232#discussion_r171994225 ## File path: common/scala/src/main/resources/application.conf ## @@ -118,7 +118,11 @@ whisk { bypass-pull-for-local-images = false local-image-prefix = "whisk" } - +# prewarm configuration +prewarm { Review comment: or above under runtimes. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3232: Making prewarm kind (and count) configurable
rabbah commented on a change in pull request #3232: Making prewarm kind (and count) configurable URL: https://github.com/apache/incubator-openwhisk/pull/3232#discussion_r171994035 ## File path: ansible/templates/whisk.properties.j2 ## @@ -35,6 +35,9 @@ whisk.api.vanity.subdomain.parts=1 runtimes.manifest={{ runtimesManifest | to_json }} +prewarm.kind={{ prewarmKind | default('nodejs:6') }} Review comment: @markusthoemmes should we eschew these? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3232: Making prewarm kind (and count) configurable
rabbah commented on a change in pull request #3232: Making prewarm kind (and count) configurable URL: https://github.com/apache/incubator-openwhisk/pull/3232#discussion_r171994178 ## File path: common/scala/src/main/resources/application.conf ## @@ -118,7 +118,11 @@ whisk { bypass-pull-for-local-images = false local-image-prefix = "whisk" } - +# prewarm configuration +prewarm { Review comment: i think we should nest these under `invoker`. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3232: Making prewarm kind (and count) configurable
rabbah commented on a change in pull request #3232: Making prewarm kind (and count) configurable URL: https://github.com/apache/incubator-openwhisk/pull/3232#discussion_r171994115 ## File path: ansible/group_vars/all ## @@ -36,6 +36,11 @@ whisk: # runtimesManifest: "{{ runtimes_manifest | default(lookup('file', '{{ openwhisk_home }}/ansible/files/runtimes.json') | from_json) }}" +## +# Prewarm configuration +prewarmKind: "{{prewarm_kind | default('nodejs:6')}}" Review comment: @markusthoemmes should we include these as examples? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah opened a new issue #3387: Mock database service for unit testing
rabbah opened a new issue #3387: Mock database service for unit testing URL: https://github.com/apache/incubator-openwhisk/issues/3387 Many of our unit tests which need to mock a database operation actually use couch and require a deployment of the couchdb playbook. Instead, we should have a mock library to emulate the db contract and eschew the actual datastore service. As additional SPIs are added for couchbase, mongo, etc, having this canonical library will simplify how we test the other implementations. FYI @chetanmeh This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3366: Adds method deleteAttachments to ArtifactStore
rabbah commented on issue #3366: Adds method deleteAttachments to ArtifactStore URL: https://github.com/apache/incubator-openwhisk/pull/3366#issuecomment-370092106 PG1/2672 ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3353: Fix the TLS issue with the CLI download
csantanapr commented on issue #3353: Fix the TLS issue with the CLI download URL: https://github.com/apache/incubator-openwhisk/pull/3353#issuecomment-370089728 Go ahead and patch it I?m on phone Also I had issues yesterday on my replacement temp Mac and using python3 also fixed it for me. But I like curl to be official solution since it will work in any deployment 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] rabbah commented on issue #3353: Fix the TLS issue with the CLI download
rabbah commented on issue #3353: Fix the TLS issue with the CLI download URL: https://github.com/apache/incubator-openwhisk/pull/3353#issuecomment-370088307 @ddragosd my apologies for not merging this sooner. it looks like the new change to resolve conflicts is ``` git diff diff --git a/ansible/roles/cli/tasks/deploy.yml b/ansible/roles/cli/tasks/deploy.yml index 8591263..76df94a 100644 --- a/ansible/roles/cli/tasks/deploy.yml +++ b/ansible/roles/cli/tasks/deploy.yml @@ -26,10 +26,13 @@ # straightforward. # - name: "Download release archive to build directory ..." - get_url: -url: "{{ openwhisk_cli.remote.location }}/{{ openwhisk_cli.archive_name}}-{{ openwhisk_cli_tag }}-all.tgz" -dest: "{{ openwhisk_build_dir }}/{{ openwhisk_cli.archive_name }}.tgz" -headers: "{{ openwhisk_cli.remote.headers | default('') }}" + local_action: > + shell curl -L "{{ openwhisk_cli.remote.location }}/{{ openwhisk_cli.archive_name}}-{{ openwhisk_cli_tag }}-all.tgz" \ +-o "{{ openwhisk_build_dir }}/{{ openwhisk_cli.archive_name }}.tgz" +# get_url: +#url: "{{ openwhisk_cli.remote.location }}/{{ openwhisk_cli.archive_name}}-{{ openwhisk_cli_tag }}-all.tgz" +#dest: "{{ openwhisk_build_dir }}/{{ openwhisk_cli.archive_name }}.tgz" +#headers: "{{ openwhisk_cli.remote.headers | default('') }}" when: openwhisk_cli.installation_mode == "remote" ``` shall i do it or want to do it? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] markusthoemmes commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore
markusthoemmes commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore URL: https://github.com/apache/incubator-openwhisk/pull/3369#discussion_r171985206 ## File path: tests/src/test/scala/whisk/core/controller/test/ActivationsApiTests.scala ## @@ -526,18 +526,33 @@ class ActivationsApiTests extends ControllerTestCommon with WhiskActivationsApi implicit val materializer = ActorMaterializer() val activationStore = SpiLoader .get[ArtifactStoreProvider] - .makeStore[WhiskEntity](whiskConfig, _.dbActivations)( -classTag[WhiskEntity], -WhiskEntityJsonFormat, + .makeStore[WhiskActivation]()( +classTag[WhiskActivation], +WhiskActivation.serdes, WhiskDocumentReader, system, logging, materializer) implicit val tid = transid() -val entity = BadEntity(namespace, EntityName(ActivationId().toString)) -put(activationStore, entity) -Get(s"$collectionPath/${entity.name}") ~> Route.seal(routes(creds)) ~> check { +class BadActivation(override val namespace: EntityPath, Review comment: Why are these changes needed in this context? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] markusthoemmes commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore
markusthoemmes commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore URL: https://github.com/apache/incubator-openwhisk/pull/3369#discussion_r171985779 ## File path: common/scala/src/main/scala/whisk/core/database/CouchDbStoreProvider.scala ## @@ -21,37 +21,49 @@ import akka.actor.ActorSystem import akka.stream.ActorMaterializer import spray.json.RootJsonFormat import whisk.common.Logging -import whisk.core.WhiskConfig +import whisk.core.ConfigKeys import whisk.core.entity.DocumentReader +import pureconfig._ import scala.reflect.ClassTag +case class CouchDbConfig(provider: String, + protocol: String, + host: String, + port: Int, + username: String, + password: String, + databases: Map[String, String]) { + assume(Set(protocol, host, username, password).forall(_.nonEmpty), "At least one expected property is missing") + + def getDatabaseName(entityClass: Class[_]): String = { Review comment: This is a style type comment: I'd propose a different name/API for this method. In the vein of the `ClassTag` used in `makeStore`, we can use `ClassTag` here as well to make a neat call like `databaseFor[WhiskAuth]`. Proposed diff attached. WDYT? ```diff diff --git a/common/scala/src/main/scala/whisk/core/database/CouchDbStoreProvider.scala b/common/scala/src/main/scala/whisk/core/database/CouchDbStoreProvider.scala index 7e01c828..c10436b5 100644 --- a/common/scala/src/main/scala/whisk/core/database/CouchDbStoreProvider.scala +++ b/common/scala/src/main/scala/whisk/core/database/CouchDbStoreProvider.scala @@ -36,10 +36,11 @@ case class CouchDbConfig(provider: String, databases: Map[String, String]) { assume(Set(protocol, host, username, password).forall(_.nonEmpty), "At least one expected property is missing") - def getDatabaseName(entityClass: Class[_]): String = { -databases.get(entityClass.getSimpleName) match { + def databaseFor[D](implicit tag: ClassTag[D]): String = { +val entityType = tag.runtimeClass.getSimpleName +databases.get(entityType) match { case Some(name) => name - case None => throw new IllegalArgumentException(s"Database name mapping not found for $entityClass") + case None => throw new IllegalArgumentException(s"Database name mapping not found for $entityType") } } } @@ -63,7 +64,7 @@ object CouchDbStoreProvider extends ArtifactStoreProvider { dbConfig.port, dbConfig.username, dbConfig.password, - dbConfig.getDatabaseName(implicitly[ClassTag[D]].runtimeClass), + dbConfig.databaseFor[D], useBatching) } } ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] markusthoemmes commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore
markusthoemmes commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore URL: https://github.com/apache/incubator-openwhisk/pull/3369#discussion_r171985250 ## File path: tests/src/test/scala/ha/ShootComponentsTests.scala ## @@ -67,13 +70,13 @@ class ShootComponentsTests val controller0DockerHost = WhiskProperties.getBaseControllerHost() val couchDB0DockerHost = WhiskProperties.getBaseDBHost() - val dbProtocol = WhiskProperties.getProperty(WhiskConfig.dbProtocol) + val dbConfig = loadConfigOrThrow[CouchDbConfig](ConfigKeys.couchdb) + val dbProtocol = dbConfig.protocol val dbHostsList = WhiskProperties.getDBHosts - val dbPort = WhiskProperties.getProperty(WhiskConfig.dbPort) - val dbUsername = WhiskProperties.getProperty(WhiskConfig.dbUsername) - val dbPassword = WhiskProperties.getProperty(WhiskConfig.dbPassword) - val dbPrefix = WhiskProperties.getProperty(WhiskConfig.dbPrefix) - val dbWhiskAuth = WhiskProperties.getProperty(WhiskConfig.dbAuths) + val dbPort = dbConfig.port + val dbUsername = dbConfig.username + val dbPassword = dbConfig.password + val dbWhiskAuth = dbConfig.databases.get("WhiskAuth").get Review comment: Can this be `dbConfig.databaseFor[WhiskAuth]`? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] markusthoemmes commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore
markusthoemmes commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore URL: https://github.com/apache/incubator-openwhisk/pull/3369#discussion_r171986056 ## File path: common/scala/src/main/resources/application.conf ## @@ -106,6 +106,23 @@ whisk { activations-ddoc = "whisks.v2.1.0" activations-filter-ddoc = "whisks-filters.v2.1.0" } + +# CouchDB related configuration Review comment: How do these settings relate to the design-document settings above? Those are couchdb specific as well, aren't they? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3386: Add PR template.
csantanapr commented on issue #3386: Add PR template. URL: https://github.com/apache/incubator-openwhisk/pull/3386#issuecomment-370079024 ? ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #254: More Resiliency Updates for MessageHub Tests
csantanapr closed pull request #254: More Resiliency Updates for MessageHub Tests URL: https://github.com/apache/incubator-openwhisk-package-kafka/pull/254 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/MessageHubFeedTests.scala b/tests/src/test/scala/system/packages/MessageHubFeedTests.scala index e280e39..9cd1e2f 100644 --- a/tests/src/test/scala/system/packages/MessageHubFeedTests.scala +++ b/tests/src/test/scala/system/packages/MessageHubFeedTests.scala @@ -175,7 +175,7 @@ class MessageHubFeedTests retry({ println("Polling for activations") val activations = wsk.activation.pollFor(N = 1, Some(triggerName), retries = maxRetries) -assert(activations.length == 1) +assert(activations.nonEmpty) val matchingActivations = for { id <- activations @@ -183,7 +183,7 @@ class MessageHubFeedTests if (activation.isRight && activation.right.get.fields.get("response").toString.contains(encodedCurrentTime)) } yield activation.right.get -assert(matchingActivations.length > 0) +assert(matchingActivations.nonEmpty) val activation = matchingActivations.head activation.getFieldPath("response", "success") shouldBe Some(true.toJson) @@ -311,7 +311,7 @@ class MessageHubFeedTests if (activation.isRight && (activation.right.get.fields.get("response").toString.contains(s"first${currentTime}"))) } yield activation.right.get -assert(matchingActivations.length == 0) +assert(matchingActivations.isEmpty) }, N = 3) } @@ -481,7 +481,7 @@ class MessageHubFeedTests retry({ println("Polling for activations") val activations = wsk.activation.pollFor(N = 1, Some(triggerName), since = Some(since), retries = maxRetries) - assert(activations.length == 1) + assert(activations.nonEmpty) println("Validating content of activation(s)") val matchingActivations = for { @@ -490,7 +490,7 @@ class MessageHubFeedTests if (activation.isRight && activation.right.get.fields.get("response").toString.contains(value)) } yield activation.right.get - assert(matchingActivations.length > 0) + assert(matchingActivations.nonEmpty) val activation = matchingActivations.head activation.getFieldPath("response", "success") shouldBe Some(true.toJson) diff --git a/tests/src/test/scala/system/packages/MessageHubProduceTests.scala b/tests/src/test/scala/system/packages/MessageHubProduceTests.scala index 4d2b38c..37a5bd9 100644 --- a/tests/src/test/scala/system/packages/MessageHubProduceTests.scala +++ b/tests/src/test/scala/system/packages/MessageHubProduceTests.scala @@ -209,7 +209,7 @@ class MessageHubProduceTests if (activation.isRight && activation.right.get.fields.get("response").toString.contains(decodedMessage)) } yield activation.right.get -assert(matchingActivations.length > 0) +assert(matchingActivations.nonEmpty) val activation = matchingActivations.head activation.getFieldPath("response", "success") shouldBe Some(true.toJson) @@ -278,7 +278,7 @@ class MessageHubProduceTests if (activation.isRight && activation.right.get.fields.get("response").toString.contains(decodedKey)) } yield activation.right.get -assert(matchingActivations.length > 0) +assert(matchingActivations.nonEmpty) val activation = matchingActivations.head activation.getFieldPath("response", "success") shouldBe Some(true.toJson) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw opened a new pull request #254: More Resiliency Updates for MessageHub Tests
dubeejw opened a new pull request #254: More Resiliency Updates for MessageHub Tests URL: https://github.com/apache/incubator-openwhisk-package-kafka/pull/254 All the tests use the same MessageHub topic, this can result in a test's consumer trigger getting activation records from other tests. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3302: Sanitize test subjects before tests.
dubeejw closed pull request #3302: Sanitize test subjects before tests. URL: https://github.com/apache/incubator-openwhisk/pull/3302 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/common/WskTestHelpers.scala b/tests/src/test/scala/common/WskTestHelpers.scala index 5be175c44b..57a5442ed8 100644 --- a/tests/src/test/scala/common/WskTestHelpers.scala +++ b/tests/src/test/scala/common/WskTestHelpers.scala @@ -31,6 +31,7 @@ import spray.json._ import spray.json.DefaultJsonProtocol._ import TestUtils.RunResult +import TestUtils.SUCCESS_EXIT import TestUtils.CONFLICT import akka.http.scaladsl.model.StatusCodes @@ -287,10 +288,10 @@ trait WskTestHelpers extends Matchers { WskProps(namespace = newUser, authKey = wskadmin.cli(Seq("user", "create", newUser)).stdout.trim) } - def disposeAdditionalTestSubject(subject: String): Unit = { + def disposeAdditionalTestSubject(subject: String, expectedExitCode: Int = SUCCESS_EXIT): Unit = { val wskadmin = new RunWskAdminCmd {} withClue(s"failed to delete temporary subject $subject") { - wskadmin.cli(Seq("user", "delete", subject)).stdout should include("Subject deleted") + wskadmin.cli(Seq("user", "delete", subject), expectedExitCode).stdout should include("Subject deleted") } } } diff --git a/tests/src/test/scala/limits/ThrottleTests.scala b/tests/src/test/scala/limits/ThrottleTests.scala index 9aee3fb6f1..efeb90976d 100644 --- a/tests/src/test/scala/limits/ThrottleTests.scala +++ b/tests/src/test/scala/limits/ThrottleTests.scala @@ -25,14 +25,12 @@ import scala.collection.parallel.immutable.ParSeq import scala.concurrent.Future import scala.concurrent.Promise import scala.concurrent.duration._ - import org.junit.runner.RunWith import org.scalatest.BeforeAndAfterAll import org.scalatest.FlatSpec import org.scalatest.Matchers import org.scalatest.concurrent.ScalaFutures import org.scalatest.junit.JUnitRunner - import common.RunWskAdminCmd import common.TestHelpers import common.TestUtils @@ -48,6 +46,8 @@ import whisk.http.Messages._ import whisk.utils.ExecutionContextFactory import whisk.utils.retry +import scala.util.{Success, Try} + protected[limits] trait LocalHelper { def prefix(msg: String) = msg.substring(0, msg.indexOf('(')) } @@ -298,10 +298,26 @@ class NamespaceSpecificThrottleTests with BeforeAndAfterAll with LocalHelper { + val defaultAction = Some(TestUtils.getTestActionFilename("hello.js")) + val wskadmin = new RunWskAdminCmd {} val wsk = new WskRest - val defaultAction = Some(TestUtils.getTestActionFilename("hello.js")) + def sanitizeNamespaces(namespaces: Seq[String], expectedExitCode: Int = SUCCESS_EXIT): Unit = { +val deletions = namespaces.map { ns => + Try { +disposeAdditionalTestSubject(ns, expectedExitCode) +withClue(s"failed to delete temporary limits for $ns") { + wskadmin.cli(Seq("limits", "delete", ns), expectedExitCode) +} + } +} +if (expectedExitCode == SUCCESS_EXIT) every(deletions) shouldBe a[Success[_]] + } + + sanitizeNamespaces( +Seq("zeroSubject", "zeroConcSubject", "oneSubject", "oneSequenceSubject"), +expectedExitCode = DONTCARE_EXIT) // Create a subject with rate limits == 0 val zeroProps = getAdditionalTestSubject("zeroSubject") @@ -330,13 +346,7 @@ class NamespaceSpecificThrottleTests wskadmin.cli(Seq("limits", "set", oneSequenceProps.namespace, "--invocationsPerMinute", "1", "--firesPerMinute", "1")) override def afterAll() = { -Seq(zeroProps, zeroConcProps, oneProps, oneSequenceProps).foreach { wp => - val ns = wp.namespace - disposeAdditionalTestSubject(ns) - withClue(s"failed to delete temporary limits for $ns") { -wskadmin.cli(Seq("limits", "delete", ns)) - } -} +sanitizeNamespaces(Seq(zeroProps, zeroConcProps, oneProps, oneSequenceProps).map(_.namespace)) } behavior of "Namespace-specific throttles" This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3136: NamespaceSpecificThrottleTests initialization error
dubeejw closed issue #3136: NamespaceSpecificThrottleTests initialization error URL: https://github.com/apache/incubator-openwhisk/issues/3136 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] markusthoemmes commented on issue #3383: Add the license headers
markusthoemmes commented on issue #3383: Add the license headers URL: https://github.com/apache/incubator-openwhisk/pull/3383#issuecomment-370068797 Please add a description, which gives context on why this is needed and link to a relevant issue in the releases repo. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah commented on issue #3348: Allow wskadmin user block/unblock to accept a list of subject to block
rabbah commented on issue #3348: Allow wskadmin user block/unblock to accept a list of subject to block URL: https://github.com/apache/incubator-openwhisk/pull/3348#issuecomment-370068114 > A test would be pretty nice i thought you might say that/ask ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] markusthoemmes closed pull request #3364: Add retries to some entity "update" tests
markusthoemmes closed pull request #3364: Add retries to some entity "update" tests URL: https://github.com/apache/incubator-openwhisk/pull/3364 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tests/src/test/scala/system/basic/WskBasicTests.scala b/tests/src/test/scala/system/basic/WskBasicTests.scala index 1fd93fd79b..9d9b0d6aef 100644 --- a/tests/src/test/scala/system/basic/WskBasicTests.scala +++ b/tests/src/test/scala/system/basic/WskBasicTests.scala @@ -53,6 +53,11 @@ class WskBasicTests extends TestHelpers with WskTestHelpers { */ def withTimestamp(text: String) = s"${text}-${System.currentTimeMillis}" + /** + * Retry operations that need to settle the controller cache + */ + def cacheRetry[T](fn: => T) = whisk.utils.retry(fn, 5, Some(1.second)) + behavior of "Wsk REST" it should "reject creating duplicate entity" in withAssetCleaner(wskprops) { (wp, assetHelper) => @@ -88,9 +93,14 @@ class WskBasicTests extends TestHelpers with WskTestHelpers { pkg.create(name, parameters = params, shared = Some(true)) pkg.create(name, update = true) } -val pack = wsk.pkg.get(name) + +// Add retry to ensure cache with "0.0.1" is replaced +val pack = cacheRetry({ + val p = wsk.pkg.get(name) + p.getField("version") shouldBe "0.0.2" + p +}) pack.getFieldJsValue("publish") shouldBe JsBoolean(true) -pack.getField("version") shouldBe "0.0.2" pack.getFieldJsValue("parameters") shouldBe JsArray(JsObject("key" -> JsString("a"), "value" -> JsString("A"))) val packageList = wsk.pkg.list() val packages = packageList.getBodyListJsObject() @@ -220,10 +230,14 @@ class WskBasicTests extends TestHelpers with WskTestHelpers { action.create(name, None, parameters = Map("b" -> "B".toJson), update = true) } -val action = wsk.action.get(name) +// Add retry to ensure cache with "0.0.1" is replaced +val action = cacheRetry({ + val a = wsk.action.get(name) + a.getField("version") shouldBe "0.0.2" + a +}) action.getFieldJsValue("parameters") shouldBe JsArray(JsObject("key" -> JsString("b"), "value" -> JsString("B"))) action.getFieldJsValue("publish") shouldBe JsBoolean(false) -action.getField("version") shouldBe "0.0.2" val actionList = wsk.action.list() val actions = actionList.getBodyListJsObject() actions.exists(action => RestResult.getField(action, "name") == name) shouldBe true @@ -509,10 +523,14 @@ class WskBasicTests extends TestHelpers with WskTestHelpers { rule.create(name, trigger = triggerName, action = actionName) } -val trigger = wsk.trigger.get(triggerName) +// Add retry to ensure cache with "0.0.1" is replaced +val trigger = cacheRetry({ + val t = wsk.trigger.get(triggerName) + t.getField("version") shouldBe "0.0.2" + t +}) trigger.getFieldJsValue("parameters") shouldBe JsArray(JsObject("key" -> JsString("a"), "value" -> JsString("A"))) trigger.getFieldJsValue("publish") shouldBe JsBoolean(false) -trigger.getField("version") shouldBe "0.0.2" val expectedRules = JsObject( ns + "/" + ruleName -> JsObject( @@ -836,8 +854,12 @@ class WskBasicTests extends TestHelpers with WskTestHelpers { // finally, we perform the update, and expect success this time wsk.rule.create(ruleName, trigger = triggerName, action = actionName, update = true) -val rule = wsk.rule.get(ruleName) -rule.getField("version") shouldBe "0.0.2" +// Add retry to ensure cache with "0.0.1" is replaced +val rule = cacheRetry({ + val r = wsk.rule.get(ruleName) + r.getField("version") shouldBe "0.0.2" + r +}) rule.getField("name") shouldBe ruleName RestResult.getField(rule.getFieldJsObject("trigger"), "name") shouldBe triggerName RestResult.getField(rule.getFieldJsObject("action"), "name") shouldBe actionName This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3348: Allow wskadmin user block/unblock to accept a list of subject to block
rabbah commented on issue #3348: Allow wskadmin user block/unblock to accept a list of subject to block URL: https://github.com/apache/incubator-openwhisk/pull/3348#issuecomment-370068114 > A test would be pretty nice i thought you might say that ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah commented on issue #3302: Sanitize test subjects before tests.
rabbah commented on issue #3302: Sanitize test subjects before tests. URL: https://github.com/apache/incubator-openwhisk/pull/3302#issuecomment-370062337 Thanks @markusthoemmes @dubeejw This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] hsane2001 commented on issue #3232: Making prewarm kind (and count) configurable
hsane2001 commented on issue #3232: Making prewarm kind (and count) configurable URL: https://github.com/apache/incubator-openwhisk/pull/3232#issuecomment-370061135 Hi, Thanks for this change. I am looking to be able to keep prewarmed containers spawned from custom images alive. Currently these come up as kind:blackbox and I cant employ the same method above to keep them warm. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370058906 Woot ! - [x] Use @escaping instead for the callback This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370058906 Woot ! - [ ] Use @escaping instead for the callback This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370058906 Woot ! - [x] Use `@escaping` instead for the callback This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370027301 Thanks @jthomas for the review and starting the work to externalize the epilogue in to it's own library/package. >Support @escaping closures to allow users to use with async calls. ``` func _run_main(mainFunction: (In, @escaping (Out?, Error?) -> Void) -> Void) { } ``` This just needs the annotation adding and doesn't affect existing code or people who don't use that. Guess what I have in my TODOs? ### TODOS: - [x] Finish with the Codable test cases - [x] Use `@escaping` instead for the callback - [x] Refresh again with latest 4.1 snapshot - [ ] With now 4.2 announced 4.1 is stable, so skip/remove 4.0 support only do 4.1 for now >https://github.com/jthomas/OpenWhiskAction/blob/swift4/Sources/epilogue.swift#L84-L93 This helps the user understand when there has been problems using the Codable API versus something else. I will add the one for more verbose errors ? - [ ] Improved error handled to give more descriptive messages, e.g. >Sync method style APIs should probably support throws. This enables uses to use normal error handling to surface issues. I thought about this one, will look into this but probably a different PR since it's an improvement to dictionary sync that we have today. https://github.com/apache/incubator-openwhisk-runtime-swift/issues/29 Super happy that someone is trying this stuff ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370027301 Thanks @jthomas for the review and starting the work to externalize the epilogue in to it's own library/package. >Support @escaping closures to allow users to use with async calls. ``` func _run_main(mainFunction: (In, @escaping (Out?, Error?) -> Void) -> Void) { } ``` This just needs the annotation adding and doesn't affect existing code or people who don't use that. Guess what I have in my TODOs? ### TODOS: - [x] Finish with the Codable test cases - [ ] Use `@escaping` instead for the callback - [x] Refresh again with latest 4.1 snapshot - [ ] With now 4.2 announced 4.1 is stable, so skip/remove 4.0 support only do 4.1 for now >https://github.com/jthomas/OpenWhiskAction/blob/swift4/Sources/epilogue.swift#L84-L93 This helps the user understand when there has been problems using the Codable API versus something else. I will add the one for more verbose errors ? - [ ] Improved error handled to give more descriptive messages, e.g. >Sync method style APIs should probably support throws. This enables uses to use normal error handling to surface issues. I thought about this one, will look into this but probably a different PR since it's an improvement to dictionary sync that we have today. https://github.com/apache/incubator-openwhisk-runtime-swift/issues/29 Super happy that someone is trying this stuff ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370057360 Woot ! - [ ] Refresh again with latest 4.1 snapshot This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370057360 Woot ! - [x] Refresh again with latest 4.1 snapshot This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370057360 Woot ! - [ ] Refresh again with latest 4.1 snapshot This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370056572 Woot ! - [x] Finish with the Codable test cases This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370056572 Woot ! - [ ] Finish with the Codable test cases This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370056572 Woot ! - [ ] Finish with the Codable test cases This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370056572 Woot ! - [ ] Finish with the Codable test cases This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370056572 Woot ! - [x] Finish with the Codable test cases This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370027301 Thanks @jthomas for the review and starting the work to externalize the epilogue in to it's own library/package. >Support @escaping closures to allow users to use with async calls. ``` func _run_main(mainFunction: (In, @escaping (Out?, Error?) -> Void) -> Void) { } ``` This just needs the annotation adding and doesn't affect existing code or people who don't use that. Guess what I have in my TODOs? ### TODOS: - [x] Finish with the Codable test cases - [ ] Use `@escaping` instead for the callback - [ ] Refresh again with latest 4.1 snapshot - [ ] With now 4.2 announced 4.1 is stable, so skip/remove 4.0 support only do 4.1 for now >https://github.com/jthomas/OpenWhiskAction/blob/swift4/Sources/epilogue.swift#L84-L93 This helps the user understand when there has been problems using the Codable API versus something else. I will add the one for more verbose errors ? - [ ] Improved error handled to give more descriptive messages, e.g. >Sync method style APIs should probably support throws. This enables uses to use normal error handling to surface issues. I thought about this one, will look into this but probably a different PR since it's an improvement to dictionary sync that we have today. https://github.com/apache/incubator-openwhisk-runtime-swift/issues/29 Super happy that someone is trying this stuff ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #236: Output URL when creating/updating actions with --web true
dubeejw commented on issue #236: Output URL when creating/updating actions with --web true URL: https://github.com/apache/incubator-openwhisk-cli/issues/236#issuecomment-370053308 @glynnbird, @jthomas, you can use `wsk action get x --url`. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on issue #236: Output URL when creating/updating actions with --web true
dubeejw commented on issue #236: Output URL when creating/updating actions with --web true URL: https://github.com/apache/incubator-openwhisk-cli/issues/236#issuecomment-370053308 @glynnbird, you can use `wsk action get x --url`. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on issue #3302: Sanitize test subjects before tests.
dubeejw commented on issue #3302: Sanitize test subjects before tests. URL: https://github.com/apache/incubator-openwhisk/pull/3302#issuecomment-370035332 PG2 2885 ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3302: Sanitize test subjects before tests.
dubeejw commented on issue #3302: Sanitize test subjects before tests. URL: https://github.com/apache/incubator-openwhisk/pull/3302#issuecomment-370038091 @markusthoemmes, ``` .../open/tests/src/test/scala/limits/ThrottleTests.scala:49: Unused import import scala.util.{Failure, Success, Try} ^ ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on issue #3302: Sanitize test subjects before tests.
dubeejw commented on issue #3302: Sanitize test subjects before tests. URL: https://github.com/apache/incubator-openwhisk/pull/3302#issuecomment-370038091 @markusthoemmes, ``` .../open/tests/src/test/scala/limits/ThrottleTests.scala:49: Unused import import scala.util.{Failure, Success, Try} ^ ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on issue #3302: Sanitize test subjects before tests.
dubeejw commented on issue #3302: Sanitize test subjects before tests. URL: https://github.com/apache/incubator-openwhisk/pull/3302#issuecomment-370038091 @markusthoemmes, ``` .../open/tests/src/test/scala/limits/ThrottleTests.scala:49: Unused import import scala.util.{Failure, Success, Try} ^ ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on issue #3302: Sanitize test subjects before tests.
dubeejw commented on issue #3302: Sanitize test subjects before tests. URL: https://github.com/apache/incubator-openwhisk/pull/3302#issuecomment-370038091 @markusthoemmes, ``` .../open/tests/src/test/scala/limits/ThrottleTests.scala:49: Unused import import scala.util.{Failure, Success, Try} ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] houshengbo closed pull request #280: Use sourceforge on HTTPS
houshengbo closed pull request #280: Use sourceforge on HTTPS URL: https://github.com/apache/incubator-openwhisk-apigateway/pull/280 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3302: Sanitize test subjects before tests.
dubeejw commented on issue #3302: Sanitize test subjects before tests. URL: https://github.com/apache/incubator-openwhisk/pull/3302#issuecomment-369829824 PG2 2883 ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3302: Sanitize test subjects before tests.
dubeejw commented on issue #3302: Sanitize test subjects before tests. URL: https://github.com/apache/incubator-openwhisk/pull/3302#issuecomment-370035332 PG2 2884 ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] markusthoemmes commented on issue #3302: Sanitize test subjects before tests.
markusthoemmes commented on issue #3302: Sanitize test subjects before tests. URL: https://github.com/apache/incubator-openwhisk/pull/3302#issuecomment-370034753 @dubeejw I added a commit and 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 closed pull request #253: Resiliency Updates for MessageHub Tests
csantanapr closed pull request #253: Resiliency Updates for MessageHub Tests URL: https://github.com/apache/incubator-openwhisk-package-kafka/pull/253 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/health/BasicHealthTest.scala b/tests/src/test/scala/system/health/BasicHealthTest.scala index 02183d2..139ed21 100644 --- a/tests/src/test/scala/system/health/BasicHealthTest.scala +++ b/tests/src/test/scala/system/health/BasicHealthTest.scala @@ -141,9 +141,7 @@ class BasicHealthTest } withActivation(wsk.activation, feedCreationResult, initialWait = 5 seconds, totalWait = 60 seconds) { -activation => - // should be successful - activation.response.success shouldBe true +_.response.success shouldBe true } // It takes a moment for the consumer to fully initialize. @@ -280,9 +278,7 @@ class BasicHealthTest } withActivation(wsk.activation, feedCreationResult, initialWait = 5 seconds, totalWait = 60 seconds) { -activation => - // should be successful - activation.response.success shouldBe true +_.response.success shouldBe true } val readRunResult = wsk.action.invoke(actionName, parameters = Map( diff --git a/tests/src/test/scala/system/packages/MessageHubFeedTests.scala b/tests/src/test/scala/system/packages/MessageHubFeedTests.scala index 1fe18a1..e280e39 100644 --- a/tests/src/test/scala/system/packages/MessageHubFeedTests.scala +++ b/tests/src/test/scala/system/packages/MessageHubFeedTests.scala @@ -17,18 +17,21 @@ package system.packages import system.utils.KafkaUtils -import org.apache.kafka.clients.producer.ProducerRecord 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.Inside import org.scalatest.junit.JUnitRunner +import org.apache.kafka.clients.producer.ProducerRecord + import spray.json.DefaultJsonProtocol._ import spray.json._ + import common.JsHelpers import common.TestUtils import common.TestHelpers @@ -36,11 +39,14 @@ import common.Wsk import common.WskActorSystem import common.WskProps import common.WskTestHelpers + import ActionHelper._ + import java.util.Base64 import java.nio.charset.StandardCharsets import java.time.{Clock, Instant} +import whisk.utils.retry @RunWith(classOf[JUnitRunner]) class MessageHubFeedTests @@ -166,28 +172,30 @@ class MessageHubFeedTests _.response.success shouldBe true } - println("Polling for activations") - val activations = wsk.activation.pollFor(N = 1, Some(triggerName), retries = maxRetries) - assert(activations.length == 1) + retry({ +println("Polling for activations") +val activations = wsk.activation.pollFor(N = 1, Some(triggerName), retries = maxRetries) +assert(activations.length == 1) - val matchingActivations = for { -id <- activations -activation = wsk.activation.waitForActivation(id) -if (activation.isRight && activation.right.get.fields.get("response").toString.contains(encodedCurrentTime)) - } yield activation.right.get +val matchingActivations = for { + id <- activations + activation = wsk.activation.waitForActivation(id) + if (activation.isRight && activation.right.get.fields.get("response").toString.contains(encodedCurrentTime)) +} yield activation.right.get - assert(matchingActivations.length == 1) +assert(matchingActivations.length > 0) - val activation = matchingActivations.head - activation.getFieldPath("response", "success") shouldBe Some(true.toJson) +val activation = matchingActivations.head +activation.getFieldPath("response", "success") shouldBe Some(true.toJson) - // assert that there exists a message in the activation which has the expected keys and values - val messages = KafkaUtils.messagesInActivation(activation, field = "value", value = encodedCurrentTime) - assert(messages.length == 1) +// assert that there exists a message in the activation which has the expected keys and values +val messages = KafkaUtils.messagesInActivation(activation, field = "value", value = encodedCurrentTime) +assert(messages.length == 1) - val message = messages.head - message.getFieldPath("topic") shouldBe Some(topic.toJson) - message.getFieldPath("key") shouldBe Some(encodedKey.toJson) +val message = messages.head +message.getFieldPath("topic") shouldBe Some(topic.toJson) +message.g
[GitHub] csantanapr closed pull request #28: Add license headers
csantanapr closed pull request #28: Add license headers URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/28 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/.travis.yml b/.travis.yml index 28f0c12..5f95c61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,19 @@ +# +# 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. +# + sudo: required group: deprecated-2017Q3 language: scala diff --git a/README.md b/README.md index 2ae5780..82dd6f7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,21 @@ + + # Apache OpenWhisk runtimes for swift [![Build Status](https://travis-ci.org/apache/incubator-openwhisk-runtime-swift.svg?branch=master)](https://travis-ci.org/apache/incubator-openwhisk-runtime-swift) diff --git a/core/swift40Action/epilogue.swift b/core/swift40Action/epilogue.swift index 17a4fb3..fcd52d1 100644 --- a/core/swift40Action/epilogue.swift +++ b/core/swift40Action/epilogue.swift @@ -1,3 +1,20 @@ +/* + * 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. + */ + // Imports import Foundation diff --git a/gradle/README.md b/gradle/README.md index 6de4f54..5b83fdb 100644 --- a/gradle/README.md +++ b/gradle/README.md @@ -1,3 +1,21 @@ + + # Gradle Gradle is used to build OpenWhisk. It does not need to be pre-installed as it installs itself using the [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html). To use it without installing, simply invoke the `gradlew` command at the root of the repository. You can also install `gradle` via [`apt`](http://linuxg.net/how-to-install-gradle-2-1-on-ubuntu-14-10-ubuntu-14-04-ubuntu-12-04-and-derivatives/) on Ubuntu or [`brew`](http://www.brewformulas.org/Gradle) on Mac. In the following we use `gradle` and `gradlew` as synonymous. diff --git a/tools/build/compile.sh b/tools/build/compile.sh index 952feeb..08c5523 100755 --- a/tools/build/compile.sh +++ b/tools/build/compile.sh @@ -1,4 +1,21 @@ #!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + set -e if [ -z "$1" ] ; then diff --git a/tools/travis/build.sh b/tools/travis/build.sh index 7f87bbb..2293a54 100755 --- a/tools/travis/build.sh +++ b/tools/travis/build.sh @@ -1,4 +1,21 @@ #!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "Licen
[GitHub] dubeejw closed pull request #229: Travis local cli
dubeejw closed pull request #229: Travis local cli URL: https://github.com/apache/incubator-openwhisk-cli/pull/229 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 67b1ceca..4ee46dcb 100755 --- a/tools/travis/test_openwhisk.sh +++ b/tools/travis/test_openwhisk.sh @@ -68,11 +68,7 @@ $ANSIBLE_CMD couchdb.yml $ANSIBLE_CMD initdb.yml $ANSIBLE_CMD apigateway.yml $ANSIBLE_CMD wipe.yml -$ANSIBLE_CMD openwhisk.yml -e openwhisk_cli_home=$TRAVIS_BUILD_DIR - -# Copy the binary generated into the OPENWHISK_HOME/bin, so that the test cases will run based on it. -mkdir -p $OPENWHISK_HOME/bin -cp -f $TRAVIS_BUILD_DIR/build/wsk $OPENWHISK_HOME/bin +$ANSIBLE_CMD openwhisk.yml -e cli_installation_mode=local -e openwhisk_cli_home=$TRAVIS_BUILD_DIR # 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] dubeejw commented on issue #3302: Sanitize test subjects before tests.
dubeejw commented on issue #3302: Sanitize test subjects before tests. URL: https://github.com/apache/incubator-openwhisk/pull/3302#issuecomment-370027655 @rabbah, needs rebasing for PG. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-370027301 Thanks @jthomas for the review and starting the work to externalize the epilogue in to it's own library/package. >Support @escaping closures to allow users to use with async calls. ``` func _run_main(mainFunction: (In, @escaping (Out?, Error?) -> Void) -> Void) { } ``` This just needs the annotation adding and doesn't affect existing code or people who don't use that. Guess what I have in my TODOs? ### TODOS: - [ ] Finish with the Codable test cases - [ ] Use `@escaping` instead for the callback - [ ] Refresh again with latest 4.1 snapshot - [ ] With now 4.2 announced 4.1 is stable, so skip/remove 4.0 support only do 4.1 for now >https://github.com/jthomas/OpenWhiskAction/blob/swift4/Sources/epilogue.swift#L84-L93 This helps the user understand when there has been problems using the Codable API versus something else. I will add the one for more verbose errors ? - [ ] Improved error handled to give more descriptive messages, e.g. >Sync method style APIs should probably support throws. This enables uses to use normal error handling to surface issues. I thought about this one, will look into this but probably a different PR since it's an improvement to dictionary sync that we have today. https://github.com/apache/incubator-openwhisk-runtime-swift/issues/29 Super happy that someone is trying this stuff ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #29: swift 4.x add support throw and handle as error field in out json
csantanapr opened a new issue #29: swift 4.x add support throw and handle as error field in out json URL: https://github.com/apache/incubator-openwhisk-runtime-swift/issues/29 This is feedback from @jthomas https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-369995988 >Sync method style APIs should probably support throws. This enables uses to use normal error handling to surface issues. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] csantanapr commented on issue #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-365519693 TODOs - [x] Handle when input params is empty - [x] Add tests cases for Codable This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
csantanapr commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-365519693 TODOs - [x] Handle when input params is empty - [ ] Add tests cases for Codable This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mrutkows closed pull request #7: updating manifest files to replace package with packages
mrutkows closed pull request #7: updating manifest files to replace package with packages URL: https://github.com/apache/incubator-openwhisk-test/pull/7 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/packages/hellowhisk/manifest.yaml b/packages/hellowhisk/manifest.yaml index 2ca660e..7e5257d 100644 --- a/packages/hellowhisk/manifest.yaml +++ b/packages/hellowhisk/manifest.yaml @@ -1,9 +1,9 @@ # Test manifest for incubator-openwhisk-wskdeploy utility # See https://github.com/apache/incubator-openwhisk-wskdeploy/tree/master/tests/src/integration/dependency -package: - name: hellowhisk - actions: -greeting: - function: src/greeting.js -httpGet: - function: src/httpGet.swift +packages: +hellowhisk: +actions: +greeting: +function: src/greeting.js +httpGet: +function: src/httpGet.swift diff --git a/packages/helloworlds/manifest.yaml b/packages/helloworlds/manifest.yaml index 098c6af..3460532 100644 --- a/packages/helloworlds/manifest.yaml +++ b/packages/helloworlds/manifest.yaml @@ -1,7 +1,7 @@ -package: - name: helloworlds - actions: -hello-js: - function: src/hello.js -helloworld-js: - function: src/helloworld.js +packages: +helloworlds: +actions: +hello-js: +function: src/hello.js +helloworld-js: +function: src/helloworld.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] dubeejw commented on issue #3302: Sanitize test subjects before tests.
dubeejw commented on issue #3302: Sanitize test subjects before tests. URL: https://github.com/apache/incubator-openwhisk/pull/3302#issuecomment-369829824 PG2 2883 ? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3385: Remove test for included packages in python container.
dubeejw closed pull request #3385: Remove test for included packages in python container. URL: https://github.com/apache/incubator-openwhisk/pull/3385 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/actionContainers/PythonActionContainerTests.scala b/tests/src/test/scala/actionContainers/PythonActionContainerTests.scala index 1e4f1bc480..cb880befaa 100644 --- a/tests/src/test/scala/actionContainers/PythonActionContainerTests.scala +++ b/tests/src/test/scala/actionContainers/PythonActionContainerTests.scala @@ -380,63 +380,4 @@ class PythonActionContainerTests extends BasicActionRunnerTests with WskActorSys e should include("Traceback") }) } - - it should "be able to import additional packages as installed in the image" in { -val (out, err) = withActionContainer() { c => - val code = """ -|from bs4 import BeautifulSoup -|from dateutil.parser import * -|import httplib2 -|from lxml import etree -|import requests -|from scrapy.item import Item, Field -|import simplejson as json -|from twisted.internet import protocol, reactor, endpoints -|import socket -|from kafka import BrokerConnection -| -|def main(args): -|socket.setdefaulttimeout(120) -|b = BeautifulSoup('python action test', 'html.parser') -|h = httplib2.Http().request('https://openwhisk.ng.bluemix.net/api/v1')[0] -|t = parse('2016-02-22 11:59:00 EST') -|r = requests.get('https://openwhisk.ng.bluemix.net/api/v1') -|j = json.dumps({'foo':'bar'}, separators = (',', ':')) -|kafka = BrokerConnection("it works", 9093, None) -| -|return { -| "bs4": str(b.title), -| "httplib2": h.status, -| "dateutil": t.strftime("%A"), -| "lxml": etree.Element("root").tag, -| "json": j, -| "request": r.status_code, -| "kafka_python": kafka.host -|} -""".stripMargin - - val (initCode, _) = c.init(initPayload(code)) - initCode should be(200) - - val (runCode, runRes) = c.run(runPayload(JsObject())) - runCode should be(200) // action writer returning an error is OK - - runRes shouldBe defined - runRes should be( -Some(JsObject( - "bs4" -> "python action test".toJson, - "httplib2" -> 200.toJson, - "dateutil" -> "Monday".toJson, - "lxml" -> "root".toJson, - "json" -> JsObject("foo" -> "bar".toJson).compactPrint.toJson, - "request" -> 200.toJson, - "kafka_python" -> "it works".toJson))) -} - -checkStreams(out, err, { - case (o, e) => -o shouldBe empty -e shouldBe empty -}) - } } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3384: failing test actionContainers.PythonActionContainerTests.python3action should be able to import additional packages as installed in the image
dubeejw closed issue #3384: failing test actionContainers.PythonActionContainerTests.python3action should be able to import additional packages as installed in the image URL: https://github.com/apache/incubator-openwhisk/issues/3384 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #764: Deprecating Application in favor of Project
pritidesai opened a new pull request #764: Deprecating Application in favor of Project URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/764 Closes #696 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mhamann opened a new pull request #280: Use sourceforge on HTTPS
mhamann opened a new pull request #280: Use sourceforge on HTTPS URL: https://github.com/apache/incubator-openwhisk-apigateway/pull/280 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #253: Resiliency Updates for MessageHubProduceTests
dubeejw commented on issue #253: Resiliency Updates for MessageHubProduceTests URL: https://github.com/apache/incubator-openwhisk-package-kafka/pull/253#issuecomment-370007652 @abaruni, can you review? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw opened a new pull request #253: Resiliency Updates for MessageHubProduceTests
dubeejw opened a new pull request #253: Resiliency Updates for MessageHubProduceTests URL: https://github.com/apache/incubator-openwhisk-package-kafka/pull/253 Add retry around polling mechanism for `Post a message with a binary value` and `Post a message with a binary key`. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dubeejw commented on issue #253: Resiliency Updates for MessageHubProduceTests
dubeejw commented on issue #253: Resiliency Updates for MessageHubProduceTests URL: https://github.com/apache/incubator-openwhisk-package-kafka/pull/253#issuecomment-370007652 @abaruni, can you review? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah opened a new pull request #3386: Add PR template.
rabbah opened a new pull request #3386: Add PR template. URL: https://github.com/apache/incubator-openwhisk/pull/3386 Fixes #3376. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #23: Add Codable Support for Swift 4.x
jthomas commented on issue #23: Add Codable Support for Swift 4.x URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/23#issuecomment-369995988 I've been testing out Codable support from the sample above in my library for wrapping Swift actions to produce binaries. https://github.com/jthomas/OpenWhiskAction/blob/swift4/Sources/epilogue.swift It's all working great but I made a few changes to improve the developer experience that we'd probably want to include. Here are the things I found - Support `@escaping` closures to allow users to use with async calls. ``` func _run_main(mainFunction: (In, @escaping (Out?, Error?) -> Void) -> Void) { } ``` This just needs the annotation adding and doesn't affect existing code or people who don't use that. - Improved error handled to give more descriptive messages, e.g. https://github.com/jthomas/OpenWhiskAction/blob/swift4/Sources/epilogue.swift#L84-L93 This helps the user understand when there has been problems using the Codable API versus something else. - Sync method style APIs should probably support throws. This enables uses to use normal error handling to surface issues. I'm away on vacation for a week but will attempt to push a PR when I return. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah opened a new pull request #3385: Remove test for included packages in python container.
rabbah opened a new pull request #3385: Remove test for included packages in python container. URL: https://github.com/apache/incubator-openwhisk/pull/3385 We don't do similar tests for other runtimes and with the separation of the runtimes into their own repos and with fewer packages going forward, I think these tests do not make sense to keep. We should trust that if a package is included, it's usable. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3384: failing test actionContainers.PythonActionContainerTests.python3action should be able to import additional packages as installed in the image
rabbah commented on issue #3384: failing test actionContainers.PythonActionContainerTests.python3action should be able to import additional packages as installed in the image URL: https://github.com/apache/incubator-openwhisk/issues/3384#issuecomment-369988142 ``` File "pythonrunner.py", line 88, in run exec('fun = %s(param)' % self.mainFn, self.global_context) File "", line 1, in File "__main__.py", line 16, in main File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 1322, in request (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey) File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 1072, in _request (response, content) = self._conn_request(conn, request_uri, method, body, headers) File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 995, in _conn_request conn.connect() File "/usr/local/lib/python3.6/http/client.py", line 1392, in connect super().connect() File "/usr/local/lib/python3.6/http/client.py", line 936, in connect (self.host,self.port), self.timeout, self.source_address) File "/usr/local/lib/python3.6/socket.py", line 722, in create_connection raise err File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection sock.connect(sa) ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rabbah opened a new issue #3384: failing test actionContainers.PythonActionContainerTests.python3action should be able to import additional packages as installed in the image
rabbah opened a new issue #3384: failing test actionContainers.PythonActionContainerTests.python3action should be able to import additional packages as installed in the image URL: https://github.com/apache/incubator-openwhisk/issues/3384 ``` org.scalatest.exceptions.TestFailedException: 502 was not equal to 200 Stacktrace org.scalatest.exceptions.TestFailedException: 502 was not equal to 200 at org.scalatest.MatchersHelper$.indicateFailure(MatchersHelper.scala:340) at org.scalatest.Matchers$ShouldMethodHelper$.shouldMatcher(Matchers.scala:6668) at org.scalatest.Matchers$AnyShouldWrapper.should(Matchers.scala:6704) at actionContainers.PythonActionContainerTests$$anonfun$13$$anonfun$27.apply(PythonActionContainerTests.scala:422) at actionContainers.PythonActionContainerTests$$anonfun$13$$anonfun$27.apply(PythonActionContainerTests.scala:385) at actionContainers.ActionContainer$.withContainer(ActionContainer.scala:167) at actionContainers.PythonActionContainerTests.withActionContainer(PythonActionContainerTests.scala:39) at actionContainers.PythonActionContainerTests$$anonfun$13.apply$mcV$sp(PythonActionContainerTests.scala:385) at actionContainers.PythonActionContainerTests$$anonfun$13.apply(PythonActionContainerTests.scala:384) at actionContainers.PythonActionContainerTests$$anonfun$13.apply(PythonActionContainerTests.scala:384) ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] houshengbo opened a new pull request #3383: Add the license headers
houshengbo opened a new pull request #3383: Add the license headers URL: https://github.com/apache/incubator-openwhisk/pull/3383 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] houshengbo opened a new pull request #28: Add license headers
houshengbo opened a new pull request #28: Add license headers URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/28 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3382: Sr db cleanup
rabbah commented on issue #3382: Sr db cleanup URL: https://github.com/apache/incubator-openwhisk/pull/3382#issuecomment-369952540 @lue-kle can you please provide a description for your pull request. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] houshengbo opened a new pull request #23: Add the license headers
houshengbo opened a new pull request #23: Add the license headers URL: https://github.com/apache/incubator-openwhisk-runtime-java/pull/23 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] lue-kle opened a new pull request #3382: Sr db cleanup
lue-kle opened a new pull request #3382: Sr db cleanup URL: https://github.com/apache/incubator-openwhisk/pull/3382 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] houshengbo opened a new pull request #19: Add the license headers
houshengbo opened a new pull request #19: Add the license headers URL: https://github.com/apache/incubator-openwhisk-runtime-docker/pull/19 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] houshengbo opened a new pull request #7: Add the license headers to the files missing them
houshengbo opened a new pull request #7: Add the license headers to the files missing them URL: https://github.com/apache/incubator-openwhisk-runtime-php/pull/7 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3366: Adds method deleteAttachments to ArtifactStore
chetanmeh commented on issue #3366: Adds method deleteAttachments to ArtifactStore URL: https://github.com/apache/incubator-openwhisk/pull/3366#issuecomment-369937404 Updated PR based on review feedback This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] markusthoemmes commented on issue #3381: Transfer-Encoding: chunked causes error
markusthoemmes commented on issue #3381: Transfer-Encoding: chunked causes error URL: https://github.com/apache/incubator-openwhisk/issues/3381#issuecomment-369935363 Should be supportable. This could be a valuable first step for us to get into streaming! We "just" need to make sure the HTTP client used in the invoker supports chunking and takes all the chunks before returning. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] nheidloff opened a new issue #3381: Transfer-Encoding: chunked causes error
nheidloff opened a new issue #3381: Transfer-Encoding: chunked causes error URL: https://github.com/apache/incubator-openwhisk/issues/3381 Hi, I've built a Spring Boot Docker container: https://github.com/nheidloff/openwhisk-debug-java When I use the out of the box Spring functionality to build REST endpoints "Transfer-Encoding: chunked" is returned as header. When the container is deployed to the IBM Cloud I get the following error when invoking it: ?The action did not produce a valid response and exited unexpectedly.? I couldn't find a good way to get Spring Boot not to return this header. Instead I used a workaround/hack where the length of the output is calculated and then set in the content length header which causes the transfer encoding header to disappear. https://github.com/nheidloff/openwhisk-debug-java/blob/master/spring/src/main/java/docker/Function.java#L42 Since someone else ran into the same issue https://github.com/jthomas/ow/issues/2, I'm wondering whether this can be changed on the OpenWhisk side? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jonpspri commented on issue #3363: Ansible image name overrides and bump NGinx to 1.13.9
jonpspri commented on issue #3363: Ansible image name overrides and bump NGinx to 1.13.9 URL: https://github.com/apache/incubator-openwhisk/pull/3363#issuecomment-369925869 I pinned to 1.13.9 to maximize stability. If we pin to 1.13, we're vulnerable to introducing unintended changes in patch releases. I'm happy to back out to just 1.13 if y'all prefer. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3366: Adds method deleteAttachments to ArtifactStore
rabbah commented on a change in pull request #3366: Adds method deleteAttachments to ArtifactStore URL: https://github.com/apache/incubator-openwhisk/pull/3366#discussion_r171841899 ## File path: common/scala/src/main/scala/whisk/core/database/ArtifactStore.scala ## @@ -129,6 +129,11 @@ trait ArtifactStore[DocumentAbstraction] { protected[core] def readAttachment[T](doc: DocInfo, name: String, sink: Sink[ByteString, Future[T]])( implicit transid: TransactionId): Future[(ContentType, T)] + /** + * Deletes an attachments linked to given document + */ + protected[core] def deleteAttachments[T](doc: DocInfo)(implicit transid: TransactionId): Future[Boolean] Review comment: > + * Deletes an attachments linked to given document -> Deletes all attachments linked to a given document. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3366: Adds method deleteAttachments to ArtifactStore
rabbah commented on a change in pull request #3366: Adds method deleteAttachments to ArtifactStore URL: https://github.com/apache/incubator-openwhisk/pull/3366#discussion_r171842936 ## File path: common/scala/src/main/scala/whisk/core/database/CouchDbRestStore.scala ## @@ -456,6 +456,11 @@ class CouchDbRestStore[DocumentAbstraction <: DocumentSerializer](dbProtocol: St ErrorLevel)) } + override protected[core] def deleteAttachments[T](doc: DocInfo)(implicit transid: TransactionId): Future[Boolean] = +//For CouchDB attachments lifecycle is tied to document. So if the Review comment: I prefer a stronger warning here: ``` // NOTE: this method is not intended for standalone use for CouchDB. // To delete attachments, it is expected that the entire document is deleted. ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mdeuser opened a new issue #237: API with back-to-back path parameters fails
mdeuser opened a new issue #237: API with back-to-back path parameters fails URL: https://github.com/apache/incubator-openwhisk-cli/issues/237 Creating an API with multiple back-to-back path parameters fails ``` >bx wsk api create /dumpurl /two/{segment1}/{segment2} get showPathSegs --response-type http error: Unable to create API: API creation failure: The parameter 'segment2' defined in path '/two/{segment1}/{segment2}' does not match any of the parameters defined for the path in the swagger file. ``` Multiple paths separated by a non-parameter path segment work correctly ``` >bx wsk api create /dumpurl /two/{segment1}/and/{segment2} get showPathSegs --response-type http ok: created API /dumpurl/two/{segment1}/and/{segment2} GET for action /_/showPathSegs https://service.us.apiconnect.ibmcloud.com/gws/apigateway/api/XX/dumpurl/two/{segment1}/and/{segment2} ``` Fix is needed for the following 1. Support back-to-back path segments 2. Error message in the context of the failing command does not make sense... that is, no swagger file was specified in the command, yet the error message indicates that a swagger file is in error. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to 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 #3366: Adds method deleteAttachments to ArtifactStore
chetanmeh commented on issue #3366: Adds method deleteAttachments to ArtifactStore URL: https://github.com/apache/incubator-openwhisk/pull/3366#issuecomment-369909376 @dubeejw Can you share your feedback 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