-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
*: test update for Go 1.12.5 and related changes #10631
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10631 +/- ##
==========================================
- Coverage 71.51% 70.37% -1.14%
==========================================
Files 394 392 -2
Lines 36658 36598 -60
==========================================
- Hits 26216 25756 -460
- Misses 8604 8980 +376
- Partials 1838 1862 +24
Continue to review full report at Codecov.
|
@gyuho hi, there are several fmt errors related to staticchecks (existing (e.g. SA2002) and newly added (e.g. S1002)). Should we try fixing them under this PR? Thanks! |
@spzala Yes, please. We want to fix the CIs. Thanks. |
@gyuho OK, sounds great, thanks! Working on it! |
857c2d2
to
5548bc4
Compare
@gyuho @hexfusion |
We will get rid of |
45cf683
to
44a5c80
Compare
@gyuho @hexfusion the changes are now ready for your initial review. Thanks! |
@gyuho can you take a look? |
clientv3/balancer/grpc1.7-health.go
Outdated
@@ -507,7 +507,7 @@ func (b *GRPC17Health) Get(ctx context.Context, opts grpc.BalancerGetOptions) (g | |||
addr = b.pinAddr | |||
b.mu.RUnlock() | |||
if closed { | |||
return grpc.Address{Addr: ""}, nil, grpc.ErrClientConnClosing | |||
return grpc.Address{Addr: ""}, nil, context.Canceled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to change this error type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use he status code of Canceled instead of grpc.ErrClientConnClosing which is deprecated
Is it deprecated in gRPC? We haven't bumped up the gRPC yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clientv3/options.go
Outdated
@@ -47,7 +47,7 @@ var ( | |||
// client-side streaming retry limit, only applied to requests where server responds with | |||
// a error code clearly indicating it was unable to process the request such as codes.Unavailable. | |||
// If set to 0, retry is disabled. | |||
defaultStreamMaxRetries = uint(^uint(0)) // max uint | |||
defaultStreamMaxRetries = uint(0) // max uint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not seem to be right. we still want all 1's in the binary representation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, I will fix it. Thanks @xiang90 for catching it.
Due to the merge of #10640 few things are changed, rebased but running into few conflicts and working on it. |
8b576e8
to
5a6a16d
Compare
@xiang90 @gyuho since 'staticcheck' and 'unconvert' are removed from |
Thanks @xiang90 and yes, the same failure I noticed with another PR that came in today #10704 |
Hi @xiang90 , I cloned a fresh copy of etcd repo and tested with go 1.12.4 root@ubuntu-20:~/go/src/go.etcd.io/etcd# ./test
Running with TEST_CPUS: 1,2,4
Starting 'fmt' pass at Sat May 4 11:21:46 IST 2019
'shellcheck' started at Sat May 4 11:21:46 IST 2019
'shellcheck' completed at Sat May 4 11:21:46 IST 2019
'markdown_you' started at Sat May 4 11:21:46 IST 2019
'markdown_you' completed at Sat May 4 11:21:46 IST 2019
'markdown_marker' started at Sat May 4 11:21:46 IST 2019
Skipping marker...
'markdown_marker' completed at Sat May 4 11:21:46 IST 2019
'goword' started at Sat May 4 11:21:46 IST 2019
Skipping goword...
'goword' completed at Sat May 4 11:21:46 IST 2019
'gofmt' started at Sat May 4 11:21:46 IST 2019
'gofmt' completed at Sat May 4 11:21:48 IST 2019
'govet' started at Sat May 4 11:21:48 IST 2019
go: finding github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7
go: finding github.com/modern-go/reflect2 v1.0.1
go: finding github.com/mattn/go-colorable v0.0.9
go: finding github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5
go: finding github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4
go: finding github.com/stretchr/testify v1.2.2
go: finding github.com/golang/protobuf v1.2.0
go: finding github.com/soheilhy/cmux v0.1.4
go: finding golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4
go: finding go.uber.org/zap v1.9.1
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: finding github.com/inconshreveable/mousetrap v1.0.0
go: finding github.com/prometheus/procfs v0.0.0-20180612222113-7d6f385de8be
go: finding sigs.k8s.io/yaml v1.1.0 // this went through fine.
go: finding github.com/bgentry/speakeasy v0.1.0
go: finding github.com/google/uuid v1.0.0
go: finding gopkg.in/airbrake/gobrake.v2 v2.0.9
go: finding github.com/onsi/gomega v1.4.2
go: finding gopkg.in/cheggaaa/pb.v1 v1.0.25
go: finding github.com/grpc-ecosystem/grpc-gateway v1.4.1
go: finding github.com/gogo/protobuf v1.0.0
go: finding go.uber.org/multierr v1.1.0
go: finding github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903
go: finding github.com/json-iterator/go v1.1.5
go: finding gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2
go: finding github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612
go: finding github.com/prometheus/client_golang v0.8.0
go: finding github.com/pkg/errors v0.8.0
go: finding github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2
go: finding github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf
go: finding github.com/jonboulle/clockwork v0.1.0
go: finding github.com/kr/pty v1.0.0
go: finding github.com/onsi/ginkgo v1.6.0
go: finding github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a
go: finding gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
go: finding go.uber.org/atomic v1.3.2
go: finding gopkg.in/yaml.v2 v2.2.2 I did not face the timeout issues which Travis reported. Not sure what is the cause here . |
@rohitsardesai83 thanks for testing! And, probably not but I was wondering if it's related to go version as CI is not yet on 1.12.4 and the error seems across the board with new PRs (e.g. https://travis-ci.com/etcd-io/etcd/jobs/197642542#L630 is another PR) |
@spzala , in another instance , for this PR #10693 , the CI passed : https://travis-ci.com/etcd-io/etcd/jobs/197674921#L634. the dependency got downloaded correctly. |
I am new to go mod. Why do we need to download dependencies when we already have vendor folder? |
@rohitsardesai83 thanks, and thanks @jingyih for debugging it further! |
@spzala Can you try to retrigger the travis CI? |
Feels like maybe some of the go module flags are not configured properly. When building, dependencies code should be found in vendor folder, instead of downloading from a remote repo. |
Go version is updated under #10766 |
@spzala can you do a rebase to resolve the conflicts? |
5a6a16d
to
dd5f5e3
Compare
@xiang90 Hi, rebased so no conflicts now. The build failing seems related to the overall problems we are running into and not related to the changes. Thanks! |
@spzala Can we create an issue for those tests? Thanks! |
Also, I am investing further for the |
dd5f5e3
to
158a660
Compare
err := s.ctx.Err() | ||
return err | ||
} | ||
return grpc.ErrClientConnClosing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm
@spzala can you squash the 10 commits into one or just a couple? the changes look good to me. |
Update to Go 1.12.5 testing. Remove deprecated unused and gosimple pacakges, and mask staticcheck 1006. Also, fix unconvert errors related to unnecessary type conversions and following staticcheck errors: - remove redundant return statements - use for range instead of for select - use time.Since instead of time.Now().Sub - omit comparison to bool constant - replace T.Fatal and T.Fatalf in tests with T.Error and T.Fatalf respectively because the goroutine calls T.Fatal must be called in the same goroutine as the test - fix error strings that should not be capitalized - use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) - use he status code of Canceled instead of grpc.ErrClientConnClosing which is deprecated - use use status.Errorf instead of grpc.Errorf which is deprecated Related etcd-io#10528 etcd-io#10438
158a660
to
1caaa9e
Compare
/cc @gyuho can you take a final look? thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm thanks!
Testing update for Go 1.12.5. Remove deprecated unused and gosimple
pacakges, and mask staticcheck 1006.
Related #10528 #10438
Co-Authored-By: Gyuho Lee [email protected]