Skip to content

Commit

Permalink
Merge pull request #11110 from gyuho/go
Browse files Browse the repository at this point in the history
*: update test Go version / release version
  • Loading branch information
gyuho committed Sep 6, 2019
2 parents 88d998b + ef0eec1 commit d2c2130
Show file tree
Hide file tree
Showing 13 changed files with 97 additions and 63 deletions.
96 changes: 48 additions & 48 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,76 +6,76 @@ sudo: required
services: docker

go:
- 1.12.9
- tip
- 1.13
- tip

notifications:
on_success: never
on_failure: never

env:
matrix:
- TARGET=linux-amd64-fmt
- TARGET=linux-amd64-integration-1-cpu
- TARGET=linux-amd64-integration-2-cpu
- TARGET=linux-amd64-integration-4-cpu
- TARGET=linux-amd64-functional
- TARGET=linux-amd64-unit
- TARGET=all-build
- TARGET=linux-amd64-grpcproxy
- TARGET=linux-amd64-coverage
- TARGET=linux-amd64-fmt-unit-go-tip
- TARGET=linux-386-unit
- TARGET=linux-amd64-fmt
- TARGET=linux-amd64-integration-1-cpu
- TARGET=linux-amd64-integration-2-cpu
- TARGET=linux-amd64-integration-4-cpu
- TARGET=linux-amd64-functional
- TARGET=linux-amd64-unit
- TARGET=all-build
- TARGET=linux-amd64-grpcproxy
- TARGET=linux-amd64-coverage
- TARGET=linux-amd64-fmt-unit-go-tip
- TARGET=linux-386-unit

matrix:
fast_finish: true
allow_failures:
- go: 1.12.9
env: TARGET=linux-amd64-grpcproxy
- go: 1.12.9
env: TARGET=linux-amd64-coverage
- go: tip
env: TARGET=linux-amd64-fmt-unit-go-tip
- go: 1.12.9
env: TARGET=linux-386-unit
- go: 1.13
env: TARGET=linux-amd64-grpcproxy
- go: 1.13
env: TARGET=linux-amd64-coverage
- go: tip
env: TARGET=linux-amd64-fmt-unit-go-tip
- go: 1.13
env: TARGET=linux-386-unit
exclude:
- go: tip
env: TARGET=linux-amd64-fmt
- go: tip
env: TARGET=linux-amd64-integration-1-cpu
- go: tip
env: TARGET=linux-amd64-integration-2-cpu
- go: tip
env: TARGET=linux-amd64-integration-4-cpu
- go: tip
env: TARGET=linux-amd64-functional
- go: tip
env: TARGET=linux-amd64-unit
- go: tip
env: TARGET=all-build
- go: tip
env: TARGET=linux-amd64-grpcproxy
- go: tip
env: TARGET=linux-amd64-coverage
- go: 1.12.9
env: TARGET=linux-amd64-fmt-unit-go-tip
- go: tip
env: TARGET=linux-386-unit
- go: tip
env: TARGET=linux-amd64-fmt
- go: tip
env: TARGET=linux-amd64-integration-1-cpu
- go: tip
env: TARGET=linux-amd64-integration-2-cpu
- go: tip
env: TARGET=linux-amd64-integration-4-cpu
- go: tip
env: TARGET=linux-amd64-functional
- go: tip
env: TARGET=linux-amd64-unit
- go: tip
env: TARGET=all-build
- go: tip
env: TARGET=linux-amd64-grpcproxy
- go: tip
env: TARGET=linux-amd64-coverage
- go: 1.13
env: TARGET=linux-amd64-fmt-unit-go-tip
- go: tip
env: TARGET=linux-386-unit

before_install:
- if [[ $TRAVIS_GO_VERSION == 1.* ]]; then docker pull gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION}; fi
- if [[ $TRAVIS_GO_VERSION == 1.* ]]; then docker pull gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION}; fi

install:
- go get -t -v -d ./...
- go get -t -v -d ./...

script:
- echo "TRAVIS_GO_VERSION=${TRAVIS_GO_VERSION}"
- >
- echo "TRAVIS_GO_VERSION=${TRAVIS_GO_VERSION}"
- >
case "${TARGET}" in
linux-amd64-fmt)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 PASSES='fmt bom dep' ./test"
/bin/bash -c "GOARCH=amd64 PASSES='fmt dep' ./test"
;;
linux-amd64-integration-1-cpu)
docker run --rm \
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG-3.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.15...v3.3.16) an

- Upgrade [`github.com/coreos/bbolt`](https://github.com/etcd-io/bbolt/releases) from [**`v1.3.1-coreos.6`**](https://github.com/etcd-io/bbolt/releases/tag/v1.3.1-coreos.6) to [**`v1.3.3`**](https://github.com/etcd-io/bbolt/releases/tag/v1.3.3).

### Go

- Compile with Go 1.12.9 including [*Go 1.12.8*](https://groups.google.com/d/msg/golang-announce/65QixT3tcmg/DrFiG6vvCwAJ) security fixes.
- See [*Go 1.12 release page*](https://golang.org/doc/devel/release.html#go1.12) for more.


<hr>

Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG-3.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

Previous change logs can be found at [CHANGELOG-3.3](https://github.com/etcd-io/etcd/blob/master/CHANGELOG-3.3.md).

<hr>

## [v3.4.1](https://github.com/etcd-io/etcd/releases/tag/v3.4.1) (2019-TBD)

See [code changes](https://github.com/etcd-io/etcd/compare/v3.4.0...v3.4.1) and [v3.4 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_4.md) for any breaking changes.

**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.4 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_4.md).**

### etcd server

- Fix [secure server logging message](https://github.com/etcd-io/etcd/commit/8b053b0f44c14ac0d9f39b9b78c17c57d47966eb).
- Remove [redundant `%` characters in file descriptor warning message](https://github.com/etcd-io/etcd/commit/d5f79adc9cea9ec8c93669526464b0aa19ed417b).

### Go

- Compile with Go 1.12.9 including [*Go 1.12.8*](https://groups.google.com/d/msg/golang-announce/65QixT3tcmg/DrFiG6vvCwAJ) security fixes.
- See [*Go 1.12 release page*](https://golang.org/doc/devel/release.html#go1.12) for more.


<hr>

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG-3.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Deprecated [`/v3beta`](https://github.com/etcd-io/etcd/pull/9298).
- `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` does work in v3.5. Use `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead.

### Go

- Require [*Go 1.13+*](https://github.com/etcd-io/etcd/pull/11110).

<hr>

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ docker-remove:



GO_VERSION ?= 1.12.9
GO_VERSION ?= 1.13
ETCD_VERSION ?= $(shell git rev-parse --short HEAD || echo "GitNotFound")

TEST_SUFFIX = $(shell date +%s | base64 | head -c 15)
Expand All @@ -65,11 +65,11 @@ endif


# Example:
# GO_VERSION=1.12.9 make build-docker-test
# GO_VERSION=1.13 make build-docker-test
# make build-docker-test
#
# gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io
# GO_VERSION=1.12.9 make push-docker-test
# GO_VERSION=1.13 make push-docker-test
# make push-docker-test
#
# gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com
Expand Down
2 changes: 1 addition & 1 deletion functional/scripts/docker-local-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if ! [[ "${0}" =~ "scripts/docker-local-agent.sh" ]]; then
fi

if [[ -z "${GO_VERSION}" ]]; then
GO_VERSION=1.12.9
GO_VERSION=1.13
fi
echo "Running with GO_VERSION:" ${GO_VERSION}

Expand Down
2 changes: 1 addition & 1 deletion functional/scripts/docker-local-tester.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if ! [[ "${0}" =~ "scripts/docker-local-tester.sh" ]]; then
fi

if [[ -z "${GO_VERSION}" ]]; then
GO_VERSION=1.12.9
GO_VERSION=1.13
fi
echo "Running with GO_VERSION:" ${GO_VERSION}

Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ require (
gopkg.in/yaml.v2 v2.2.2
sigs.k8s.io/yaml v1.1.0
)

go 1.13
3 changes: 0 additions & 3 deletions integration/v3_tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ func testTLSCipherSuites(t *testing.T, valid bool) {
if err != nil {
t.Fatal(err)
}
// go1.13 enables TLS13 by default, and in TLS13, cipher suites are not configurable
// setting Max TLS version to TLS12 for go1.13
cc.MaxVersion = tls.VersionTLS12
cli, cerr := clientv3.New(clientv3.Config{
Endpoints: []string{clus.Members[0].GRPCAddr()},
DialTimeout: time.Second,
Expand Down
10 changes: 10 additions & 0 deletions pkg/transport/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,11 @@ func (info TLSInfo) ServerConfig() (*tls.Config, error) {
// "h2" NextProtos is necessary for enabling HTTP2 for go's HTTP server
cfg.NextProtos = []string{"h2"}

// go1.13 enables TLS 1.3 by default
// and in TLS 1.3, cipher suites are not configurable
// setting Max TLS version to TLS 1.2 for go 1.13
cfg.MaxVersion = tls.VersionTLS12

return cfg, nil
}

Expand Down Expand Up @@ -428,6 +433,11 @@ func (info TLSInfo) ClientConfig() (*tls.Config, error) {
}
}

// go1.13 enables TLS 1.3 by default
// and in TLS 1.3, cipher suites are not configurable
// setting Max TLS version to TLS 1.2 for go 1.13
cfg.MaxVersion = tls.VersionTLS12

return cfg, nil
}

Expand Down
4 changes: 2 additions & 2 deletions scripts/updatedep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ if [ -d "gopath.proto" ]; then
exit 255
fi

if [[ $(go version) != "go version go1.12"* ]]; then
echo "expect Go 1.12+, got:" "$(go version)"
if [[ $(go version) != "go version go1.13"* ]]; then
echo "expect Go 1.13+, got:" "$(go version)"
exit 255
fi

Expand Down
5 changes: 2 additions & 3 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,12 @@ function govet_shadow_pass {
# shellcheck disable=SC2206
fmtpkgs=($fmtpkgs)
# Golang 1.12 onwards the experimental -shadow option is no longer available with go vet
go get golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
go get -v golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
export PATH=${GOPATH}/bin:${PATH}
shadow_tool=$(which shadow)
vetRes=$(go vet -all -vettool="${shadow_tool}" "${TEST[@]}")
if [ -n "${vetRes}" ]; then
echo -e "govet -all -shadow checking failed:\\n${vetRes}"
echo -e "govet -shadow checking failed:\\n${vetRes}"
exit 255
fi
}
Expand Down Expand Up @@ -617,7 +617,6 @@ function fmt_pass {
goword \
gofmt \
govet \
govet_shadow \
revive \
license_header \
receiver_name \
Expand Down
4 changes: 2 additions & 2 deletions tests/semaphore.test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ fi
<<COMMENT
# amd64-e2e
tests/semaphore.test.bash
sudo HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build release e2e' MANUAL_VER=v3.3.13" make docker-test
sudo HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build release e2e' MANUAL_VER=v3.4.0" make docker-test
# 386-e2e
sudo HOST_TMP_DIR=/tmp TEST_OPTS="GOARCH=386 PASSES='build e2e'" make docker-test
COMMENT

sudo HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build release e2e' MANUAL_VER=v3.3.13" make docker-test
sudo HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build release e2e' MANUAL_VER=v3.4.0" make docker-test

0 comments on commit d2c2130

Please sign in to comment.