AIP-97 (3/3): refund the retry attempt for an infra-classified failure (opt-in) - #13
Draft
1fanwang wants to merge 1 commit into
Draft
AIP-97 (3/3): refund the retry attempt for an infra-classified failure (opt-in)#131fanwang wants to merge 1 commit into
1fanwang wants to merge 1 commit into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Jul 25, 2026
1fanwang
force-pushed
the
aip97-p2-k8s-bridge
branch
from
July 27, 2026 18:11
80ee60b to
04932be
Compare
1fanwang
force-pushed
the
aip97-p3-infra-refund
branch
from
July 27, 2026 18:11
7d568c9 to
7214d65
Compare
…-in) When failure_kind is infra, [core] infra_failure_refund_retries bumps max_tries so the attempt is given back instead of drawing on the user's retries, bounded by [core] max_infra_refunds. Off by default; application, timeout, and manual failures never refund. This extends the Kubernetes executor's existing behavior — a pod that dies before the task starts is already requeued without consuming a retry — to the mid-execution case, now that the failure is classified. Completes the AIP-97 foundation stack. Signed-off-by: 1fanwang <1fannnw@gmail.com>
1fanwang
force-pushed
the
aip97-p2-k8s-bridge
branch
from
July 27, 2026 20:01
04932be to
57549f0
Compare
1fanwang
force-pushed
the
aip97-p3-infra-refund
branch
from
July 27, 2026 20:01
7214d65 to
c822f45
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.
Part 3 of 3, on top of 2/3. Consolidated view with in-cluster e2e: apache/airflow#66405.
Why
With the failure classified (1/3, 2/3), an infra disruption should not draw down the retry budget a user set for their own code.
is_eligible_to_retry()istry_number <= max_tries, withmax_tries = task.retries, so today an eviction spends a real retry.What
When
failure_kind == infra,[core] infra_failure_refund_retriesbumpsmax_triesso the attempt is given back instead of chargingretries, capped by[core] max_infra_refunds. The feature is off by default.application,timeout, andmanualnever refund.This extends the executor's existing pre-start requeue without a retry to the mid-run case.
Testing
test_taskinstance_infra_refundandtest_taskinstance_failure_kind_sources: onlyinfrarefunds, the cap holds, and every other cause spends the retry.test_process_executor_events_infra_classificationdrives the scheduler wiring: unclassified means no refund;infrachangesmax_triesfrom 1 to 2. Full in-cluster KubernetesExecutor run in apache/airflow#66405.