fix: log exceptions instead of silently swallowing them in Job/JobGroup.status - #569
Conversation
…up.status Job.status and JobGroup.status used with a , which swallowed status-check failures silently and made debugging hard. Preserve the existing fallback behavior (return last known state / UNKNOWN) but log the exception at ERROR level so operators can see when the runner is failing. Updates existing exception tests to assert the error is logged. Signed-off-by: Andrew White <andrewh@cdw.com>
|
✅ Review verdict: no blocking findings for #569. Blocking findings: None. What I reviewed Non-blocking follow-up: Checks: DCO passes. The exact head has nine GitHub Actions workflows in |
|
LGTM — #569 Blocking findings: None.
The updated tests ( Non-blocking observation: Validation: DCO passes. The nine GitHub Actions workflows for the exact head are |
Bug
Job.statusandJobGroup.statususedexcept Exception: ...with afinally: return, which swallowed status-check failures silently and made debugging hard.Fix
Preserve the existing fallback behavior (return last known state / UNKNOWN) but log the exception at ERROR level so operators can see when the runner is failing.
Test
Updated
test_job_status_exceptionandtest_job_group_status_exceptionto assert the error is logged usingcaplog.Verification
uv run pytest test/run/test_job.py::test_job_status_exception test/run/test_job.py::test_job_group_status_exception -vpasses.uv run --group lint ruff check ...andruff format --check ...pass.