Skip to content

Add resumable_job.reconnect_failure metric for failed reconnects - #70653

Open
1fanwang wants to merge 1 commit into
apache:mainfrom
1fanwang:resumable-job-reconnect-failure
Open

Add resumable_job.reconnect_failure metric for failed reconnects#70653
1fanwang wants to merge 1 commit into
apache:mainfrom
1fanwang:resumable-job-reconnect-failure

Conversation

@1fanwang

@1fanwang 1fanwang commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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?
  • Yes — GitHub Copilot CLI (Claude Opus 4.8)

Generated-by: GitHub Copilot CLI (Claude Opus 4.8) following the guidelines

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.

Signed-off-by: 1fanwang <1fannnw@gmail.com>
@1fanwang
1fanwang force-pushed the resumable-job-reconnect-failure branch from 91cfbe1 to 803b94e Compare July 29, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant