Commit 4620947
fix(ci-insights): Preserve initial test status during flaky detection reruns (#358)
In unhealthy mode, the span's `test.case.result.status` was being
overwritten with "rerun" during each rerun iteration. Since "rerun" is
not a valid status on the server side, these spans were being dropped,
causing `rerun_count` to never be recorded for unhealthy tests.
This fix ensures span attributes are only set during the initial test
run by checking `is_test_rerun()` and returning early for subsequent
reruns. The `test.case.result.status` now correctly reflects the
initial run's outcome.
Fixes: MRGFY-6373
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 856687b commit 4620947
File tree
3 files changed
+20
-0
lines changed- pytest_mergify
- tests
3 files changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
367 | 378 | | |
368 | 379 | | |
369 | 380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
256 | 263 | | |
257 | 264 | | |
258 | 265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
311 | 313 | | |
312 | 314 | | |
313 | 315 | | |
| |||
0 commit comments