Skip to content

Commit f4f94e7

Browse files
authored
Update openwhisk-client-go to release 1.1.0 as well as other pkg dependencies (#1124)
* Update openwhisk-client-go to release 1.1.0 as well as other pkg dependencies * Update go-colorable to v1.10 * Update go-querystring, go-prettyjson to latest * Update magiconair/properties, pelletier/go-toml, spf13/viper and its deps. * Update go-18n to latest 1.x version, Do not adopt 2.0 in this PR * Update goi18n to 1.10.1, ginkgo to 1.15.0, cobra to 1.1.3 * Update testify to 1.7.1 and tidy up * Update DEPENDENCIES.md file
1 parent 07217e2 commit f4f94e7

File tree

4 files changed

+408
-93
lines changed

4 files changed

+408
-93
lines changed

DEPENDENCIES.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,16 @@
1919

2020
# Library dependencies for openwhisk-wskdeploy tool
2121

22-
Like other open source projects, openwhisk-wskdeploy is dependent on open source libraries, we
23-
list them here to assure that all code dependencies have Apache 2.0 compatible licenses.
22+
Like other open source projects, openwhisk-wskdeploy is dependent on open source libraries. The full list of direct dependencies is viewable in the Go module [go.mod](go.mod) file. Of those dependencies, some have Apache 2.0 compatible licenses which we make note of here:
2423

2524
| Library name | Licenses Type | License/Project Link |
2625
| ------| ------ | ------ |
27-
| jibber_jabber | Apache 2.0 | https://github.com/cloudfoundry-attic/jibber_jabber |
28-
| color | MIT | https://github.com/fatih/color |
29-
26+
| jibber_jabber | Apache 2.0 | [https://github.com/cloudfoundry-attic/jibber_jabber/blob/master/LICENSE](https://github.com/cloudfoundry-attic/jibber_jabber/blob/master/LICENSE) |
27+
| color | MIT | [https://github.com/fatih/color/blob/master/LICENSE.md](https://github.com/fatih/color/blob/master/LICENSE.md) |
3028

3129
# Library dependencies for unit and integration testing
3230

3331
| Library name | Licenses Type | License/Project Link |
3432
| ------| ------ | ------ |
35-
| Testify | ad-hoc (Liberal)| [https://github.com/stretchr/testify/blob/master/LICENCE.txt](https://github.com/stretchr/testify/blob/master/LICENCE.txt) |
33+
| Testify | MIT | [https://github.com/stretchr/testify/blob/master/LICENSE](https://github.com/stretchr/testify/blob/master/LICENSE) |
3634
| Viper | MIT | [https://github.com/spf13/viper/blob/master/LICENSE](https://github.com/spf13/viper/blob/master/LICENSE) |

README.md

+35-26
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Here are some quick links to help you get started:
6262
## Downloading released binaries
6363

6464
Executable binaries of `wskdeploy` are available for download on the project's GitHub [releases](https://github.com/apache/openwhisk-wskdeploy/releases) page:
65+
6566
- [https://github.com/apache/openwhisk-wskdeploy/releases](https://github.com/apache/openwhisk-wskdeploy/releases).
6667
6768
We currently provide binaries for the following Operating Systems (OS) and architecture combinations:
@@ -220,7 +221,6 @@ gradle -version
220221

221222
> **Note** If using your own local Gradle installation, use the `gradle` command instead of the `./gradlew` command in the build instructions below.
222223

223-
224224
#### Building for internationalization
225225

226226
Please follow this process for building any changes to translatable strings:
@@ -273,6 +273,25 @@ $ go run main.go -m tests/usecases/triggerrule/manifest.yml -d tests/usecases/tr
273273

274274
> Be sure to [Sync your fork](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork) before starting any contributions to keep it up-to-date with the upstream repository.
275275

276+
### Running unit tests
277+
278+
You may use `go test` to test all unit tests within a package, for example:
279+
280+
```sh
281+
go test ./deployers -tags=unit -v
282+
go test ./parsers -tags=unit -v
283+
```
284+
285+
or to run individual function tests, for example:
286+
287+
```sh
288+
go test ./parsers -tags=unit -v -run TestParseManifestForSingleLineParams
289+
```
290+
291+
### Running integration tests
292+
293+
Integration tests are best left to the Travis CI build as they depend on a fully functional OpenWhisk environment to be deployed.
294+
276295
### Adding new dependencies
277296

278297
Please use `go get` to add new dependencies to the `go.mod` file:
@@ -295,22 +314,10 @@ go mod tidy
295314

296315
Although you might be tempted to edit the go.mod file directly, please use the recommended method of using the `go get` command:
297316

298-
Using "latest" version:
299-
300-
```sh
301-
go get github.com/project/libname
302-
```
303-
304-
Using a release tag:
305-
306-
```sah
307-
go get github.com/project/[email protected]
308-
```
309-
310-
Using a commit hash:
311-
312317
```sh
313-
go get github.com/project/libname@aee5cab1c
318+
go get -u github.com/project/libname # Using "latest" version
319+
go get -u github.com/project/[email protected] # Using tagged version
320+
go get -u github.com/project/libname@aee5cab1c # Using a commit hash
314321
```
315322

316323
### Updating Go version
@@ -336,18 +343,20 @@ Committers can find instructions on how to create tagged releases here:
336343

337344
The "go get" command uses HTTPS with GitHub and when you attempt to "commit" code you might be prompted with your GitHub credentials. If you wish to use your SSH credentials, you may need to issue the following command to set the appropriate URL for your "origin" fork:
338345

339-
```
346+
```sh
340347
git remote set-url origin [email protected]:<username>/openwhisk-wskdeploy.git
341348
```
342349

343-
<or> you can manually change the remote (origin) url within your .git/config file:
344-
```
350+
or you can manually change the remote (origin) url within your .git/config file:
351+
352+
```sh
345353
[remote "origin"]
346354
url = [email protected]:<username>/openwhisk-wskdeploy
347355
```
348356

349357
while there, you can verify that your upstream repository is set correctly:
350-
```
358+
359+
```sh
351360
[remote "upstream"]
352361
url = [email protected]:apache/openwhisk-wskdeploy
353362
```
@@ -356,16 +365,16 @@ while there, you can verify that your upstream repository is set correctly:
356365

357366
This sometimes occurs using "go get" the wskdeploy code (which indirectly invokes "git clone").
358367

359-
<b>Note: Using "go get" for development is unsupported; instead, please use "go deps" for dependency management.</b>
360-
361368
You might get this error when downloading `openwhisk-wskdeploy`:
362369

363-
Cloning into ''$GOAPTH/src/gopkg.in/yaml.v2'...
364-
error: RPC failed; HTTP 301 curl 22 The requested URL returned error: 301
365-
fatal: The remote end hung up unexpectedly
370+
```sh
371+
Cloning into ''$GOAPTH/src/gopkg.in/yaml.v2'...
372+
error: RPC failed; HTTP 301 curl 22 The requested URL returned error: 301
373+
fatal: The remote end hung up unexpectedly
374+
```
366375
367376
This is caused by newer `git` versions not forwarding requests anymore. One solution is to allow forwarding for `gopkg.in`
368377
369-
```
378+
```sh
370379
$ git config --global http.https://gopkg.in.followRedirects true
371380
```

go.mod

+21-22
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,28 @@ module github.com/apache/openwhisk-wskdeploy
33
go 1.14
44

55
require (
6-
github.com/apache/openwhisk-client-go v0.0.0-20191018191012-ee5b8709787c
6+
github.com/apache/openwhisk-client-go v0.0.0-20200927152356-49c58e00354d
77
github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21
8-
github.com/fatih/color v1.5.0
8+
github.com/fatih/color v1.10.0
99
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
10-
github.com/google/go-querystring v0.0.0-20160401233042-9235644dd9e5 // indirect
11-
github.com/hashicorp/hcl v0.0.0-20161109000027-973f376f0e7c // indirect
12-
github.com/hokaccha/go-prettyjson v0.0.0-20141201065330-f75235bd99da
13-
github.com/inconshreveable/mousetrap v1.0.0 // indirect
14-
github.com/magiconair/properties v1.7.1-0.20160908093658-0723e352fa35 // indirect
15-
github.com/mattn/go-colorable v0.0.7
16-
github.com/mattn/go-isatty v0.0.12 // indirect
17-
github.com/mitchellh/mapstructure v0.0.0-20161020161836-f3009df150da // indirect
18-
github.com/nicksnyder/go-i18n v1.6.1-0.20161107021609-991e81cc94f6
19-
github.com/onsi/ginkgo v1.14.0 // indirect
20-
github.com/pelletier/go-buffruneio v0.1.0 // indirect
21-
github.com/pelletier/go-toml v0.3.6-0.20160920070715-45932ad32dfd // indirect
22-
github.com/spf13/afero v0.0.0-20161109000953-06b7e5f50606 // indirect
23-
github.com/spf13/cast v0.0.0-20160926084249-2580bc98dc0e // indirect
24-
github.com/spf13/cobra v0.0.0-20161026012826-6e91dded25d7
25-
github.com/spf13/jwalterweatherman v0.0.0-20160311093646-33c24e77fb80 // indirect
26-
github.com/spf13/pflag v0.0.0-20161024131444-5ccb023bc27d // indirect
27-
github.com/spf13/viper v0.0.0-20161029213352-651d9d916abc
10+
github.com/google/go-querystring v1.0.0 // indirect
11+
github.com/hokaccha/go-prettyjson v0.0.0-20210113012101-fb4e108d2519
12+
github.com/magiconair/properties v1.8.4 // indirect
13+
github.com/mattn/go-colorable v0.1.8
14+
github.com/mitchellh/mapstructure v1.4.1 // indirect
15+
github.com/nicksnyder/go-i18n v1.10.1
16+
github.com/nxadm/tail v1.4.8 // indirect
17+
github.com/onsi/ginkgo v1.15.0 // indirect
18+
github.com/pelletier/go-toml v1.8.1 // indirect
19+
github.com/spf13/afero v1.5.1 // indirect
20+
github.com/spf13/cast v1.3.1 // indirect
21+
github.com/spf13/cobra v1.1.3
22+
github.com/spf13/jwalterweatherman v1.1.0 // indirect
23+
github.com/spf13/viper v1.7.1
2824
github.com/stretchr/testify v1.6.1
29-
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed // indirect
30-
gopkg.in/yaml.v2 v2.3.0
25+
golang.org/x/sys v0.0.0-20210304203436-1243437a8ec7 // indirect
26+
golang.org/x/text v0.3.5 // indirect
27+
gopkg.in/ini.v1 v1.62.0 // indirect
28+
gopkg.in/yaml.v2 v2.4.0
29+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
3130
)

0 commit comments

Comments
 (0)