Commit dd39fd4
committed
fix(client): bound the list window at the call time
`List` never set `ReceivedBeforeMs`, and the gateway rejects any list where `received_at_or_after_ms >= received_before_ms` (`gateway/controller/list.go:85`). With `Since` unset the client sent `(0, 0)` and with `-since 1h` it sent `(now-1h, 0)` — both invalid, so every `list` call, and every `watch` that did not name its requests with `-sqid`, failed with InvalidArgument against a real gateway.
Both bounds are now taken from a single `now` before the first page. Fixing them up front is required rather than tidy: the continuation token pins both bounds (`list.go:111`), so a bound recomputed per page would be rejected from the second page on.1 parent d7fb1cf commit dd39fd4
2 files changed
Lines changed: 51 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
56 | 65 | | |
57 | | - | |
| 66 | + | |
58 | 67 | | |
59 | 68 | | |
60 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
111 | 147 | | |
112 | 148 | | |
113 | 149 | | |
| |||
143 | 179 | | |
144 | 180 | | |
145 | 181 | | |
| 182 | + | |
146 | 183 | | |
147 | 184 | | |
148 | 185 | | |
149 | 186 | | |
| 187 | + | |
150 | 188 | | |
151 | 189 | | |
152 | 190 | | |
| |||
0 commit comments