Add resumable_job.reconnect_failure metric for failed reconnects - #70653
Open
1fanwang wants to merge 1 commit into
Open
Add resumable_job.reconnect_failure metric for failed reconnects#706531fanwang wants to merge 1 commit into
1fanwang wants to merge 1 commit into
Conversation
1fanwang
requested review from
amoghrajesh,
ashb,
kaxil and
potiuk
as code owners
July 29, 2026 00:43
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
force-pushed
the
resumable-job-reconnect-failure
branch
from
July 29, 2026 06:23
91cfbe1 to
803b94e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
reconnect_attempt (14) == reconnect_success + already_succeeded + terminal_resubmit
attempts do not reconcile.
Was generative AI tooling used to co-author this PR?
Generated-by: GitHub Copilot CLI (Claude Opus 4.8) following the guidelines