Commit 3e8bc8d
committed
feat: enable watch retries on Omni side
Enable retry logger in `omnictl`, now if Omni goes down, `omnictl` can
correctly restart watches:
```
$ _out/omnictl-linux-amd64 get users -w
* NAMESPACE TYPE ID VERSION
+ default User be9d5331-74b9-4dc8-a4eb-387107faf262 1
+ default User cad2763b-1477-4bd5-9bc9-b3a369e39ffd 1
+ default User d4a0e14c-5b76-43ad-9b81-08a95cdd6731 1
2024-11-05T20:04:11.309+0400 WARN client/client.go:504 watch retrying {"error": "rpc error: code = Internal desc = server closed the stream without sending trailers", "bookmark": "AAAAAAAAASw=", "backoff": "678.945448ms", "namespace": "default", "type": "Users.omni.sidero.dev"}
2024-11-05T20:04:11.990+0400 WARN client/client.go:504 watch retrying {"error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 100.119.35.2:443: connect: connection refused\"", "bookmark": "AAAAAAAAASw=", "backoff": "979.468482ms", "namespace": "default", "type": "Users.omni.sidero.dev"}
2024-11-05T20:04:12.970+0400 WARN client/client.go:504 watch retrying {"error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 100.119.35.2:443: connect: connection refused\"", "bookmark": "AAAAAAAAASw=", "backoff": "850.913234ms", "namespace": "default", "type": "Users.omni.sidero.dev"}
2024-11-05T20:04:13.821+0400 WARN client/client.go:504 watch retrying {"error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 100.119.35.2:443: connect: connection refused\"", "bookmark": "AAAAAAAAASw=", "backoff": "1.683608302s", "namespace": "default", "type": "Users.omni.sidero.dev"}
2024-11-05T20:04:15.505+0400 WARN client/client.go:504 watch retrying {"error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 100.119.35.2:443: connect: connection refused\"", "bookmark": "AAAAAAAAASw=", "backoff": "3.759619924s", "namespace": "default", "type": "Users.omni.sidero.dev"}
2024-11-05T20:04:19.266+0400 WARN client/client.go:504 watch retrying {"error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 100.119.35.2:443: connect: connection refused\"", "bookmark": "AAAAAAAAASw=", "backoff": "3.985097297s", "namespace": "default", "type": "Users.omni.sidero.dev"}
2024-11-05T20:04:23.253+0400 WARN client/client.go:504 watch retrying {"error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 100.119.35.2:443: connect: connection refused\"", "bookmark": "AAAAAAAAASw=", "backoff": "4.74055025s", "namespace": "default", "type": "Users.omni.sidero.dev"}
2024-11-05T20:04:27.995+0400 WARN client/client.go:504 watch retrying {"error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 100.119.35.2:443: connect: connection refused\"", "bookmark": "AAAAAAAAASw=", "backoff": "7.308402811s", "namespace": "default", "type": "Users.omni.sidero.dev"}
2024-11-05T20:04:35.309+0400 WARN client/client.go:504 watch retrying {"error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 100.119.35.2:443: connect: connection refused\"", "bookmark": "AAAAAAAAASw=", "backoff": "8.806341922s", "namespace": "default", "type": "Users.omni.sidero.dev"}
default User cad2763b-1477-4bd5-9bc9-b3a369e39ffd 2
- default User cad2763b-1477-4bd5-9bc9-b3a369e39ffd 2
```
Signed-off-by: Andrey Smirnov <[email protected]>1 parent 23ccdb5 commit 3e8bc8d
7 files changed
+34
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
| |||
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
54 | 66 | | |
55 | 67 | | |
56 | 68 | | |
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
60 | | - | |
| 72 | + | |
61 | 73 | | |
62 | 74 | | |
63 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
115 | 127 | | |
116 | 128 | | |
117 | 129 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
0 commit comments