Commit c075f6e
committed
fix(ci): write pessimistic test status before Playwright execution
When Prow kills a job (2h timeout) or Playwright hangs, the
mark_test_result call at the end of testing::run_tests never executes.
This leaves STATUS_TEST_FAILED.txt and STATUS_NUMBER_OF_TEST_FAILED.txt
with fewer entries than STATUS_DEPLOYMENT_NAMESPACE.txt, creating
misaligned arrays that break downstream reporting (Slack notifications).
Fix: write a pessimistic default (failed=true, count=N/A) immediately
after registering the test run. The real result overwrites it after
Playwright completes. If the job is killed mid-test, the STATUS files
still have entries for all registered test runs.
To support this, save_status_test_failed and save_status_number_of_test_failed
now regenerate the file from the in-memory array instead of appending,
making them safe to call multiple times for the same deployment ID.
Assisted-by: OpenCode1 parent 09387b5 commit c075f6e
2 files changed
Lines changed: 25 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | | - | |
53 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
54 | 69 | | |
55 | 70 | | |
56 | 71 | | |
| |||
0 commit comments