1fanwang opened a new pull request, #70653:
URL: https://github.com/apache/airflow/pull/70653

   A ResumableJobMixin retry increments resumable_job.reconnect_attempt and 
then one
   of reconnect_success / already_succeeded / terminal_resubmit, but only once 
the
   prior job's status has been fetched and classified. When that status check 
raises
   (external system unreachable, expired id, and so on) the attempt resolves to 
no
   outcome: the failure is silent and reconnect_attempt no longer reconciles 
with its
   outcome counters. Reconnection failure is the signal an operator most wants 
to
   alert on, yet today it cannot be measured.
   
   resumable_job.reconnect_failure is emitted when the reconnect decision 
raises, so
   every reconnect_attempt resolves to exactly one outcome.
   
   ## Testing
   
   Unit: a parametrized regression test covers the status-fetch and 
status-classification
   raise paths (fails on main, passes here); the full test_resumablejobmixin.py 
suite is
   green (42 passed).
   
   E2E: drove the real ResumableJobMixin against a real StatsD -> 
statsd-exporter ->
   Prometheus -> Grafana stack. A scenario of 4 active + 3 succeeded + 2 
terminal + 5
   raising reconnects, plus 6 fresh submits, produced in Prometheus:
   
       airflow_resumable_job_reconnect_attempt   14
       airflow_resumable_job_reconnect_success    4
       airflow_resumable_job_already_succeeded    3
       airflow_resumable_job_terminal_resubmit    2
       airflow_resumable_job_reconnect_failure    5
       airflow_resumable_job_fresh_submit         6
   
   reconnect_attempt (14) == reconnect_success + already_succeeded + 
terminal_resubmit
   + reconnect_failure (4 + 3 + 2 + 5). Without this change the sum is 9 and the
   attempts do not reconcile.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — GitHub Copilot CLI (Claude Opus 4.8)
   
   Generated-by: GitHub Copilot CLI (Claude Opus 4.8) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to