Browse Source

Merge pull request #11110 from gyuho/go

*: update test Go version / release version
Gyuho Lee 6 years ago
parent
commit
d2c2130d72

+ 48 - 48
.travis.yml

@@ -6,8 +6,8 @@ sudo: required
 services: docker
 services: docker
 
 
 go:
 go:
-- 1.12.9
-- tip
+  - 1.13
+  - tip
 
 
 notifications:
 notifications:
   on_success: never
   on_success: never
@@ -15,67 +15,67 @@ notifications:
 
 
 env:
 env:
   matrix:
   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:
 matrix:
   fast_finish: true
   fast_finish: true
   allow_failures:
   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:
   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:
 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:
 install:
-- go get -t -v -d ./...
+  - go get -t -v -d ./...
 
 
 script:
 script:
- - echo "TRAVIS_GO_VERSION=${TRAVIS_GO_VERSION}"
- - >
+  - echo "TRAVIS_GO_VERSION=${TRAVIS_GO_VERSION}"
+  - >
     case "${TARGET}" in
     case "${TARGET}" in
       linux-amd64-fmt)
       linux-amd64-fmt)
         docker run --rm \
         docker run --rm \
           --volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
           --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)
       linux-amd64-integration-1-cpu)
         docker run --rm \
         docker run --rm \

+ 5 - 0
CHANGELOG-3.3.md

@@ -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).
 - 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>
 <hr>
 
 

+ 18 - 0
CHANGELOG-3.4.md

@@ -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).
 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>
 <hr>
 
 

+ 3 - 0
CHANGELOG-3.5.md

@@ -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).
   - 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.
   - `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>
 <hr>
 
 

+ 3 - 3
Makefile

@@ -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")
 ETCD_VERSION ?= $(shell git rev-parse --short HEAD || echo "GitNotFound")
 
 
 TEST_SUFFIX = $(shell date +%s | base64 | head -c 15)
 TEST_SUFFIX = $(shell date +%s | base64 | head -c 15)
@@ -65,11 +65,11 @@ endif
 
 
 
 
 # Example:
 # Example:
-#   GO_VERSION=1.12.9 make build-docker-test
+#   GO_VERSION=1.13 make build-docker-test
 #   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
 #   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
 #   make push-docker-test
 #
 #
 #   gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com
 #   gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com

+ 1 - 1
functional/scripts/docker-local-agent.sh

@@ -13,7 +13,7 @@ if ! [[ "${0}" =~ "scripts/docker-local-agent.sh" ]]; then
 fi
 fi
 
 
 if [[ -z "${GO_VERSION}" ]]; then
 if [[ -z "${GO_VERSION}" ]]; then
-  GO_VERSION=1.12.9
+  GO_VERSION=1.13
 fi
 fi
 echo "Running with GO_VERSION:" ${GO_VERSION}
 echo "Running with GO_VERSION:" ${GO_VERSION}
 
 

+ 1 - 1
functional/scripts/docker-local-tester.sh

@@ -6,7 +6,7 @@ if ! [[ "${0}" =~ "scripts/docker-local-tester.sh" ]]; then
 fi
 fi
 
 
 if [[ -z "${GO_VERSION}" ]]; then
 if [[ -z "${GO_VERSION}" ]]; then
-  GO_VERSION=1.12.9
+  GO_VERSION=1.13
 fi
 fi
 echo "Running with GO_VERSION:" ${GO_VERSION}
 echo "Running with GO_VERSION:" ${GO_VERSION}
 
 

+ 2 - 0
go.mod

@@ -48,3 +48,5 @@ require (
 	gopkg.in/yaml.v2 v2.2.2
 	gopkg.in/yaml.v2 v2.2.2
 	sigs.k8s.io/yaml v1.1.0
 	sigs.k8s.io/yaml v1.1.0
 )
 )
+
+go 1.13

+ 0 - 3
integration/v3_tls_test.go

@@ -56,9 +56,6 @@ func testTLSCipherSuites(t *testing.T, valid bool) {
 	if err != nil {
 	if err != nil {
 		t.Fatal(err)
 		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{
 	cli, cerr := clientv3.New(clientv3.Config{
 		Endpoints:   []string{clus.Members[0].GRPCAddr()},
 		Endpoints:   []string{clus.Members[0].GRPCAddr()},
 		DialTimeout: time.Second,
 		DialTimeout: time.Second,

+ 10 - 0
pkg/transport/listener.go

@@ -377,6 +377,11 @@ func (info TLSInfo) ServerConfig() (*tls.Config, error) {
 	// "h2" NextProtos is necessary for enabling HTTP2 for go's HTTP server
 	// "h2" NextProtos is necessary for enabling HTTP2 for go's HTTP server
 	cfg.NextProtos = []string{"h2"}
 	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
 	return cfg, nil
 }
 }
 
 
@@ -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
 	return cfg, nil
 }
 }
 
 

+ 2 - 2
scripts/updatedep.sh

@@ -13,8 +13,8 @@ if [ -d "gopath.proto" ]; then
   exit 255
   exit 255
 fi
 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
   exit 255
 fi
 fi
 
 

+ 2 - 3
test

@@ -460,12 +460,12 @@ function govet_shadow_pass {
 	# shellcheck disable=SC2206
 	# shellcheck disable=SC2206
 	fmtpkgs=($fmtpkgs)
 	fmtpkgs=($fmtpkgs)
 	# Golang 1.12 onwards the experimental -shadow option is no longer available with go vet
 	# 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}
 	export PATH=${GOPATH}/bin:${PATH}
 	shadow_tool=$(which shadow)
 	shadow_tool=$(which shadow)
 	vetRes=$(go vet -all -vettool="${shadow_tool}" "${TEST[@]}")
 	vetRes=$(go vet -all -vettool="${shadow_tool}" "${TEST[@]}")
 	if [ -n "${vetRes}" ]; then
 	if [ -n "${vetRes}" ]; then
-		echo -e "govet -all -shadow checking failed:\\n${vetRes}"
+		echo -e "govet -shadow checking failed:\\n${vetRes}"
 		exit 255
 		exit 255
 	fi
 	fi
 }
 }
@@ -617,7 +617,6 @@ function fmt_pass {
 			goword \
 			goword \
 			gofmt \
 			gofmt \
 			govet \
 			govet \
-			govet_shadow \
 			revive \
 			revive \
 			license_header \
 			license_header \
 			receiver_name \
 			receiver_name \

+ 2 - 2
tests/semaphore.test.bash

@@ -8,10 +8,10 @@ fi
 <<COMMENT
 <<COMMENT
 # amd64-e2e
 # amd64-e2e
 tests/semaphore.test.bash
 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
 # 386-e2e
 sudo HOST_TMP_DIR=/tmp TEST_OPTS="GOARCH=386 PASSES='build e2e'" make docker-test
 sudo HOST_TMP_DIR=/tmp TEST_OPTS="GOARCH=386 PASSES='build e2e'" make docker-test
 COMMENT
 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