Benjamin Wang
1cf49e5ef0
Merge pull request #16173 from fuweid/fix-datarace-in-expect
...
pkg/expect: fix data race
2023-07-13 08:49:13 +01:00
Wei Fu
56edfa6e28
pkg/expect: fix data race
...
Let's say there is command which outputs one line and exit with error.
There are three goroutines to acquire the lock:
1. ep.read()
2. ep.waitSaveExitErr()
3. ep.Expect()
When ep.read goroutine reads the log but it doesn't acquire the lock in
time, the ep.waitSaveExitErr acquires the lock and updates the
`exitErr`. And then ep.Expect acquires lock but it doesn't see any log
yet and then returns err.
It's hard to reproduce it in local. Add the extra sleep can reproduce it.
```diff
diff --git a/pkg/expect/expect.go b/pkg/expect/expect.go
index a512a3ce4..602bea73f 100644
--- a/pkg/expect/expect.go
+++ b/pkg/expect/expect.go
@@ -128,6 +128,7 @@ func (ep *ExpectProcess) tryReadNextLine(r *bufio.Reader) error {
printDebugLines := os.Getenv("EXPECT_DEBUG") != ""
l, err := r.ReadString('\n')
+ time.Sleep(10 * time.Millisecond)
ep.mu.Lock()
defer ep.mu.Unlock()
```
See it once in Github Action [1]. In order to fix it, the patch introduces
`readCloseCh` to wait for ep.read to get all the data and retry it.
[1]: https://github.com/etcd-io/etcd/pull/16137#issuecomment-1605838518
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-07-13 14:56:21 +08:00
Benjamin Wang
2c22ca7eba
dependency: bump golang.org/x/net from v0.11.0 to v0.12.0
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-10 18:43:30 +01:00
Benjamin Wang
149256735d
dependency: bump golang.org/x/sys from v0.9.0 to v0.10.0
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-10 18:38:16 +01:00
ArkaSaha30
37bd1e3382
Bump dependency manually
...
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2023-06-28 12:39:27 +05:30
Wei Fu
b3316c0e09
*: should return exitCode even if cmd isn't nil
...
For the pkg/expect package, if the process has been stopped but there is
no `Close()` call, the `ExitCode()` won't return exit code correctly.
The `ExitCode()` should check `exitErr` and return exit code if cmd isn't nil.
And introduces `exitCode` to return correct exit code based on the
process is signaled or exited.
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-25 10:39:34 +08:00
Benjamin Wang
b92d099360
dependency: bump golang.org/x/net from 0.10.0 to 0.11.0
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-06-19 09:25:07 +01:00
Prasad Chandrasekaran
3a8c6d749f
manual dependency bump
...
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-06-13 23:28:47 +05:30
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
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
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
James Blair
18e3acae0e
Add new test for round robin resolver.
...
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-25 18:44:24 +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
Wei Fu
9dc54ca32c
chore: add strict mode for pkg/proxy/fixtures/gencerts.sh
...
REF: #15514
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-13 12:05:39 +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
Wei Fu
85b4da6121
chore: remove pkg/expect TODO comment
...
https://github.com/google/goexpect has been archived on Feb 7, 2023.
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-09 12:57:32 +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
James Blair
3c40a68d09
Remove nocov flags for e2e tests.
...
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-30 15:37:09 +13:00
Marek Siarkowicz
659c74e60e
Merge pull request #15431 from serathius/watch-random-scheduler
...
Watch random scheduler
2023-03-10 13:29:54 +01:00
Marek Siarkowicz
585dfe0186
test: Test etcd watch stream starvation under high read response load when sharing the same connection
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-10 12:42:33 +01:00
Marek Siarkowicz
b3bb996880
Merge pull request #15420 from ahrtr/dependency_20230307
...
Bump some dependencies
2023-03-09 13:03:56 +01:00
Benjamin Wang
24f5d4a6fb
Merge pull request #15201 from dbadoy/main
...
pkg/schedule: correct comparison for FIFO schedule test
2023-03-08 14:46:58 +08:00
dbadoy4874
ebb5e74ace
pkg/schedule:correct comparison for FIFO schedule test
...
Signed-off-by: dbadoy4874 <dbadoy4874@gmail.com>
2023-03-08 13:18:05 +09: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
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
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
kidsan
82243d0919
netutil: consistently format ipv6 addresses
...
This formats ipv6 addresses to ensure they can be compared safely
Signed-off-by: kidsan <8798449+Kidsan@users.noreply.github.com>
2023-01-31 06:50:42 +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
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
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
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
2c192f4205
deps: bump go.uber.org/multierr from 1.8.0 to 1.9.0 in /server
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:00:49 +08:00
Benjamin Wang
700ad0fdce
deps: bump github.com/creack/pty from 1.1.11 to 1.1.18 in /pkg
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:46:14 +08:00
Benjamin Wang
bc41c0963b
deps: bump github.com/coreos/go-systemd/v22 from 22.3.2 to 22.5.0
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:38:55 +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
Benjamin Wang
1a0af6fee6
deps: bump go.uber.org/zap from 1.21.0 to 1.24.0
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:33:24 +08: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
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
Benjamin Wang
285e44378f
bump github.com/stretchr/testify from v1.7.2 to v1.8.1
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 10:51:32 +08:00
Piotr Tabor
590911dfe3
Merge pull request #14847 from mkumatag/fix_expect
...
fix TestSignal test
2022-11-25 10:39:25 +01:00
Manjunath Kumatagi
0bc46ec92c
fix TestSignal test
...
Signed-off-by: Manjunath A Kumatagi <mkumatag@in.ibm.com>
2022-11-25 12:50:02 +05:30
Marek Siarkowicz
f18ac02e0f
Merge pull request #14834 from fuweid/bump-grpc-1.51
...
bump grpc to v1.51.0 from v1.47.0
2022-11-24 09:07:56 +01:00
Bhargav Ravuri
2feec4fe68
comments: fix comments as per goword in go test files
...
Comments fixed as per goword in go test files that shell
function go_srcs_in_module lists as per changes on #14827
Helps in #14827
Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-23 23:05:42 +05:30
Wei Fu
cf285ea3c7
bump grpc to v1.51.0 from v1.47.0
...
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-23 22:16:22 +08:00