Repository: calcite-avatica-go Updated Branches: refs/heads/master 334bc15f9 -> 7a9ac43d1
[CALCITE-2335] Add support for Go modules and test against Go 1.11 Project: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/repo Commit: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/commit/7a9ac43d Tree: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/tree/7a9ac43d Diff: http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/diff/7a9ac43d Branch: refs/heads/master Commit: 7a9ac43d109f72f98fa0a46cd7e62b09cb029530 Parents: 334bc15 Author: Francis Chuang <francischu...@apache.org> Authored: Tue Aug 28 20:25:20 2018 +1000 Committer: francis Chuang <francischu...@apache.org> Committed: Tue Aug 28 20:46:24 2018 +1000 ---------------------------------------------------------------------- .travis.yml | 11 ++++++++--- Dockerfile | 6 ++---- go.mod | 20 ++++++++++++++++++++ go.sum | 32 ++++++++++++++++++++++++++++++++ moby.yml | 9 +++++---- site/develop/avatica-go.md | 11 ++++++----- 6 files changed, 73 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/blob/7a9ac43d/.travis.yml ---------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml index f254ee6..37d8327 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,8 +25,8 @@ branches: - /^[0-9]+-.*$/ go: + - "1.11.x" - "1.10.x" - - "1.9.x" sudo: required services: @@ -36,14 +36,17 @@ env: global: - PHOENIX_HOST=http://localhost:8765 - HSQLDB_HOST=http://localhost:8765 + - GO111MODULE=on matrix: - AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.3-4.13 - AVATICA_FLAVOR=PHOENIX IMAGE=boostport/hbase-phoenix-all-in-one:1.4-4.14 - AVATICA_FLAVOR=HSQLDB IMAGE=f21global/calcite-avatica:1.11.0-hypersql before_install: - - go get -u github.com/golang/dep/cmd/dep - - dep ensure -v + - if [ $TRAVIS_GO_VERSION == "1.10.x" ]; then + go get -u github.com/golang/dep/cmd/dep; + dep ensure -v; + fi - if [ $AVATICA_FLAVOR == "PHOENIX" ]; then docker pull $IMAGE; docker run -d -p 8765:8765 $IMAGE; @@ -58,4 +61,6 @@ script: git: depth: 10000 + +install: true # End .travis.yml http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/blob/7a9ac43d/Dockerfile ---------------------------------------------------------------------- diff --git a/Dockerfile b/Dockerfile index 7b6447c..0972007 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,10 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.10-alpine +FROM golang:1.11-alpine WORKDIR /go/src/github.com/apache/calcite-avatica-go COPY . . -RUN apk --no-cache --update add git \ - && go get -u github.com/golang/dep/cmd/dep \ - && dep ensure -v \ No newline at end of file +RUN apk --no-cache --no-progress add build-base git \ No newline at end of file http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/blob/7a9ac43d/go.mod ---------------------------------------------------------------------- diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..1a492e6 --- /dev/null +++ b/go.mod @@ -0,0 +1,20 @@ +module github.com/apache/calcite-avatica-go/v2 + +require ( + github.com/apache/calcite-avatica-go v0.0.0-20180828061053-334bc15f92dd + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/golang/protobuf v1.2.0 + github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036 + github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/testify v1.2.2 // indirect + github.com/xinsnake/go-http-digest-auth-client v0.4.0 + golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac // indirect + golang.org/x/net v0.0.0-20180826012351-8a410e7b638d + golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect + gopkg.in/jcmturner/aescts.v1 v1.0.1 // indirect + gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect + gopkg.in/jcmturner/goidentity.v2 v2.0.0 // indirect + gopkg.in/jcmturner/gokrb5.v5 v5.3.0 + gopkg.in/jcmturner/rpc.v0 v0.0.2 // indirect +) http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/blob/7a9ac43d/go.sum ---------------------------------------------------------------------- diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..a6e54de --- /dev/null +++ b/go.sum @@ -0,0 +1,32 @@ +github.com/apache/calcite-avatica-go v0.0.0-20180828061053-334bc15f92dd h1:ZmBBxxLj+5URnaKdsFMl3Ocio0EZzhR4VjhTCt84+K0= +github.com/apache/calcite-avatica-go v0.0.0-20180828061053-334bc15f92dd/go.mod h1:59/gBt2tv0uPvjYIlkdXkOgkD0w/6JGZEQiqt+97ang= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036 h1:d8T6WIONl4rMCPcQ/eY3uSz3+e4/GaoflKjXrWMex1U= +github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930 h1:v4CYlQ+HeysPHsr2QFiEO60gKqnvn1xwvuKhhAhuEkk= +github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/xinsnake/go-http-digest-auth-client v0.4.0 h1:tTaEBUSDiMi7RDIuj0fy/pszIub8g2DmLjTelB3/3Tk= +github.com/xinsnake/go-http-digest-auth-client v0.4.0/go.mod h1:QK1t1v7ylyGb363vGWu+6Irh7gyFj+N7+UZzM0L6g8I= +golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac h1:7d7lG9fHOLdL6jZPtnV4LpI41SbohIJ1Atq7U991dMg= +golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d h1:g9qWBGx4puODJTMVyoPrpoxPFgVGd+z1DZwjfRu4d0I= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= +gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= +gopkg.in/jcmturner/goidentity.v2 v2.0.0 h1:6Bmcdaxb0dD3HyHbo/MtJ2Q1wXLDuZJFwXZmuZvM+zw= +gopkg.in/jcmturner/goidentity.v2 v2.0.0/go.mod h1:vCwK9HeXksMeUmQ4SxDd1tRz4LejrKh3KRVjQWhjvZI= +gopkg.in/jcmturner/gokrb5.v5 v5.3.0 h1:RS1MYApX27Hx1Xw7NECs7XxGxxrm69/4OmaRuX9kwec= +gopkg.in/jcmturner/gokrb5.v5 v5.3.0/go.mod h1:oQz8Wc5GsctOTgCVyKad1Vw4TCWz5G6gfIQr88RPv4k= +gopkg.in/jcmturner/rpc.v0 v0.0.2 h1:wBTgrbL1qmLBUPsYVCqdJiI5aJgQhexmK+JkTHPUNJI= +gopkg.in/jcmturner/rpc.v0 v0.0.2/go.mod h1:NzMq6cRzR9lipgw7WxRBHNx5N8SifBuaCQsOT1kWY/E= http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/blob/7a9ac43d/moby.yml ---------------------------------------------------------------------- diff --git a/moby.yml b/moby.yml index 0e3c5ee..62b4452 100644 --- a/moby.yml +++ b/moby.yml @@ -24,19 +24,20 @@ services: - "8765" dev: - image: golang:1.10-alpine + image: golang:1.11-alpine env: PHOENIX_HOST: http://phoenix:8765 HSQLDB_HOST: http://hsqldb:8765 + steps: - type: script - name: Set up workspace + name: Install build tools and git options: - command: mkdir -p "$GOPATH/src/github.com/apache" && ln -s /source $GOPATH/src/github.com/apache/calcite-avatica-go + command: apk --no-cache --no-progress add build-base git reload: - type: script name: Run tests - cwd: $GOPATH/src/github.com/apache/calcite-avatica-go + cwd: /source options: command: export AVATICA_FLAVOR=HSQLDB && go test -v ./... && export AVATICA_FLAVOR=PHOENIX && go test -v ./... \ No newline at end of file http://git-wip-us.apache.org/repos/asf/calcite-avatica-go/blob/7a9ac43d/site/develop/avatica-go.md ---------------------------------------------------------------------- diff --git a/site/develop/avatica-go.md b/site/develop/avatica-go.md index b3ab9a5..abf1542 100644 --- a/site/develop/avatica-go.md +++ b/site/develop/avatica-go.md @@ -48,11 +48,12 @@ The test suite takes around 4 minutes to run if you run both the Avatica HSQLDB ### Manual set up 1. Install [Go](https://golang.org/doc/install). -2. Install [dep](https://github.com/golang/dep): `go get -u github.com/golang/dep/cmd/dep` +For Go 1.10 and below, install the dependencies (skip these steps if using Go 1.11 and above): +1a. Install [dep](https://github.com/golang/dep): `go get -u github.com/golang/dep/cmd/dep` -3. Install dependencies by running `dep ensure -v` from the root of the repository. +1b. Install dependencies by running `dep ensure -v` from the root of the repository. -4. The test suite requires access to an instance of Avatica running HSQLDB and an instance of Apache Phoenix running the +2. The test suite requires access to an instance of Avatica running HSQLDB and an instance of Apache Phoenix running the Phoenix Query Server. You should then set the `HSQLDB_HOST` and `PHOENIX_HOST` environment variables. For example: @@ -61,9 +62,9 @@ HSQLDB_HOST: http://hsqldb:8765 PHOENIX_HOST: http://phoenix:8765 {% endhighlight %} -5. To select the test suite, export `AVATICA_FLAVOR=HSQLDB` for Avatica HSQLDB or `AVATICA_FLAVOR=PHOENIX` for Phoenix. +3. To select the test suite, export `AVATICA_FLAVOR=HSQLDB` for Avatica HSQLDB or `AVATICA_FLAVOR=PHOENIX` for Phoenix. -6. Then run `go test -v ./...` from the root of the repository to execute the test suite. +4. Then run `go test -v ./...` from the root of the repository to execute the test suite. ## Releasing If you have not set up a GPG signing key, set one up by following these [instructions](https://www.apache.org/dev/openpgp.html#generate-key).