Commit 23b4690
committed
fix: correct deduplication of watch events
This is extracted from #633 as a separate fix.
The idea is that if we merge/deduplicate watch events, we should do this
by immutable attributes of the resource: namespace, type, id.
The previous implementation might split two events on e.g. finalizers
being empty, so two events which report finalizers empty/finalizers
non-empty might be delivered in the wrong order: first empty, next
non-empty.
It might not trigger a real bug due to the way controllers work, but
still is not consistent and correct.
Signed-off-by: Andrey Smirnov <[email protected]>1 parent 40d59e1 commit 23b4690
File tree
2 files changed
+38
-12
lines changed- pkg/controller/runtime
- internal/reduced
2 files changed
+38
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
15 | 30 | | |
16 | 31 | | |
17 | 32 | | |
18 | 33 | | |
19 | 34 | | |
20 | 35 | | |
21 | 36 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
27 | 47 | | |
28 | 48 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
273 | 278 | | |
274 | 279 | | |
275 | | - | |
| 280 | + | |
276 | 281 | | |
277 | 282 | | |
278 | 283 | | |
| |||
353 | 358 | | |
354 | 359 | | |
355 | 360 | | |
356 | | - | |
| 361 | + | |
| 362 | + | |
357 | 363 | | |
358 | 364 | | |
359 | 365 | | |
| |||
0 commit comments