AIP-97 (2/3): classify Kubernetes pod failures as infra - #12
Draft
1fanwang wants to merge 1 commit into
Draft
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 27, 2026
1fanwang
force-pushed
the
aip97-p2-k8s-bridge
branch
from
July 27, 2026 18:11
80ee60b to
04932be
Compare
…he scheduler The Kubernetes executor's classify_pod_failure() maps a node-level disruption (Evicted, Preempting, DisruptionTarget, node shutdown) or a pod removed while its task is running (PodDeleted — drain, preemption, spot reclaim, force-delete) to failure_kind=infra; a container that ended on its own (an app crash, an OOM against its own limit) to application. The classification rides a side channel on BaseExecutor that the scheduler reads once and passes to the listener with the executor's reason token. An unclassified death stays None, so the scheduler stays conservative and never guesses infra. Builds on the failure_kind foundation; the opt-in retry refund follows. Signed-off-by: 1fanwang <1fannnw@gmail.com>
1fanwang
force-pushed
the
aip97-p1-failure-context
branch
from
July 27, 2026 20:01
519dc7e to
f6f1416
Compare
1fanwang
force-pushed
the
aip97-p2-k8s-bridge
branch
from
July 27, 2026 20:01
04932be to
57549f0
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 2 of 3, on top of 1/3. Consolidated view: apache/airflow#66405.
Why
1/3 gave the listener a
failure_kind, but nothing setsinfrayet. An eviction is visible only to the executor, which currently flattens it to a log string. This wires the Kubernetes executor to classify the failure by reading the pod failure details it already collects.What
classify_pod_failure()maps the pod's failure shape to a kind. A node-level disruption (Evicted,Preempting,DisruptionTarget, node shutdown) or a pod removed while running (PodDeleted: drain, preemption, spot reclaim, force-delete) isinfra; a container that died on its own, such as a crash or own-limit OOM, isapplication.BaseExecutorthat the scheduler reads once and passes to the listener, persisted asinfra_reason.None, so the scheduler never guessesinfra.No retry change here. An infra failure reaches the listener as
failure_kind=infrabut still spends the retry. The refund is 3/3.Testing
test_classify_pod_failure: realV1Podreads (Evictedto infra,OOMKilledto application,PodDeletedto infra), and the executor's failure-info handoff round-trips the classification once.