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

WIP *: bump up default Go runtime for tests #10441

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions .travis.yml
Expand Up @@ -6,7 +6,7 @@ sudo: required
services: docker

go:
- 1.11.4
- 1.11.5
- tip

notifications:
Expand All @@ -30,13 +30,13 @@ env:
matrix:
fast_finish: true
allow_failures:
- go: 1.11.4
- go: 1.11.5
env: TARGET=linux-amd64-grpcproxy
- go: 1.11.4
- go: 1.11.5
env: TARGET=linux-amd64-coverage
- go: tip
env: TARGET=linux-amd64-fmt-unit-go-tip
- go: 1.11.4
- go: 1.11.5
env: TARGET=linux-386-unit
exclude:
- go: tip
Expand All @@ -57,7 +57,7 @@ matrix:
env: TARGET=linux-amd64-grpcproxy
- go: tip
env: TARGET=linux-amd64-coverage
- go: 1.11.4
- go: 1.11.5
env: TARGET=linux-amd64-fmt-unit-go-tip
- go: tip
env: TARGET=linux-386-unit
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -51,7 +51,7 @@ docker-remove:



GO_VERSION ?= 1.11.4
GO_VERSION ?= 1.11.5
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.10.7 make build-docker-test
# GO_VERSION=1.10.8 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.10.7 make push-docker-test
# GO_VERSION=1.10.8 make push-docker-test
# make push-docker-test
#
# gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com
Expand Down
10 changes: 0 additions & 10 deletions clientv3/client.go
Expand Up @@ -20,7 +20,6 @@ import (
"errors"
"fmt"
"net"
"net/url"
"os"
"strconv"
"strings"
Expand Down Expand Up @@ -77,7 +76,6 @@ type Client struct {

cfg Config
creds *credentials.TransportCredentials
balancer balancer.Balancer
resolverGroup *endpoint.ResolverGroup
mu *sync.Mutex

Expand Down Expand Up @@ -662,11 +660,3 @@ func IsConnCanceled(err error) bool {
// <= gRPC v1.7.x returns 'errors.New("grpc: the client connection is closing")'
return strings.Contains(err.Error(), "grpc: the client connection is closing")
}

func getHost(ep string) string {
url, uerr := url.Parse(ep)
if uerr != nil || !strings.Contains(ep, "://") {
return ep
}
return url.Host
}
30 changes: 0 additions & 30 deletions clientv3/ready_wait.go

This file was deleted.

4 changes: 0 additions & 4 deletions clientv3/retry.go
Expand Up @@ -43,10 +43,6 @@ func (rp retryPolicy) String() string {
}
}

type rpcFunc func(ctx context.Context) error
type retryRPCFunc func(context.Context, rpcFunc, retryPolicy) error
type retryStopErrFunc func(error) bool

// isSafeRetryImmutableRPC returns "true" when an immutable request is safe for retry.
//
// immutable requests (e.g. Get) should be retried unless it's
Expand Down
7 changes: 0 additions & 7 deletions clientv3/retry_interceptor.go
Expand Up @@ -314,13 +314,6 @@ func withRetryPolicy(rp retryPolicy) retryOption {
}}
}

// withAuthRetry sets enables authentication retries.
func withAuthRetry(retryAuth bool) retryOption {
return retryOption{applyFunc: func(o *options) {
o.retryAuth = retryAuth
}}
}

// withMax sets the maximum number of retries on this call, or this interceptor.
func withMax(maxRetries uint) retryOption {
return retryOption{applyFunc: func(o *options) {
Expand Down
31 changes: 2 additions & 29 deletions test
Expand Up @@ -99,9 +99,8 @@ if [ "${VERBOSE}" == "1" ]; then
echo "Running with TEST:" "${TEST[@]}"
fi

# TODO: 'client' pkg fails with gosimple from generated files
# TODO: 'rafttest' is failing with unused
STATIC_ANALYSIS_PATHS=$(find . -name \*.go ! -path './vendor/*' ! -path './gopath.proto/*' ! -path '*pb/*' | while read -r a; do dirname "$a"; done | sort | uniq | grep -vE "$IGNORE_PKGS" | grep -v 'client')
STATIC_ANALYSIS_PATHS=$(find . -name \*.go ! -path './vendor/*' ! -path './gopath.proto/*' ! -path '*pb/*' | while read -r a; do dirname "$a"; done | sort | uniq | grep -vE "$IGNORE_PKGS")
# shellcheck disable=SC2206
STATIC_ANALYSIS_PATHS=($STATIC_ANALYSIS_PATHS)
if [ "${VERBOSE}" == "1" ]; then
Expand Down Expand Up @@ -455,30 +454,6 @@ function govet_shadow_pass {
fi
}

function gosimple_pass {
if command -v gosimple >/dev/null; then
gosimpleResult=$(gosimple "${STATIC_ANALYSIS_PATHS[@]}" 2>&1 || true)
if [ -n "${gosimpleResult}" ]; then
echo -e "gosimple checking failed:\\n${gosimpleResult}"
exit 255
fi
else
echo "Skipping gosimple..."
fi
}

function unused_pass {
if command -v unused >/dev/null; then
unusedResult=$(unused "${STATIC_ANALYSIS_PATHS[@]}" 2>&1 || true)
if [ -n "${unusedResult}" ]; then
echo -e "unused checking failed:\\n${unusedResult}"
exit 255
fi
else
echo "Skipping unused..."
fi
}

function unparam_pass {
if command -v unparam >/dev/null; then
unparamResult=$(unparam "${STATIC_ANALYSIS_PATHS[@]}" 2>&1 || true)
Expand All @@ -497,7 +472,7 @@ function staticcheck_pass {
if [ -n "${staticcheckResult}" ]; then
# TODO: resolve these after go1.8 migration
# See https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck
STATIC_CHECK_MASK="SA(1012|1019|2002)"
STATIC_CHECK_MASK="S(A|T)(1002|1005|1006|1008|1012|1019|1032|2002|4003|4006)"
if echo "${staticcheckResult}" | grep -vE "$STATIC_CHECK_MASK"; then
echo -e "staticcheck checking failed:\\n${staticcheckResult}"
exit 255
Expand Down Expand Up @@ -624,8 +599,6 @@ function fmt_pass {
gofmt \
govet \
govet_shadow \
gosimple \
unused \
staticcheck \
revive \
unconvert \
Expand Down