You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ni...@apache.org on 2022/08/15 04:46:25 UTC
[openwhisk-wskdeploy] branch master updated: Support array result (#1153)
This is an automated email from the ASF dual-hosted git repository.
ningyougang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-wskdeploy.git
The following commit(s) were added to refs/heads/master by this push:
new 520cbbbf Support array result (#1153)
520cbbbf is described below
commit 520cbbbffb6ecc7f99badc24892d27bf1f04b2e3
Author: ningyougang <41...@qq.com>
AuthorDate: Mon Aug 15 12:46:20 2022 +0800
Support array result (#1153)
* Support array result
* Upgrade dependency openwhisk-client-go
* Fix test case failed due to go.15 missed
* Add missing runtime go:1.18
* Use runtime from go1.18 to go1.17
---
cmd/export.go | 14 ++++++++------
go.mod | 2 +-
go.sum | 2 ++
runtimes/runtimes.go | 4 ++--
tests/src/integration/helloworld/manifest.yaml | 2 +-
5 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/cmd/export.go b/cmd/export.go
index aa8ee7da..2290336a 100644
--- a/cmd/export.go
+++ b/cmd/export.go
@@ -244,12 +244,14 @@ func exportProject(projectName string, targetManifest string) error {
if err != nil {
return err
}
- feedConfig := res["config"]
-
- if feedConfig != nil {
- for key, val := range feedConfig.(map[string]interface{}) {
- if key != "startDate" {
- trg.Parameters = trg.Parameters.AddOrReplace(&whisk.KeyValue{Key: key, Value: val})
+ if result, ok := res.(map[string]interface{}); ok {
+ feedConfig := result["config"]
+
+ if feedConfig != nil {
+ for key, val := range feedConfig.(map[string]interface{}) {
+ if key != "startDate" {
+ trg.Parameters = trg.Parameters.AddOrReplace(&whisk.KeyValue{Key: key, Value: val})
+ }
}
}
}
diff --git a/go.mod b/go.mod
index 26048ad2..f169623c 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/apache/openwhisk-wskdeploy
go 1.15
require (
- github.com/apache/openwhisk-client-go v0.0.0-20210311185314-87edc2364717
+ github.com/apache/openwhisk-client-go v0.0.0-20220811044404-a6921af2f086
github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/fatih/color v1.10.0
diff --git a/go.sum b/go.sum
index da677243..96176101 100644
--- a/go.sum
+++ b/go.sum
@@ -18,6 +18,8 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/apache/openwhisk-client-go v0.0.0-20210311185314-87edc2364717 h1:7MsAB3W6JH0d9TZ4UJ55rwV8AR9jXXZf97Uzk+CJqqs=
github.com/apache/openwhisk-client-go v0.0.0-20210311185314-87edc2364717/go.mod h1:SAQU4bHGJ0sg6c1vQ8ojmQKXgGaneVnexWX4+2/KMr8=
+github.com/apache/openwhisk-client-go v0.0.0-20220811044404-a6921af2f086 h1:+JIxWzdw4++XsPA/w9/o+rcLoEiVmTCS2bBedqdDrOA=
+github.com/apache/openwhisk-client-go v0.0.0-20220811044404-a6921af2f086/go.mod h1:SAQU4bHGJ0sg6c1vQ8ojmQKXgGaneVnexWX4+2/KMr8=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
diff --git a/runtimes/runtimes.go b/runtimes/runtimes.go
index 0f9f856b..566feaae 100644
--- a/runtimes/runtimes.go
+++ b/runtimes/runtimes.go
@@ -461,7 +461,7 @@ var RUNTIME_DETAILS = []byte(`{
],
"go": [
{
- "kind": "go:1.15",
+ "kind": "go:1.17",
"default": true,
"deprecated": false,
"attached": {
@@ -470,7 +470,7 @@ var RUNTIME_DETAILS = []byte(`{
},
"image": {
"prefix": "openwhisk",
- "name": "action-golang-v1.11",
+ "name": "action-golang-v1.17",
"tag": "nightly"
}
}
diff --git a/tests/src/integration/helloworld/manifest.yaml b/tests/src/integration/helloworld/manifest.yaml
index 9daab7a5..6f8a526f 100644
--- a/tests/src/integration/helloworld/manifest.yaml
+++ b/tests/src/integration/helloworld/manifest.yaml
@@ -178,7 +178,7 @@ packages:
msg["greeting"] = "Hello, " + name + "!"
return msg
}
- runtime: go:1.15
+ runtime: go:1.17
sequences:
# sequence of helloworld in all four runtimes
hello-world-series: