282 Commits

Author SHA1 Message Date
Marek Siarkowicz
5472e589cf scripts: Add tests for release scripts 2022-04-25 10:12:01 +02:00
Piotr Tabor
8d36956d0e
Merge pull request #13955 from ptabor/20220417-tests-improvements
test.sh script improvement (OsX centric)
2022-04-19 12:18:45 +02:00
Vimal Kumar
12ab72a6ff smoke test:fix license header check 2022-04-19 08:35:22 +05:30
Piotr Tabor
8a22d640a7 add OUTPUT_FILE='foo.log' env variable support to test.sh script.
Side consequence of this is that `make test-smoke` can become interactive again.
2022-04-18 22:54:51 +02:00
Piotr Tabor
55a7c91de9 test.sh: Tools run correctly on OsX
- The location of installed tools is found using `go list`
- ETCD_VERIFY env variable is printed in repro command line.
2022-04-17 23:28:26 +02:00
Piotr Tabor
cf2d98cc88 Fix PASSES="build" on OSX
`readlink -f` is supported since OsX 12.3.

```
% env GO_BUILD_FLAGS=-v CGO_ENABLED=0 go build -v -installsuffix=cgo -ldflags='-X=go.etcd.io/etcd/api/v3/version.GitSHA=4ac59dbe3' -o=bin/tools/local-tester/bridge ./tools/local-tester/bridge
readlink: illegal option -- m
usage: readlink [-fn] [file ...]
mkdir: /functional: Read-only file system
% ./tests/functional/build.sh
stderr: go build go.etcd.io/etcd/tests/v3/functional/cmd/etcd-agent: mkdir /functional: read-only file system
stderr: go build go.etcd.io/etcd/tests/v3/functional/cmd/etcd-proxy: mkdir /functional: read-only file system
stderr: go build go.etcd.io/etcd/tests/v3/functional/cmd/etcd-runner: mkdir /functional: read-only file system
stderr: go test go.etcd.io/etcd/tests/v3/functional/cmd/etcd-tester.test: mkdir /functional: read-only file system
```
2022-04-17 23:21:37 +02:00
Marek Siarkowicz
98764fadef scripts: Remove Windows build scripts 2022-04-12 10:34:10 +02:00
Marek Siarkowicz
ae57fe5d30
Merge pull request #13885 from serathius/verify
server: Add verification of whether lock was called within out outside of apply
2022-04-05 16:22:52 +02:00
Marek Siarkowicz
1d3517020b server: Add verification of whether lock was called within out outside of apply 2022-04-05 15:34:45 +02:00
Marek Siarkowicz
8d8271f6d1
Merge pull request #13175 from karuppiah7890/issue-13167-measure-flakyness
scripts: add script to measure percentage of commits with failed status
2022-04-05 15:25:47 +02:00
Piotr Tabor
d4dcd3061d Fix flakes in TestV3LeaseCheckpoint/Checkpointing_disabled,_lease_TTL_is_reset
I think strong (not-equal) relationship was too restrictive when expressed with 1s granularity.

```
        logger.go:130: 2022-04-03T22:15:15.242+0200	WARN	m1	leader failed to send out heartbeat on time; took too long, leader is overloaded likely from slow disk	{"member": "m1", "to": "cb785755eb80ac1", "heartbeat-interval": "10ms", "expected-duration": "20ms", "exceeded-duration": "24.666613ms"}
        logger.go:130: 2022-04-03T22:15:15.262+0200	INFO	m-1	published local member to cluster through raft	{"member": "m-1", "local-member-id": "e2dd9f523aa7be87", "local-member-attributes": "{Name:m-1 ClientURLs:[unix://127.0.0.1:2196386040]}", "cluster-id": "b4b8e7e41c23c8b5", "publish-timeout": "5.2s"}
        v3_lease_test.go:415: Expected lease ttl (4m58s) to be greather than (4m58s)
```
2022-04-03 23:13:01 +02:00
Piotr Tabor
90796720c1 Reduce integration test parallelism to 2 packages at once.
Especially with 'race' detection, running O(cpu) integrational tests was causing CPU overloads and timeouts.
2022-04-03 14:48:36 +02:00
ahrtr
edce939f6e add one more field storageVersion into StatusResponse
When performing the downgrade operation, users can confirm whether each member
is ready to be downgraded using the field 'storageVersion'. If it's equal to the
'target version' in the downgrade command, then it's ready to be downgraded;
otherwise, the etcd member is still in progress of processing the db file.
2022-03-18 07:04:44 +08:00
cuishuang
b7824b794b fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>

fix some typos

Signed-off-by: cuishuang <imcusg@gmail.com>
2022-03-07 20:28:53 +08:00
Marek Siarkowicz
778c95fdf4 scripts: Fix release scripts 2022-02-25 13:30:34 +01:00
Marek Siarkowicz
744dd077cd tests: Create common framework for e2e and integration tests and migrate TestKVPut test 2022-02-23 16:47:02 +01:00
sitchenchao
b683aa1254 fix ctl_v3_kv_no_quorum_test.go and coverage failures 2022-02-12 18:00:02 -08:00
Sahdev Zala
bba3937f69
Merge pull request #13649 from serathius/scripts
Cleanup scripts in root directory
2022-02-11 15:40:53 -05:00
ahrtr
900fc8dd7e replace gobin with go install
The repository github.com/myitcv/gobin has already been archived,
and the `go install` command accepts arguments with version suffixs
starting from 1.16 (for example, go install example.com/cmd@v1.0.0).
So there is no reason to continue to use gobin.
2022-02-08 05:41:21 +08:00
Marek Siarkowicz
396efd9608 Cleanup scripts in root directory 2022-02-02 13:50:44 +01:00
Sahdev Zala
1986357b4c
Merge pull request #13663 from serathius/post-3.5.2
release: Post v3.5.2 release updates and fixes
2022-02-01 18:45:00 -05:00
Marek Siarkowicz
aa76b32a05 release: Post v3.5.2 release updates and fixes 2022-02-01 15:36:45 +01:00
Marek Siarkowicz
3df14fc24f Document proto annotations scripts 2022-01-28 16:08:28 +01:00
Marek Siarkowicz
6d808e5d7d *: Add static validation to etcd_version proto annotation 2022-01-26 15:50:14 +01:00
Dirkjan Bussink
ddb9554eec
server/etcdmain: add build support for Apple M1
This has been additionally verified by running the tests locally as a
basic smoke test. GitHub Actions doesn't provide MacOS M1 (arm64) yet,
so there's no good way to automate testing.

Ran `TMPDIR=/tmp make test` locally. The `TMPDIR` bit is needed so
there's no really long path used that breaks Unix socket setup in one of
the tests.
2021-12-17 17:35:36 +01:00
Chao Chen
9038e65359 scripts/genproto.sh: fix module path of wal proto files 2021-10-15 22:00:16 -07:00
Marek Siarkowicz
1b4e54c238 api: Annotate proto messages and use it to detect etcd version that generated wal
Co-authored-by: Lili Cosic <cosiclili@gmail.com>
2021-08-04 13:36:08 +02:00
Karuppiah Natarajan
2b796a0c9a
scripts: add script to measure percentage of commits with failed status
This is to start measuring the test flakiness and see the numbers improving once we improve and deflake flaky tests

Fixes #13167
2021-07-13 18:42:06 +05:30
Marek Siarkowicz
4c5efc970d *: Upload test junit results 2021-07-01 14:41:13 +02:00
Rajalakshmi-Girish
8bfce5dc01 Add option to generate junit xml reports 2021-06-16 07:25:50 +00:00
Piotr Tabor
b00803a9c1
Merge pull request #13071 from serathius/genproto
tests: Switch regenerating functional/rpcpb proto to scripts/genproto.sh
2021-06-04 13:30:02 +02:00
Nate W
9e4dd4dc4e updating scripts/genproto.sh
Changing API-reference generator

- matching changes mentioned in https://github.com/etcd-io/website/issues/330
- generating page frontmater
- updating .gitignore

Signed-off-by: Nate W <4453979+nate-double-u@users.noreply.github.com>
2021-06-02 10:29:35 -07:00
Marek Siarkowicz
af5cf1ac1c tests: Switch regenerating functional/rpcpb proto to scripts/genproto.sh 2021-06-02 16:42:35 +02:00
Sam Batschelet
80ccb27ea5
Merge pull request #12997 from hexfusion/fix-etcdutl-build
scripts: add missing etcdutl to release pipeline
2021-05-18 07:36:22 -04:00
Sam Batschelet
86393ecfcd scripts: add missing etcdutl to release pipeline
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-18 07:16:28 -04:00
Piotr Tabor
3f7a038656 Fixed documentation and scripts. 2021-05-17 11:54:03 +02:00
Piotr Tabor
c09aca1ba4 Split etcdctl into etcdctl (public API access) & etcdutl (direct surgery on files)
Motivation is as follows:

  - etcdctl we only depend on clientv3 APIs, no dependencies of bolt, backend, mvcc, file-layout
  - etcdctl can be officially supported across wide range of versions, while etcdutl is pretty specific to file format at particular version.
it's step towards desired modules layout, documented in: https://etcd.io/docs/next/dev-internal/modules/
2021-05-17 11:54:03 +02:00
Piotr Tabor
2712c787ab Fix release script: add go mod tidy
Seems that additinal refresh of go.sum files is needed during the
release process after editing the versions of modules.

Discovered the problem while I was testing whether etcdutl is
properly included in the target binaries using:

```
DRY_RUN=true REPOSITORY=\`pwd\` BRANCH='branch-with-etcdutl' ./scripts/release 3.5.0-foobar.2
```
2021-05-16 20:43:12 +02:00
Gyuho Lee
3d4629c1fb hack,scripts: rename "master" branch references to "main"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 10:40:28 -07:00
Gyuho Lee
3a04b2b61f github action: add ARM64 test with README
README for self-hosted-linux-arm64-graviton2-tests.yml

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-10 00:28:41 -07:00
Piotr Tabor
3bb7acc8cf Migrate dependencies pkg/foo -> client/pkg/foo 2021-04-07 00:38:47 +02:00
Piotr Tabor
f290ab2e60 Update dependecies:
github.com/grpc-ecosystem/grpc-gateway v1.14.6 -> grpc-gateway v1.16.0
  golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e->v0.0.0-20210220033141-f8bda1e9f3ba
2021-03-27 20:48:33 +01:00
Piotr Tabor
7665bd764e scripts/update_dep.sh: Script to update selected versions of dependencies. 2021-03-27 11:17:56 +01:00
Piotr Tabor
9180e8e56e wal: Update WAL Snapshot format to contain ConfState. 2021-03-25 00:31:44 +01:00
Joel Smith
19f7c6ef3e *: Update gogo/protobuf to v1.3.2, rerun ./scripts/genproto.sh
While it appears that etcd is not vulnerable to CVE-2021-3121,
it is a good idea to update to the new generator so that new
vulnerable code isn't generated in any future APIs. Also, this
lays the issue to rest of whether there is any issue with
etcd and CVE-2021-3121.
2021-03-23 11:48:06 -06:00
Piotr Tabor
a84bd093b0 Integration with grpc-settable logger. 2021-03-16 22:50:41 +01:00
Piotr Tabor
f7a2389992 Update version of certifi/gocertifi to get rid of WTF Public license
Seems old versions of https://github.com/certifi/gocertifi where
categorized as "Do What The F*ck You Want To Public License".

Update to newer version that is explicit `Mozilla Public License` 2.0 (MPL 2.0).
2021-03-04 09:48:34 +01:00
Piotr Tabor
a7f340216d Reformat code according to 'gotip' rules.
In practices adds annotations in the new syntax:
```
+//go:build !linux
 // +build !linux
```

Fixes failing gotip PASSES='fmt' check:
https://travis-ci.com/github/etcd-io/etcd/jobs/486453806
2021-02-26 10:14:46 +01:00
Piotr Tabor
60a669762f Improve release scripts:
- Fix script that creates manifest-list based multi-arch-images.
    The images need to be pushed first.
  - Use docker instead of gcloud docker helper
  - Make sure docker pushes are properly 'dry run'
  - Added preparation instruction to the release script.
2021-02-25 12:28:52 +00:00
Piotr Tabor
c640957e2d Release scripts: Minor fixes discovered during attempt for 3.5.0-alpha.0 2021-02-24 19:16:27 +00:00