fix(alerts): keep the reframe v2 failure in a job's error text
A clip render dies in two steps: reframe_v2.render raises (it has a single
`return True` and no False path), main.py prints "Reframe v2 failed
(<Type>: <msg>)" and falls back to the v1 frame loop, and only if v1 also
fails does "Clip N failed" appear. The alert classifier picked the second
line and not the first, so it named the fallback's exception and hid the
one that actually started it.
Both lines are wanted now. This matters because the zero-clip jobs fixed
in ff2ad3d were reported as completed and never alerted at all; from now
on they fail properly and page, and the page should carry the root cause
rather than v1's symptom.
Claude-Session: https://claude.ai/code/session_01UZGqjYcZyfmKww1gcyKrp5
This commit is contained in:
parent
5cc3d46997
commit
a9e2e9b1c4
1 changed files with 9 additions and 1 deletions
10
app.py
10
app.py
|
|
@ -1381,7 +1381,15 @@ async def _notify_clip_activity(job_id):
|
||||||
# alerts with a bare "Traceback ... exit code 1" and no cause (prod 20-ago).
|
# alerts with a bare "Traceback ... exit code 1" and no cause (prod 20-ago).
|
||||||
_ERROR_MARKERS = ("❌", "ERROR:", "Error:", "Traceback", "FATAL", "Exception",
|
_ERROR_MARKERS = ("❌", "ERROR:", "Error:", "Traceback", "FATAL", "Exception",
|
||||||
"Process failed with exit code", "No metadata file generated",
|
"Process failed with exit code", "No metadata file generated",
|
||||||
"Execution error:")
|
"Execution error:",
|
||||||
|
# A clip render dies in two steps: reframe_v2 raises (it has
|
||||||
|
# no False return, only `return True`), main.py prints this
|
||||||
|
# and falls back to the v1 loop, and only if v1 ALSO fails
|
||||||
|
# does "❌ Clip N failed" appear. The ❌ line then carries
|
||||||
|
# v1's exception, not the one that started it, so without
|
||||||
|
# this marker the alert names the fallback and hides the
|
||||||
|
# cause. Both lines are wanted.
|
||||||
|
"Reframe v2 failed")
|
||||||
|
|
||||||
|
|
||||||
def _job_error_text(logs) -> str:
|
def _job_error_text(logs) -> str:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue