805 Commits

Author SHA1 Message Date
James Blair
e6e740fb80
depdendency: bump google.golang.org/grpc from 1.58.3 to 1.59.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-24 17:39:39 +13:00
Allen Ray
e4c0eb7712 bump google.golang.org/grpc to v1.58.3
Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-11 10:39:05 -04:00
Allen Ray
3a61187ce3 bump golang.org/x/net to v0.17.0
Address CVE-2023-39325 and CVE-2023-44487

Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-11 10:09:14 -04:00
Sharath Sivakumar
1b1c42a7aa
dependency: bump golang.org/x/net from 0.15.0 to 0.16.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-10 11:49:35 +02:00
Jes Cok
eef8636f35 pkg/stringutil: sort 'ss' in TestUniqueStrings
From the algorithm below, 'ss' should be sorted.

Also removes 'fmt.Println', because the idiomatic tests would not print.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2023-09-27 22:41:16 +08:00
Benjamin Wang
df7f2d93f8 dependency: bump google.golang.org/grpc from 1.58.1 to 1.58.2
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-25 20:53:56 +01:00
Benjamin Wang
e1ebc260a9
Merge pull request #16628 from fuweid/fix-goimports
*: fix goimports linter
2023-09-22 10:26:14 +01:00
sharathsivakumar
2048a638fc
dependency: bump google.golang.org/grpc from 1.58.0/1.57.0 to 1.58.1
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 19:54:54 +02:00
sharathsivakumar
eef790399e
dependency: bump go.uber.org/zap from 1.25.0 to 1.26.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 19:41:16 +02:00
Wei Fu
aa97484166 *: enable goimports in verify-lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 21:14:09 +08:00
Wei Fu
9c3edfa0af *: fix staticcheck lint
Changed TraceKey/StartTimeKey/TokenFieldNameGRPCKey to struct{} to
follow the correct usage of context. Similar patch to #8901.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 11:24:26 +08:00
Wei Fu
5e3910d96c *: fix govet-shadow lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 20:24:01 +08:00
chenyahui
c0aa3b613b Use any instead of interface{}
Signed-off-by: chenyahui <cyhone@qq.com>
2023-09-17 17:41:58 +08:00
Allen Ray
cc130fd2d4 Update to go1.21
Signed-off-by: Allen Ray <alray@redhat.com>
2023-09-13 10:10:02 -04:00
Benjamin Wang
2a0613bc22 dependency: bump google.golang.org/grpc to 1.58.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-12 10:47:14 +01:00
Benjamin Wang
909d795601 dependency: bump golang.org/x/net from v0.14.0 to v0.15.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-11 19:36:18 +01:00
sharathsivakumar
e47d10fca7
dependency: bump golang.org/x/sys from 0.11.0 to 0.12.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-09 16:19:54 +02:00
Jordan Liggitt
6599dec92b
dependency: bump github.com/grpc-ecosystem/grpc-gateway/v2 from v2.7.0 to v2.17.1
Signed-off-by: Jordan Liggitt <liggitt@google.com>
2023-09-07 08:49:57 -04:00
Benjamin Wang
7cbab6034b add test cases to verify regular expression match
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-25 18:59:34 +01:00
Benjamin Wang
7d95c68b48 test: support regular expression matching on the response
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-25 15:00:35 +01:00
Marek Siarkowicz
4e24d4a755
Merge pull request #16447 from gocurr/remove_math_rand_seed
all: stop using math/rand.Seed
2023-08-21 09:47:48 +02:00
Jes Cok
52748f60f3 all: stop using math/rand.Seed
Fixes #16428.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2023-08-20 16:34:44 +08:00
Shyam Jeedigunta
b16fe80095 Fix unit test to avoid failing based on 'tail' command path
Signed-off-by: Shyam Jeedigunta <jeedigv@amazon.com>
2023-08-18 11:56:13 -07:00
James Blair
b6d123d08b
Update to golang 1.20 minor release.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-11 15:03:48 +12:00
chaochn47
6757c444c5 2023-08-10 bump up dependencies
Signed-off-by: chaochn47 <chaochn@amazon.com>
2023-08-10 09:13:34 +08:00
James Blair
f7126aa1c3
depdendency: bump golang.org/x/sys from 0.10.0 to 0.11.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-06 19:02:15 +12:00
=
418bab0ed4 dependency: bump golang.org/x/net 0.12.0 to 0.13.0
Co-authored-by: James Blair <mail@jamesblair.net>
Signed-off-by: = <abby.crimlis@outlook.com>
2023-08-04 09:09:16 +12:00
=
5896e40d23 dependency: bump go.uber.org/zap 1.24.0 to 1.25.0
Co-authored-by: James Blair <mail@jamesblair.net>
Signed-off-by: = <abby.crimlis@outlook.com>
2023-08-03 14:46:33 +12:00
Chao Chen
24c6fb4b4d Fix 15877 and bump up gRPC from v1.52.0 to v1.57.0
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-07-31 13:57:24 -07:00
Chao Chen
e59e3d709c dependency: bump google.golang.org/grpc from 1.51.0 to 1.52.0
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-07-27 13:25:12 -07:00
Jes Cok
4f78cc0810 pkg/flags: fix UniqueURLs'Set to remove duplicates in UniqueURLs'uss
From the name of func 'UniqueURLsFromFlag', we can tell that UniqueURLs'uss
should not have duplicates. The current implemention of UniqueURLs'Set
has a bug to make it unique.

Fixes: #16307.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2023-07-26 22:28:44 +08:00
Wei Fu
fddd1add52 pkg/ioutil: deflake TestPageWriterRandom
The PageWriter has cache buffer so that it doesn't call the Writer until
the cache is almost full. Since the data's length is random, the pending
bytes should be always less than cache buffer size, instead of page
size.

Fix: #16255

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-07-18 23:18:01 +08:00
Jes Cok
5e65553d27 pkg/expect: avoid hardcoding when checking ErrProcessDone
ExpectProcess's Stop method uses 'strings.Contains' to check
the returned err, however, this can be avoided. os.ErrProcessDone's
error message is the same as the hardcoded string. So I think
this explicit error is what this method wants to compare.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2023-07-17 13:14:15 +08:00
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