Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update openwhisk-client-go to release 1.1.0 as well as other pkg dependencies #1124

Merged
merged 8 commits into from
Mar 5, 2021
10 changes: 4 additions & 6 deletions DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,16 @@

# Library dependencies for openwhisk-wskdeploy tool

Like other open source projects, openwhisk-wskdeploy is dependent on open source libraries, we
list them here to assure that all code dependencies have Apache 2.0 compatible licenses.
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:

| Library name | Licenses Type | License/Project Link |
| ------| ------ | ------ |
| jibber_jabber | Apache 2.0 | https://github.com/cloudfoundry-attic/jibber_jabber |
| color | MIT | https://github.com/fatih/color |

| 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) |
| color | MIT | [https://github.com/fatih/color/blob/master/LICENSE.md](https://github.com/fatih/color/blob/master/LICENSE.md) |

# Library dependencies for unit and integration testing

| Library name | Licenses Type | License/Project Link |
| ------| ------ | ------ |
| Testify | ad-hoc (Liberal)| [https://github.com/stretchr/testify/blob/master/LICENCE.txt](https://github.com/stretchr/testify/blob/master/LICENCE.txt) |
| Testify | MIT | [https://github.com/stretchr/testify/blob/master/LICENSE](https://github.com/stretchr/testify/blob/master/LICENSE) |
| Viper | MIT | [https://github.com/spf13/viper/blob/master/LICENSE](https://github.com/spf13/viper/blob/master/LICENSE) |
61 changes: 35 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Here are some quick links to help you get started:
## Downloading released binaries

Executable binaries of `wskdeploy` are available for download on the project's GitHub [releases](https://github.com/apache/openwhisk-wskdeploy/releases) page:

- [https://github.com/apache/openwhisk-wskdeploy/releases](https://github.com/apache/openwhisk-wskdeploy/releases).

We currently provide binaries for the following Operating Systems (OS) and architecture combinations:
Expand Down Expand Up @@ -220,7 +221,6 @@ gradle -version

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


#### Building for internationalization

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

> 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.

### Running unit tests

You may use `go test` to test all unit tests within a package, for example:

```sh
go test ./deployers -tags=unit -v
go test ./parsers -tags=unit -v
```

or to run individual function tests, for example:

```sh
go test ./parsers -tags=unit -v -run TestParseManifestForSingleLineParams
```

### Running integration tests

Integration tests are best left to the Travis CI build as they depend on a fully functional OpenWhisk environment to be deployed.

### Adding new dependencies

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

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

Using "latest" version:

```sh
go get github.com/project/libname
```

Using a release tag:

```sah
go get github.com/project/[email protected]
```

Using a commit hash:

```sh
go get github.com/project/libname@aee5cab1c
go get -u github.com/project/libname # Using "latest" version
go get -u github.com/project/[email protected] # Using tagged version
go get -u github.com/project/libname@aee5cab1c # Using a commit hash
```

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

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:

```
```sh
git remote set-url origin [email protected]:<username>/openwhisk-wskdeploy.git
```

<or> you can manually change the remote (origin) url within your .git/config file:
```
or you can manually change the remote (origin) url within your .git/config file:

```sh
[remote "origin"]
url = [email protected]:<username>/openwhisk-wskdeploy
```

while there, you can verify that your upstream repository is set correctly:
```

```sh
[remote "upstream"]
url = [email protected]:apache/openwhisk-wskdeploy
```
Expand All @@ -356,16 +365,16 @@ while there, you can verify that your upstream repository is set correctly:

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

<b>Note: Using "go get" for development is unsupported; instead, please use "go deps" for dependency management.</b>

You might get this error when downloading `openwhisk-wskdeploy`:

Cloning into ''$GOAPTH/src/gopkg.in/yaml.v2'...
error: RPC failed; HTTP 301 curl 22 The requested URL returned error: 301
fatal: The remote end hung up unexpectedly
```sh
Cloning into ''$GOAPTH/src/gopkg.in/yaml.v2'...
error: RPC failed; HTTP 301 curl 22 The requested URL returned error: 301
fatal: The remote end hung up unexpectedly
```

This is caused by newer `git` versions not forwarding requests anymore. One solution is to allow forwarding for `gopkg.in`

```
```sh
$ git config --global http.https://gopkg.in.followRedirects true
```
43 changes: 21 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@ module github.com/apache/openwhisk-wskdeploy
go 1.14

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