109 Commits

Author SHA1 Message Date
Wei Fu
59b8522687 dependency: bump github.com/mikefarah/yq/v4 from 4.33.3 to 4.34.1 in /tools/mod
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-05-30 11:40:15 +08:00
Bogdan Kanivets
4418e793a0 dependency: bump github.com/mgechev/revive from 1.3.1 to 1.3.2 in /tools/mod
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-05-24 23:32:05 -07:00
James Blair
1798730cd8
dependency: bump golang.org/x/crypto from 0.8.0 to 0.9.0
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-16 08:39:19 +12:00
Prasad Chandrasekaran
db07ec9561 dependency: bump indirect zmap dependencies
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-05-11 18:06:39 +05:30
Prasad Chandrasekaran
9878b134eb dependency: bump indirect dependencies
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-05-11 18:00:12 +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
Wei Fu
aa787d9f51 dependency: bump github.com/alexkohler/nakedret from 1.0.1 to 1.0.2
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-25 14:44:34 +08:00
James Blair
aad63a1efe
dependency: bump github.com/mikefarah/yq/v4 from 4.33.1 to 4.33.3
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-21 05:40:03 +12:00
James Blair
04f3e9cb9a
dependency: bump golang.org/x/crypto from 0.7.0 to 0.8.0
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-21 05:34:21 +12:00
Wei Fu
9f034fbaa8 chore: use tools/mod to lock the cfssl cmd version
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-13 12:06:31 +08:00
Benjamin Wang
ff08625126 dedpendency: bump gotest.tools/gotestsum from 1.9.0 to 1.10.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 08:56:09 +08:00
Benjamin Wang
dddd4780c2 dependency: bump github.com/spf13/cobra from 1.6.1 to 1.7.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 08:51:26 +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
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
dependabot[bot]
2ca482a761
build(deps): bump github.com/mikefarah/yq/v4 in /tools/mod
Bumps [github.com/mikefarah/yq/v4](https://github.com/mikefarah/yq) from 4.31.2 to 4.33.1.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](https://github.com/mikefarah/yq/compare/v4.31.2...v4.33.1)

---
updated-dependencies:
- dependency-name: github.com/mikefarah/yq/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 17:58:43 +00:00
Benjamin Wang
1b2b89e378 dependency: bump github.com/mgechev/revive to 1.3.1 and honnef.co/go/tools to 0.4.3
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-21 08:36:39 +08:00
dependabot[bot]
263dc15a38
build(deps): bump github.com/mikefarah/yq/v4 in /tools/mod
Bumps [github.com/mikefarah/yq/v4](https://github.com/mikefarah/yq) from 4.31.1 to 4.31.2.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](https://github.com/mikefarah/yq/compare/v4.31.1...v4.31.2)

---
updated-dependencies:
- dependency-name: github.com/mikefarah/yq/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-14 00:40:03 +00: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
dependabot[bot]
7dfd29b0cc build(deps): bump github.com/mikefarah/yq/v4 in /tools/mod
Bumps [github.com/mikefarah/yq/v4](https://github.com/mikefarah/yq) from 4.30.8 to 4.31.1.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](https://github.com/mikefarah/yq/compare/v4.30.8...v4.31.1)

---
updated-dependencies:
- dependency-name: github.com/mikefarah/yq/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-21 07:50:45 +08:00
dependabot[bot]
66efadb8fb build(deps): bump honnef.co/go/tools from 0.4.0 to 0.4.2 in /tools/mod
Bumps [honnef.co/go/tools](https://github.com/dominikh/go-tools) from 0.4.0 to 0.4.2.
- [Release notes](https://github.com/dominikh/go-tools/releases)
- [Commits](https://github.com/dominikh/go-tools/compare/v0.4.0...v0.4.2)

---
updated-dependencies:
- dependency-name: honnef.co/go/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-21 05:23:04 +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
dependabot[bot]
8f54d38b6c build(deps): bump honnef.co/go/tools from 0.3.3 to 0.4.0 in /tools/mod
Bumps [honnef.co/go/tools](https://github.com/dominikh/go-tools) from 0.3.3 to 0.4.0.
- [Release notes](https://github.com/dominikh/go-tools/releases)
- [Commits](https://github.com/dominikh/go-tools/compare/v0.3.3...v0.4.0)

---
updated-dependencies:
- dependency-name: honnef.co/go/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-07 06:29:36 +08:00
dependabot[bot]
aba0f91167 build(deps): bump github.com/mgechev/revive in /tools/mod
Bumps [github.com/mgechev/revive](https://github.com/mgechev/revive) from 1.2.4 to 1.2.5.
- [Release notes](https://github.com/mgechev/revive/releases)
- [Changelog](https://github.com/mgechev/revive/blob/master/.goreleaser.yml)
- [Commits](https://github.com/mgechev/revive/compare/v1.2.4...v1.2.5)

---
updated-dependencies:
- dependency-name: github.com/mgechev/revive
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-31 05:43:34 +08:00
Benjamin Wang
0d7b624fae dependency: bump github.com/google/addlicense from 1.1.0 to 1.1.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-24 16:59:37 +08:00
Benjamin Wang
b2d482e6da dependency: bump gotest.tools/gotestsum from v1.8.2 to v1.9.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-17 06:39:26 +08:00
Benjamin Wang
575ceed1c7 dependency: bump github.com/mikefarah/yq/v4 from v4.30.6 to v4.30.8
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-17 06:33:05 +08:00
dependabot[bot]
6f522f657d
build(deps): bump github.com/mikefarah/yq/v4 in /tools/mod
Bumps [github.com/mikefarah/yq/v4](https://github.com/mikefarah/yq) from 4.30.5 to 4.30.6.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](https://github.com/mikefarah/yq/compare/v4.30.5...v4.30.6)

---
updated-dependencies:
- dependency-name: github.com/mikefarah/yq/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 17:03:52 +00:00
Benjamin Wang
3b9086009d
Merge pull request #14982 from etcd-io/dependabot/go_modules/tools/mod/github.com/alexkohler/nakedret-1.0.1
build(deps): bump github.com/alexkohler/nakedret from 1.0.0 to 1.0.1 in /tools/mod
2022-12-14 08:56:47 +08:00
dependabot[bot]
17d1761fbd
build(deps): bump github.com/alexkohler/nakedret in /tools/mod
Bumps [github.com/alexkohler/nakedret](https://github.com/alexkohler/nakedret) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/alexkohler/nakedret/releases)
- [Commits](https://github.com/alexkohler/nakedret/compare/v1.0...v1.0.1)

---
updated-dependencies:
- dependency-name: github.com/alexkohler/nakedret
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-14 00:19:18 +00:00
dependabot[bot]
042022390d
build(deps): bump honnef.co/go/tools from 0.3.0 to 0.3.3 in /tools/mod
Bumps [honnef.co/go/tools](https://github.com/dominikh/go-tools) from 0.3.0 to 0.3.3.
- [Release notes](https://github.com/dominikh/go-tools/releases)
- [Commits](https://github.com/dominikh/go-tools/compare/v0.3.0...v0.3.3)

---
updated-dependencies:
- dependency-name: honnef.co/go/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-14 00:18:23 +00:00
Benjamin Wang
8b34906b1d deps: bump github.com/mikefarah/yq/v4 from 4.24.2 to 4.30.5 in /tools/mod
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:17:21 +08:00
Benjamin Wang
6845168182 deps: bump github.com/google/addlicense from 1.0.0 to 1.1.0 in /tools/mod
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:15:44 +08:00
Benjamin Wang
feeb703b06 deps: bump gotest.tools/v3 from 3.1.0 to 3.4.0 in /tools/mod
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:13:08 +08:00
Benjamin Wang
40e85f6bee deps: bump github.com/mgechev/revive from 1.2.1 to 1.2.4 in /tools/mod
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:09:35 +08:00
Benjamin Wang
c51540bdd2 deps: bump google.golang.org/protobuf from 1.28.0 to 1.28.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:07:52 +08:00
Benjamin Wang
642a451165 deps: bump gotest.tools/gotestsum from 1.7.0 to 1.8.2 in /tools/mod
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:53:44 +08:00
Benjamin Wang
259a73d67a deps: bump github.com/spf13/cobra from 1.4.0 to 1.6.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:33:24 +08:00
Marek Siarkowicz
1bb4c9558d tests: Update gofail to v0.1.0
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-10 14:49:20 +01:00
Benjamin Wang
1ba246e1d8 bump golang.org/x/ to v0.4.0
Found 1 known vulnerability.

Vulnerability #1: GO-2022-1144
  An attacker can cause excessive memory growth in a Go server
  accepting HTTP/2 requests. HTTP/2 server connections contain a
  cache of HTTP header keys sent by the client. While the total
  number of entries in this cache is capped, an attacker sending
  very large keys can cause the server to allocate approximately
  64 MiB per open connection.

  Call stacks in your code:
Error:       tools/etcd-dump-metrics/main.go:158:5: go.etcd.io/etcd/v3/tools/etcd-dump-metrics.main calls go.etcd.io/etcd/server/v3/embed.StartEtcd, which eventually calls golang.org/x/net/http2.Server.ServeConn

  Found in: golang.org/x/net/http2@v0.2.0
  Fixed in: golang.org/x/net/http2@v0.4.0
  More info: https://pkg.go.dev/vuln/GO-2022-1144
Error: Process completed with exit code 3.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-09 08:54:48 +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
3f86db5e53 bump golang.org/x imports to address CVEs
Reference: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32149

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-30 05:03:43 +08:00
Marek Siarkowicz
dd4d69ca91 tests: Cleanup gofail
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-27 20:35:39 +01:00
Benjamin Wang
150ea9d880 tool: bump gofail version
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-18 15:19:18 +08:00
Marek Siarkowicz
837819860b tests: Add linearizability tests scenario for #14370
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-24 13:36:12 +02:00
Benjamin Wang
cd0b1d0c66 Bump go 1.19: upgrade go version to 1.19 in all go.mod files
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08: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
Manuel Rüger
dedb661d92 tools/mod: Update tools
github.com/google/addlicense v0.0.0-20210428195630-6d92264d7170 -> v1.0.0
github.com/gordonklaus/ineffassign v0.0.0-20200809085317-e36bfde3bb78 -> v0.0.0-20210914165742-4cc7213b9bc8
github.com/grpc-ecosystem/grpc-gateway v1.14.6 -> v1.16.0
github.com/hexfusion/schwag v0.0.0-20170606222847-b7d0fc9aadaa -> v0.0.0-20211117114134-3ceb0191ccbf
github.com/mgechev/revive v1.0.2 -> v1.2.0
github.com/mikefarah/yq/v3 v3.0.0-20201125113350-f42728eef735 -> v4.24.2
gotest.tools v2.2.0+incompatible -> v3.1.0
gotest.tools/gotestsum v0.3.5 -> v1.7.0
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc -> v0.3.0
mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 -> v0.0.0-20220316160445-06cc5682983b

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-04-07 14:27:51 +02:00
Manuel Rüger
cf7e8b3535 go.mod: Bump golang.org/x/net dependency; regenerate go.sum
Bumps golang.org/x/net dependency due to fix CVE-2021-44716
as requested in https://github.com/etcd-io/etcd/pull/13487#issuecomment-997065540

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-01-12 03:00:08 +01:00
Lili Cosic
e6e279a14d *: Bump go to go v1.17.2 2021-10-27 13:44:54 +02:00