673 Commits

Author SHA1 Message Date
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
08471cddfd
Merge pull request #15519 from fuweid/remove-tee-in-ci
chore: introduce strict bash mode for scripts,.github
2023-03-23 06:28:02 +08:00
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
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
Marek Siarkowicz
372042c374 refactor: Use proper variable names for urls
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-13 14:48:01 +01: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
b9b7c9328e tools: fix the CSV format error and add build target 'tools' in Makefile
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-30 16:35:41 +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
Benjamin Wang
5ef713c728 remove the dependency on the deprecated io/ioutil
Reference: https://go.dev/doc/go1.16#ioutil

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-08 04:55:40 +08:00
Benjamin Wang
bd9f1584d4 process the scenaro of the last WAL record being partially synced to disk
We need to return io.ErrUnexpectedEOF in the error chain, so that
etcdserver can repair it automatically.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-08 04:46:51 +08:00
Piotr Tabor
007858dc97 etcd-dump-logs: Migrate from zap to log for raw
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-30 09:22:39 +01:00
Piotr Tabor
8ec3cbc551 fixup! Add --raw mode to ./etcd-dump-log
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-30 09:22:39 +01:00
Piotr Tabor
e571fb7baa Add --raw mode to ./etcd-dump-log
This mode allows to look at RAW protos for all entries in WAL logs in the given directory.

Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-30 09:22:34 +01:00
Piotr Tabor
14a1bf1d26 etcd-dump-logs: Make the tests work again.
The tests are subtle as they skip if the binary is not generated in the local directory.

$ go build . && go test
PASS
ok      go.etcd.io/etcd/v3/tools/etcd-dump-logs 0.769s

Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-29 13:08:24 +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
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
971e42d631 Resolve build and test errors
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 15:43: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
ff337cc993 tools/etcd-dump-logs: generate go.mod and go.sum for the tool
Add go.mod and go.sum to fix issue below,
```
$ go build
../../server/etcdserver/api/snap/snapshotter.go:33:2: missing go.sum entry for module providing package go.etcd.io/raft/v3 (imported by go.etcd.io/etcd/server/v3/etcdserver/api/snap); to add:
	go get go.etcd.io/etcd/server/v3/etcdserver/api/snap@v3.6.0-alpha.0
../../server/storage/wal/walpb/record.pb.go:14:2: missing go.sum entry for module providing package go.etcd.io/raft/v3/raftpb (imported by go.etcd.io/etcd/v3/tools/etcd-dump-logs); to add:
	go get go.etcd.io/etcd/v3/tools/etcd-dump-logs
```

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:27:38 +08:00
Benjamin Wang
bb6e892763 tools/etcd-dump-logs: update tool to use the new raft module go.etcd.io/raft/v3
Just replaced all go.etcd.io/etcd/raft/v3 with go.etcd.io/raft/v3
under tools/etcd-dump-logs.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:12:19 +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
Sasha Melentyev
2c9c209eb6 all: Changing Printf and friends to Print if there is no formatting
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 22:11:23 +03: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
qsyqian
946d120c7c etcd-dump-db: enhance metaDecoder
Signed-off-by: qsyqian <qsyqian@gmail.com>
2022-10-26 17:32:00 +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
demoManito
7020e2fd2b fix lint
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-29 13:57:55 +08:00
demoManito
0a08fa2b43 golangci: add import order check
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-29 11:30:04 +08:00
Benjamin Wang
7f10dccbaf Bump go 1.19: update all the dependencies and go.sum files
1. run ./scripts/fix.sh;
2. cd tools/mod; gofmt -w . & go mod tidy;

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00