Piotr Tabor
b382429d01
tests: Move functional tests to 'tests' module.
...
Tested with:
PASSES="fmt functional unit" ./test
make build-docker-functional
2020-10-07 15:09:26 +02:00
Piotr Tabor
d65b5d6791
Makefile: Improve the 'make clean' to remove all the tmp artifacts
2020-09-25 22:20:52 +02:00
Piotr Tabor
fb2e96e651
vendor: Get rid of ./vendor cleanup
...
Updated scripts and documentation to not recommend vendoring.
Implemented best practices for tools installation.
Performed multiple tests to confirm its not breaking any workflows and
has no negative performance impact. Rather see 3x speedup.
1. PASSES="fmt unit integration e2e functional" ./test
2. ./scripts/updatebom.sh
3. ./scripts/updatedep.sh
4. ./scripts/genproto.sh - works - ca be simplified - in follow up PR
5. Installation without explicit GOPATH:
```
% unset GOPATH
% [sudo] rm -rf ~/go
% git clone https://github.com/etcd-io/etcd.git
% time ./build
go: downloading google.golang.org/grpc v1.26.0
go: downloading github.com/jonboulle/clockwork v0.1.0
go: downloading github.com/prometheus/client_golang v1.0.0
go: downloading github.com/soheilhy/cmux v0.1.4
go: downloading github.com/gogo/protobuf v1.2.1
go: downloading sigs.k8s.io/yaml v1.1.0
go: downloading golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2
go: downloading github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903
go: downloading go.etcd.io/bbolt v1.3.5
go: downloading go.uber.org/zap v1.15.0
go: downloading golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc
go: downloading github.com/golang/protobuf v1.3.2
go: downloading github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8
go: downloading github.com/beorn7/perks v1.0.0
go: downloading github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4
go: downloading github.com/coreos/go-systemd/v22 v22.0.0
go: downloading gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/coreos/go-semver v0.2.0
go: downloading github.com/sirupsen/logrus v1.4.2
go: downloading golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7
go: downloading github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
go: downloading github.com/google/uuid v1.0.0
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading github.com/prometheus/common v0.4.1
go: downloading github.com/spf13/cobra v0.0.3
go: downloading github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2
go: downloading github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c
go: downloading github.com/spf13/pflag v1.0.1
go: downloading github.com/json-iterator/go v1.1.7
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/google/btree v1.0.0
go: downloading go.uber.org/atomic v1.6.0
go: downloading github.com/prometheus/procfs v0.0.2
go: downloading go.uber.org/multierr v1.5.0
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5
go: downloading github.com/grpc-ecosystem/grpc-gateway v1.9.5
go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
go: downloading github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
go: downloading google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading golang.org/x/text v0.3.3
go: downloading github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5
go: downloading github.com/bgentry/speakeasy v0.1.0
go: downloading gopkg.in/cheggaaa/pb.v1 v1.0.25
go: downloading github.com/urfave/cli v1.20.0
go: downloading github.com/mattn/go-runewidth v0.0.2
./build 8.22s user 2.31s system 117% cpu 8.961 total
```
Before:
```
% git clone https://github.com/etcd-io/etcd.git && cd etcd && time ./build
Cloning into 'etcd'...
remote: Enumerating objects: 97872, done.
remote: Total 97872 (delta 0), reused 0 (delta 0), pack-reused 97872
Receiving objects: 100% (97872/97872), 58.97 MiB | 19.85 MiB/s, done.
Resolving deltas: 100% (63091/63091), done.
./build 34.97s user 4.15s system 236% cpu 16.555 total
```
6. Rebuild without changes:
```
% time ./build
./build 1.43s user 0.83s system 168% cpu 1.336 total
```
7. Instantation of vendor directory (assuming ./build loaded them to
$GOPATH/pkg):
```
time go mod vendor
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa
go: downloading github.com/creack/pty v1.1.11
go: downloading github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.1
go mod vendor 0.51s user 0.44s system 110% cpu 0.861 total
```
8. Fresh instantation of vendor:
```
% rm -rf vendor
% [sudo] rm -rf ~/go
% time go mod vendor
go: downloading github.com/coreos/go-systemd/v22 v22.0.0
go: downloading github.com/spf13/cobra v0.0.3
go: downloading github.com/prometheus/client_golang v1.0.0
go: downloading golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7
go: downloading github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4
go: downloading github.com/gogo/protobuf v1.2.1
go: downloading sigs.k8s.io/yaml v1.1.0
go: downloading google.golang.org/grpc v1.26.0
go: downloading github.com/urfave/cli v1.20.0
go: downloading go.uber.org/zap v1.15.0
go: downloading github.com/spf13/pflag v1.0.1
go: downloading github.com/soheilhy/cmux v0.1.4
go: downloading github.com/json-iterator/go v1.1.7
go: downloading github.com/coreos/go-semver v0.2.0
go: downloading github.com/prometheus/common v0.4.1
go: downloading github.com/prometheus/procfs v0.0.2
go: downloading go.uber.org/atomic v1.6.0
go: downloading github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5
go: downloading github.com/golang/protobuf v1.3.2
go: downloading github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa
go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading go.uber.org/multierr v1.5.0
go: downloading github.com/creack/pty v1.1.11
go: downloading github.com/mattn/go-runewidth v0.0.2
go: downloading github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
go: downloading golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc
go: downloading golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5
go: downloading github.com/jonboulle/clockwork v0.1.0
go: downloading gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca
go: downloading github.com/grpc-ecosystem/grpc-gateway v1.9.5
go: downloading github.com/google/btree v1.0.0
go: downloading google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55
go: downloading github.com/beorn7/perks v1.0.0
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/google/uuid v1.0.0
go: downloading golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2
go: downloading github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8
go: downloading go.etcd.io/bbolt v1.3.5
go: downloading golang.org/x/text v0.3.3
go: downloading gopkg.in/cheggaaa/pb.v1 v1.0.25
go: downloading github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2
go: downloading github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading github.com/bgentry/speakeasy v0.1.0
go: downloading github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903
go: downloading github.com/sirupsen/logrus v1.4.2
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.1
go mod vendor 3.62s user 1.30s system 127% cpu 3.854 total
```
9. Size of the repository - before: 39M, after: 18M
Before:
```
% time git clone https://github.com/etcd-io/etcd.git
Cloning into 'etcd'...
remote: Enumerating objects: 97872, done.
remote: Total 97872 (delta 0), reused 0 (delta 0), pack-reused 97872
Receiving objects: 100% (97872/97872), 58.97 MiB | 20.53 MiB/s, done.
Resolving deltas: 100% (63091/63091), done.
git clone https://github.com/etcd-io/etcd.git 4.66s user 1.02s system 93% cpu 6.068 total
% du -h --exclude .git -d 1
944K ./clientv3
108K ./etcdmain
5.4M ./Documentation
384K ./security
384K ./mvcc
28K ./.github
8.0K ./version
144K ./contrib
240K ./proxy
2.5M ./etcdserver
112K ./embed
536K ./integration
332K ./tools
116K ./lease
108K ./logos
896K ./tests
960K ./raft
216K ./client
52K ./scripts
100K ./hack
464K ./etcdctl
3.0M ./pkg
620K ./functional
136K ./wal
152K ./auth
21M ./vendor
39M
```
After:
```
% time git clone https://github.com/ptabor/etcd.git -b 20200908-no-vendor
Cloning into 'etcd'...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 98489 (delta 10), reused 8 (delta 1), pack-reused 98451
Receiving objects: 100% (98489/98489), 59.23 MiB | 21.26 MiB/s, done.
Resolving deltas: 100% (63572/63572), done.
git clone https://github.com/ptabor/etcd.git -b 20200908-no-vendor 5.56s user 1.05s system 105% cpu 6.260 total
% du -h --exclude .git -d 1
944K ./clientv3
108K ./etcdmain
5.4M ./Documentation
384K ./security
384K ./mvcc
28K ./.github
8.0K ./version
144K ./contrib
240K ./proxy
2.5M ./etcdserver
112K ./embed
536K ./integration
332K ./tools
116K ./lease
108K ./logos
896K ./tests
960K ./raft
216K ./client
56K ./scripts
100K ./hack
464K ./etcdctl
3.0M ./pkg
620K ./functional
136K ./wal
152K ./auth
19M .
```
2020-09-15 14:38:54 +02:00
Gyuho Lee
93de72537e
Makefile: bump up default Go version to 1.14.3
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 20:01:12 -07:00
Gyuho Lee
628bd294e1
*: use Go 1.14 for CI
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-09 23:34:20 -07:00
Yuchen Zhou
f6c7d5c46a
Makefile: cleanup all data dirs. ( #11583 )
2020-02-06 13:55:02 -08:00
Gyuho Lee
fac434b952
*: use Go 1.13.3
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-10-23 10:32:39 -07:00
yoyinzyc
79bfc90f2b
tests/docker-dns: adding tests for certs with dns names.
2019-10-08 14:23:10 -07:00
Gyuho Lee
fce0e23d1b
*: use Go 1.13.1
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-27 23:37:11 -07:00
Gyuho Lee
42ad719155
*: update test Go version / release version
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-05 21:46:56 -07:00
Gyuho Lee
966321bdcd
*: use Go 1.12.9
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-15 14:28:41 -07:00
Gyuho Lee
5535092ce3
Makefile: explicit about GOOS in docker-test builds
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 16:56:52 -07:00
Gyuho Lee
c0161f7e7d
*: use Go 1.12.8
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 12:45:12 -07:00
Gyuho Lee
4bf584893c
functional: use Go 1.12.7 as default
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-05 12:40:31 -07:00
Gyuho Lee
dfd62f04e9
*: test with Go 1.12.7
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-23 12:40:47 -07:00
Gyuho Lee
05378f0d5d
Makefile: upgrade default Go version
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-28 15:39:35 -07:00
Mark McLoughlin
4d45a9ca43
build: stop using ETCDCTL_API=3
...
Note: v3 has been the default since 25bc65794
.
2019-01-14 14:46:16 +00:00
Gyuho Lee
6f0ba5fa06
*: update Go versions
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-12-16 23:13:11 -08:00
Gyuho Lee
2a8dc72899
Makefile: update default Go version
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-10-07 17:39:19 -07:00
Gyuho Lee
a0cc409352
Makefile: bump up to Go 1.11
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 21:28:41 -07:00
Gyuho Lee
f3af3d83c2
Makefile: update import paths to "go.etcd.io"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Gyuho Lee
ac936365bb
tools/etcd-dump-metrics: initial commit
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-22 00:34:22 -07:00
Gyuho Lee
f76cf959b2
Makefile: remove Go 1.9.7
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-19 10:23:44 -07:00
Gyuho Lee
51a209c56f
Makefile: grep "DATA RACE" for tests
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-13 16:24:08 -07:00
Gyuho Lee
9034e1c144
Makefile: use Go 1.9.7
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-08 10:54:56 -07:00
Gyuho Lee
082c3ef0bc
*: use Go 1.10.3 for CI tests
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-06-08 10:50:12 -07:00
Gyuho Lee
38fcfb63b4
Makefile: add ".coverprofile" to "make clean"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-03 17:22:34 -07:00
Gyuho Lee
4a01c4e98a
Makefile: use Go 1.10.2
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-01 10:11:05 -07:00
Gyuho Lee
38e32a1b54
snapshot: ignore server logs
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee
eabb40f0ae
test: combine "compile_pass" into "build_pass"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-10 17:07:42 -07:00
Gyuho Lee
784b6528d2
*: move "Dockerfile-functional"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-09 10:35:21 -07:00
Gyuho Lee
20e1179fac
Dockerfile-test: move to "tests"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-09 10:33:25 -07:00
Gyuho Lee
140374e25d
*: move "scripts/docker-*" to "tests"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-09 10:31:00 -07:00
Gyuho Lee
cd4580b4a9
functional: move "etcd-test-proxy"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-08 14:59:39 -07:00
Gyuho Lee
85e050a120
*: rename, clean up functional tests
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-07 10:00:00 -07:00
Gyuho Lee
8219c7f273
Makefile: clean up "gopath.proto"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-04 10:52:01 -07:00
Gyuho Lee
828a0246a6
Makefile: update/move
...
This is being used for all docker tests.
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-02 11:27:26 -07:00
Gyu-Ho Lee
249a2c30d2
Makefile: delete
...
moving to somewhere else
2017-10-23 16:35:04 -07:00
Gyu-Ho Lee
2b5733d742
Makefile: remove redundant commands
2017-10-23 13:13:11 -07:00
Gyu-Ho Lee
39fe293649
Makefile: fix typo in 'docker-test-proxy'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-17 09:05:01 -07:00
Gyu-Ho Lee
f0a78eb516
Makefile: fix 'test', add 'test-all' commands with docker
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-13 12:14:26 -07:00
Gyu-Ho Lee
d9e8d4665c
Makefile: suffix test log files
...
In preparation of running all tests inside container.
Currently, we run Jenkins in shared environment.
This is not good. Need manual Go runtime updates,
cannot run two different branches, port conflicts,
out of disk errors, etc.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-06 08:36:32 -07:00
Gyu-Ho Lee
5d3a5912eb
e2e/docker-dns-srv: enable peer, client TLS
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-05 15:15:02 -07:00
Gyu-Ho Lee
d57159f79a
e2e/docker-dns-srv: use 'etcd.local' as SRV, clean up
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-05 22:05:33 +00:00
Gyu-Ho Lee
b0dc639807
Makefile: add 'test-proxy', 'test-coverage'
...
To dockerize all test runs in Jenkins.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-05 10:52:22 -07:00
Gyu-Ho Lee
f5b1da6a20
Makefile: add 'docker-dns-srv-*'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-05 09:48:06 -07:00
Gyu-Ho Lee
23a302364c
Makefile: initial commit
...
Initial commit to run DNS/SRV tests.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-05 09:47:33 -07:00