Commit ef40c89
authored
[receiver/k8seventsreceiver] avoid panic on non-Event objects in informer handler (#43018)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
As discussed in the following
[thread](#42330 (comment)),
I decided to open a dedicated PR for this.
The change just makes the code safer, as before we were assuming the
object was always an Event, which could panic if it wasn’t. Now we check
first, and skip anything that isn’t an Event.
Signed-off-by: Paulo Dias <[email protected]>1 parent b1b09b4 commit ef40c89
File tree
2 files changed
+33
-4
lines changed- .chloggen
- receiver/k8seventsreceiver
2 files changed
+33
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | | - | |
158 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| |||
0 commit comments