Commit Graph

349 Commits (c13a1d47f5885302ae66e28a2d70212a6d39796b)

Author SHA1 Message Date
James Blair 2791422f77
Ensure goimports can be fixed individually.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-06-16 21:47:46 +12:00
Benjamin Wang 7f6d0d04ac
Merge pull request #15839 from Rajalakshmi-Girish/keep_going_module_testing2
Add an option to keep_going with run for modules on failure
2023-05-10 08:14:37 +08:00
Marek Siarkowicz aa373e54df Move go version to dedicated .go-version file
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-09 12:32:25 +02:00
Rajalakshmi Girish ac61b36e06 Add an option to keep_going with run for modules on failure
Signed-off-by: Rajalakshmi Girish <rajalakshmi.girish1@ibm.com>
2023-05-07 00:43:30 -07:00
Rajalakshmi Girish c9998a7e63 keep_going with other suites when failure with one
Signed-off-by: Rajalakshmi Girish <rajalakshmi.girish1@ibm.com>
2023-05-03 00:57:49 -07:00
Rajalakshmi Girish 81fccc13da Add -failfast flag when the mode is fail_fast
Signed-off-by: Rajalakshmi Girish <rajalakshmi.girish1@ibm.com>
2023-04-27 05:26:38 -07:00
Marek Siarkowicz e04120042e
Merge pull request #15779 from fuweid/deprecate-schwag
chore: deprecate github.com/hexfusion/schwag
2023-04-26 11:36:31 +02:00
James Blair ab65ee3d01
Consolidate etcd dockerfiles.
We can consolidate by using docker build args to create the individual platform Dockerfile.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-26 17:09:25 +12:00
Wei Fu b4f49a55a5 chore: deprecate github.com/hexfusion/schwag
The schwag was introduced to generate swagger with authorization support
[1][1] in 2017. And in 2018, the grpc-gateway supports to render
security fields by protoc-gen-swagger [2][2]. After several years, I
think it's good to use upstream protoc supports.

NOTE:

The json's key in `rpc.swagger.json` has been reordered so that it seems
that there's a lot of changes. How to verify it:

```bash
$ # use jq -S to sort the key
$ latest_commit="https://raw.githubusercontent.com/etcd-io/etcd/228f493c7697ce3e9d3a1d831bcffad175846c75/Documentation/dev-guide/apispec/swagger/rpc.swagger.json"
$ curl -s "${latest_commit}"  | jq -S . > /tmp/old.json
$ cat Documentation/dev-guide/apispec/swagger/rpc.swagger.json | jq -S . > /tmp/new.json
$ diff --color -u /tmp/old.json /tmp/new.json
```

```diff
--- /tmp/old.json       2023-04-26 10:58:07.142311861 +0800
+++ /tmp/new.json       2023-04-26 10:58:12.170299194 +0800
@@ -1523,11 +1523,14 @@
       "type": "object"
     },
     "protobufAny": {
+      "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := ptypes.MarshalAny(foo)\n     ...\n     foo := &pb.Foo{}\n     if err := ptypes.UnmarshalAny(any, foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }",
       "properties": {
         "type_url": {
+          "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.",
           "type": "string"
         },
         "value": {
+          "description": "Must be a valid serialized protocol buffer of the above specified type.",
           "format": "byte",
           "type": "string"
         }
```

REF:

1: <https://github.com/etcd-io/etcd/pull/7999#issuecomment-307512043>
2: <https://github.com/grpc-ecosystem/grpc-gateway/pull/547>

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-26 11:14:50 +08:00
Juan 0df7c48ddd Centralizing workflow go-version variable
Signed-off-by: Juan <1766933+judavi@users.noreply.github.com>
2023-04-20 11:42:28 +00:00
Wei Fu dc2cf29598 chore: add strict mode to scripts/test_lib.sh
REF: #15514

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-13 12:05:39 +08:00
Marek Siarkowicz 170cb146a1
Merge pull request #15591 from serathius/remove-v2-client
client: Hide v2 client package
2023-03-31 13:05:02 +02:00
Marek Siarkowicz 7c626e00f6
Merge pull request #15270 from zhangguanzhang/main
Fixes: #15266 All docker images of Architecture show amd64
2023-03-31 11:41:59 +02:00
Marek Siarkowicz be7be34800 client: Hide v2 client package
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-31 10:26:11 +02:00
zhangguanzhang 7ac443f728 Fixes: #15266 All docker images of Architecture show amd64
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2023-03-31 11:49:04 +08:00
James Blair 5faad23812
Merge branch 'main' into remove_e2e_calc 2023-03-30 16:46:31 +13:00
James Blair 0bd94bbae5
Remove defunct build_cov target.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-30 16:30:11 +13:00
Marek Siarkowicz 5223d09d41
Merge pull request #14838 from serathius/linearizability-docs
tests: Document robustness tests
2023-03-28 16:22:09 +02:00
Marek Siarkowicz d03ac88b36 tests: Document robustness tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-28 15:08:43 +02:00
Prasad Chandrasekaran 14fbc98b20 Make version check independent from put/get checks
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-03-24 15:29:34 +05:30
Prasad Chandrasekaran 0a94133089 Use run --rm for version checks
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-03-24 15:27:06 +05:30
Prasad Chandrasekaran ab2a1b7ad6 Incorporate review comments
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-03-24 14:32:23 +05:30
Prasad Chandrasekaran d5e5f1b542 scripts: Add testing of etcd in local image in release workflow.
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-03-24 13:33:48 +05:30
Wei Fu 1fcb782780 chore: introduce strict bash mode for scripts,.github
REF: #15514

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-22 18:00:41 +08:00
James Blair 3573d791e4
Remove e2e from coverage calculation.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-22 09:52:25 +13:00
Marek Siarkowicz 736c89398b
Merge pull request #15500 from chaochn47/document_measure_test_flakiness
document measure-test-flakiness.sh
2023-03-18 10:45:44 +01:00
Chao Chen fcdf0ebd81 document measure-test-flakiness.sh
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-17 14:15:54 -07:00
Hanning Lin 8bc6b289fb add new goimport_pass
Signed-off-by: Hanning Lin <liam.hanninglin@outlook.com>
2023-03-16 05:50:17 +00:00
Marek Siarkowicz d475cf81a0 tests: Rename linearizability tests to robustness
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-26 14:36:18 +01:00
Marek Siarkowicz 5f68ecc1ef tests: Remove functional testing as they were replaced by linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-11 13:20:44 +01:00
Iavael dc2b198cc7 docker: remove nsswitch.conf
Co-authored-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Iavael <905853+iavael@users.noreply.github.com>
2023-02-03 06:37:03 +08:00
Piotr Tabor 9abc895122 Goimports: Apply automated fixing to test files as well.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-29 13:04:45 +01:00
Piotr Tabor 9e1abbab6e Fix goimports in all existing files. Execution of ./scripts/fix.sh
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-29 09:41:31 +01:00
Piotr Tabor 5a28a02b97 ./scripts/fix.sh: Takes care of goimports across the whole project.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-28 16:37:55 +01:00
Benjamin Wang 27ca4d5488 remove the dependency on busybox
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-23 17:28:24 +08:00
Benjamin Wang 5d78d6d4b1 release: support kick off release in current branch
Currently when triggering release, it always pull remote repo and
checkout main branch. Any changes which are merged into the target
release branch (e.g. release-3.5) will be ignored. It isn't
convenient for test, including in github workflow and local environment.
So we need to support triggering release in current branch.

Note: --current-branch should only be called with DRY_RUN=true

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-12 09:35:03 +08:00
guiyong.ou 4f238837aa Make sure shellcheck exist
Signed-off-by: guiyong.ou <guiyong.ou@daocloud.io>
2022-12-05 15:36:16 +08:00
Benjamin Wang cc58edecf2 raft: add raft into the tools/mod
Previously etcdservers depends on raft/raftpb/raft.proto directly.
After moving raft to a separate repo, we need to add raft to the
tools/mod, and get raft included in the -I protc flags.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 15:36:41 +08:00
Benjamin Wang b1cdf16988 scripts: cleanup raft from all script files
No need to generate proto file;
No need to test coverage for raft;
No need to run any test for raft module;
NO need to run any test for raftexample;

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:58:11 +08:00
Marek Siarkowicz dd4d69ca91 tests: Cleanup gofail
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-27 20:35:39 +01:00
Bhargav Ravuri 18463081ad scripts: go_srcs_in_module to list test packages files
The shell func go_srcs_in_module will now list
1. go src files
2. go test files belong to same packages
3. go test files that belong to _test packages

Fixes #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-23 23:50:21 +05:30
Bhargav Ravuri cc77eb1011 scripts: go_srcs_in_module to list go source + test files
The shell function go_srcs_in_module will list go test files
along with go src files in the specified module. This helps
in identifying the copyright header misses in test files.

Fixes #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-23 21:52:09 +05:30
Dirkjan Bussink c26dabacbd
release: build with consistent paths
This changes the builds to always add -trimpath which removes specific
build time paths from the binary (like current directories etc).

Improves build reproducability to make the final binary independent from
the specific build path.

Lastly, when stripping debug symbols, also add -w to strip DWARF symbols
as well which aren't needed in that case either.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2022-11-21 15:06:11 +01:00
Marek Siarkowicz ebf41c2d48 Avoid getting gofail/runtime when failpoints are disabled
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-16 11:09:38 +01:00
Marek Siarkowicz f96957adba tests: Add compact failpoints
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-15 14:59:03 +01:00
Benjamin Wang 228f493c76 rpc.proto: regenerate rpc.proto related files
Run
1. ./script/genproto.sh
2. ./scripts/update_proto_annotations.sh

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-14 08:33:44 +08:00
Marek Siarkowicz 2a1055c7f3 raft: Remove dependency on etcd api
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-08 13:56:46 +01:00
spacewander a774510a90 address review
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-10-31 21:23:48 +08:00
spacewander e73a25a1d0 ci: ensure the generated code is up-to-date
See https://github.com/etcd-io/etcd/pull/14612#issue-1419792069
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-10-31 19:58:21 +08:00
Marek Siarkowicz 8ce81a1624
Merge pull request #14611 from serathius/issue14370
tests: Add linearizability tests scenario for #14370
2022-10-25 14:03:39 +02:00