Commit Graph

600 Commits (a6ab774458411a6c0ea08f5df97e4dcc9a836345)

Author SHA1 Message Date
Chao Chen b2c39fc8e6 2023-06-06: bump up dependencies update identified by dependabot
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-06-06 20:18:44 -07:00
Benjamin Wang 3413f2e08d
Merge pull request #15908 from cuishuang/main
*: use strings.Builder instead of bytes.Buffer
2023-05-26 09:41:01 +08:00
Bogdan Kanivets ef91e8ae78 dependency: bump github.com/stretchr/testify from 1.8.2 to 1.8.3
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-05-24 23:58:13 -07:00
qsyqian fbc34d1222 clientv3: refactor snapshot SaveWithVersion
Signed-off-by: qsyqian <qsyqian@gmail.com>
2023-05-22 09:09:02 +08:00
cui fliter 0c919dc212 use the more efficient strings.Builder
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-05-19 10:44:58 +08:00
James Blair 5a5b5a1c5d
dependency: bump github.com/prometheus/client_golang from 1.15.0 to 1.15.1
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-16 09:26:44 +12:00
Prasad Chandrasekaran 9878b134eb dependency: bump indirect dependencies
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-05-11 18:00:12 +05:30
Prasad Chandrasekaran c863f1f8c0 dependency: bump dependabot dependencies
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-05-09 18:38:35 +05:30
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
Benjamin Wang 4a8817bfb0
Merge pull request #15737 from jmhbnz/update-dependencies
Bump dependencies identified by dependabot
2023-04-21 06:35:08 +08:00
James Blair 042e2e9a57
dependency: bump github.com/prometheus/client_golang from 1.14.0 to 1.15.0
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-21 05:14:40 +12:00
cui fliter 57908723f4 fix some comments
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-04-20 14:26:17 +08:00
Benjamin Wang a283eb5e03 dependency: bump golang.org/x/sys from 0.6.0 to 0.7.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 08:47:31 +08:00
Benjamin Wang eb9b15bf49 dependency: bump golang.org/x/net from 0.8.0 to 0.9.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 08:44:26 +08:00
James Blair ffdd8d79a7
Fix gofmt for client/pkg/fileutil/preallocate.go.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-11 10:57:41 +12:00
Benjamin Wang 0406ab9a29
Merge pull request #15281 from MarkintoshZ/preallocate-docs
Show darwin as supported in fileutil.Preallocate docstring
2023-04-11 06:33:08 +08:00
Msk a3743a79bc tests: use separate errc for each case in TestTxnPanics
Signed-off-by: Msk <118117161+Mskxn@users.noreply.github.com>
2023-04-10 09:16:39 +08:00
Benjamin Wang 072c5cb5da dependency: bump google.golang.org/protobuf from 1.28.1 to 1.30.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-04 15:28:09 +08:00
Benjamin Wang 56284d5dfe dependency: bump github.com/golang/protobuf from 1.5.2 to 1.5.3
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-04 15:21:22 +08:00
Benjamin Wang 0c66fc9f29 dependency: bump go.uber.org/multierr from 1.9.0 to 1.11.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-04 15:15:32 +08: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
Benjamin Wang 7ed1219861 dependency: bump golang.org/x/net to v0.8.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-07 06:52:07 +08:00
Benjamin Wang bc55e615d2 dependency: bump golang.org/x/sys to v0.5.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-28 06:54:08 +08:00
Benjamin Wang d8b8127084 dependency: bump github.com/stretchr/testify from 1.8.1 to 1.8.2
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-28 06:44:33 +08:00
Benjamin Wang da4bf0f76f
Merge pull request #15261 from ahrtr/memberlist_20230208
clientv3: support serializable `MemberList` operation
2023-02-28 06:26:38 +08:00
dependabot[bot] 8aedd91a02
build(deps): bump golang.org/x/sys in /client/pkg
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20210603125802-9665404d3644 to 0.1.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-25 08:42:06 +00:00
Benjamin Wang 3de346259b clientv3: update etcdctl's readme and comment of clientv3.WithSerializable to clarify the use cases
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-25 07:23:39 +08:00
Benjamin Wang 1f0d361848 clientv3: support serializable MemberList operation
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-25 07:23:39 +08:00
xin.li b17b9c1428 chore: Use http constants to replace numbers as parameters
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-02-20 11:53:41 +08:00
Benjamin Wang a7e94c4843 security: bump golang.org/x/net to v0.7.0 to address CVE GO-2023-1571
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-17 11:29:47 +08:00
Mark Zhang 12d8742e29 Show darwin as supported in fileutil.Preallocate docstring
Signed-off-by: Mark Zhang <bf-109g2@hotmail.com>
2023-02-10 17:40:11 +00:00
Benjamin Wang 36fc3cae65 clientv3: correct the nextRev on receving progress notification response
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-10 09:09:19 +08:00
James Blair 5f27af9bb8
Fix regression in timestamp resolution
Historic capnslog timestamps are in microsecond resolution. We need to match that when we migrate to the zap logger.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-02-03 21:42:01 +13:00
Marek Siarkowicz f4cc163190
Merge pull request #15156 from Nordix/add-minmax-allow-tls13
Add TLSv1.3 support.
2023-01-31 10:11:38 +01:00
Tero Saarni 588b98d085 Add TLSv1.3 support.
Added optional TLS min/max protocol version and command line switches to set
versions for the etcd server.

If max version is not explicitly set by the user, let Go select the max
version which is currently TLSv1.3. Previously max version was set to TLSv1.2.

Signed-off-by: Tero Saarni <tero.saarni@est.tech>
2023-01-30 16:16:53 +02:00
upuplouis 5b7b499f50 fix(client):getToken automatically when the token has expired
Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

add some notes

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

client/v3:add some notes

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

client/v3:rm Unused comments

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

client/v3:rename gterr

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

fix(client):fix refreshToken

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

fix(client):rm unused comments

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

fix(client):fix the format error.

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

fix format err
2023-01-30 15:19:53 +08:00
Benjamin Wang 5b8d7698c8 dependency: bump github.com/coreos/go-semver from 0.3.0 to 0.3.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-24 16:59:37 +08:00
Benjamin Wang ac98432f0b dependency: bump github.com/dustin/go-humanize from v1.0.0 to v1.0.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-17 06:37:19 +08:00
wafuwafu13 8b15146f27 clientv3: refactor getToken automatically
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2023-01-09 18:01:32 +09:00
WangXiaoxiao 49abfa5992 client/v3: fix comment typo
Signed-off-by: WangXiaoxiao <1141195807@qq.com>
2023-01-07 14:40:12 +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 6f899a7b40
Merge pull request #15052 from ptabor/20221228-goimports-fix
./scripts/fix.sh: Takes care of goimports across the whole project.
2022-12-29 11:31:22 +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
Wei Fu 4d0b91947e chore: delete // +build buildtag by `go fix`
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-29 14:17:05 +08:00
Benjamin Wang 9169522d72
Merge pull request #15021 from ramil600/em_manager
clientv3/naming/endpoints: fix endpoints prefix bug
2022-12-26 10:19:26 +08:00
Ramil Mirhasanov f0153222f1 clientv3/naming/endpoints: fix endpoints prefix bug
fixes bug with multiple endpoints with same prefix

Signed-off-by: Ramil Mirhasanov <ramil600@yahoo.com>
2022-12-22 13:36:16 +03:00
Benjamin Wang 054b24b425
Merge pull request #15031 from ahrtr/SnapshotWithVersion_nil_panic_20221220
clientv3: add protection code to prevent SnapshotWithVersion from panicking
2022-12-21 06:45:31 +08:00
Benjamin Wang 4d9b709ce0
Merge pull request #15024 from wafuwafu13/client-isunavailableerr-test
test(client): add `TestIsUnavailableErr`
2022-12-21 06:42:44 +08:00
wafuwafu13 2041d5f245 fix: change error message
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2022-12-20 21:54:52 +09:00
wafuwafu13 57413851b6 fix(client): change error message
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2022-12-20 21:52:59 +09:00