Commit 455d645
Tadej Borovšak
Remove event module result
Sensu Go backend processes events in asynchronous fashion, which makes
it almost impossible to retrieve the processed event shortly after it
has been sent to the backend.
Currently, after we submit an event, we query the backend for the last
event. What we get back is one of the following three options:
1. nothing, if our event is the first event ever and the backend did
not manage to process it yet;
2. previous event, if there is at least one preexisting event on the
backend and our event has not been processed yet;
3. our actual event, if the backend processed our event fast enough.
In the real world setting, the third scenario almost never happens,
which means that our event module is returning bogus results most of
the time.
To rectify the situation, we removed the result from the event module.
NOTE: This change breaks the API. Major version bump is needed when
releasing the version of collection that contains changes from this
commit.1 parent 4e72371 commit 455d645
File tree
3 files changed
+42
-44
lines changed- plugins/modules
- tests
- integration/molecule/module_event
- unit/modules
3 files changed
+42
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 159 | + | |
161 | 160 | | |
162 | 161 | | |
163 | 162 | | |
| |||
220 | 219 | | |
221 | 220 | | |
222 | 221 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | 222 | | |
231 | 223 | | |
232 | 224 | | |
| |||
281 | 273 | | |
282 | 274 | | |
283 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
284 | 279 | | |
285 | 280 | | |
286 | 281 | | |
| |||
289 | 284 | | |
290 | 285 | | |
291 | 286 | | |
292 | | - | |
293 | | - | |
| 287 | + | |
| 288 | + | |
294 | 289 | | |
295 | 290 | | |
296 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 92 | | |
96 | 93 | | |
97 | 94 | | |
| |||
100 | 97 | | |
101 | 98 | | |
102 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | 186 | | |
197 | 187 | | |
198 | 188 | | |
199 | 189 | | |
200 | 190 | | |
201 | 191 | | |
202 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
203 | 198 | | |
204 | 199 | | |
205 | 200 | | |
206 | 201 | | |
207 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
208 | 215 | | |
209 | 216 | | |
210 | 217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
| 75 | + | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
101 | | - | |
| 100 | + | |
102 | 101 | | |
103 | 102 | | |
104 | 103 | | |
| |||
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
121 | | - | |
122 | 120 | | |
123 | 121 | | |
124 | 122 | | |
| |||
139 | 137 | | |
140 | 138 | | |
141 | 139 | | |
142 | | - | |
143 | | - | |
| 140 | + | |
144 | 141 | | |
145 | 142 | | |
146 | 143 | | |
| |||
198 | 195 | | |
199 | 196 | | |
200 | 197 | | |
201 | | - | |
| 198 | + | |
202 | 199 | | |
203 | 200 | | |
204 | 201 | | |
| |||
264 | 261 | | |
265 | 262 | | |
266 | 263 | | |
267 | | - | |
268 | 264 | | |
269 | 265 | | |
270 | | - | |
271 | | - | |
| 266 | + | |
| 267 | + | |
272 | 268 | | |
273 | 269 | | |
274 | 270 | | |
| |||
0 commit comments