Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Retry KubernetesPodOperator pod-status reads on a transient 404 - #73106

Closed
hitenshKharva wants to merge 2 commits into
apache:mainfrom
hitenshKharva:claude/issue-72284-fix-gywj91
Closed

hitenshKharva wants to merge 2 commits into
apache:mainfrom
hitenshKharva:claude/issue-72284-fix-gywj91

Conversation

@hitenshKharva

@hitenshKharva hitenshKharva commented Sep 13, 2026

Copy link
Copy Markdown

A task pod can 404 briefly when a higher-priority daemonset pod (commonly scheduled by node autoscalers like Karpenter on newly created nodes) preempts it before Kubernetes reschedules it elsewhere. Reading pod status during this window previously failed the task outright since 404 was excluded from the operator's existing transient-error retry set, even though the failure is transient infrastructure churn rather than a real problem with the task.

Closes: #59626

Claude-Session: https://claude.ai/code/session_01SaCoAHZUXWqg6eAX9Godp9


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

A task pod can 404 briefly when a higher-priority daemonset pod
(commonly scheduled by node autoscalers like Karpenter on newly
created nodes) preempts it before Kubernetes reschedules it
elsewhere. Reading pod status during this window previously failed
the task outright since 404 was excluded from the operator's
existing transient-error retry set, even though the failure is
transient infrastructure churn rather than a real problem with the
task.

Closes: apache#59626

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SaCoAHZUXWqg6eAX9Godp9
@boring-cyborg

boring-cyborg Bot commented Sep 13, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://s.apache.org/airflow-slack

The chart set GIT_SYNC_BRANCH, GIT_SYNC_REV, and GITSYNC_REF
unconditionally, using v2-2-stable/HEAD as the legacy defaults for
the first two. git-sync v4 gives the legacy branch/rev flags
precedence over ref whenever both are present, so a user who only
customized dags.gitSync.ref (the documented v4 way to pin a
revision) got silently overridden back to the chart's default
branch instead - most visibly when node autoscaling or pod
rescheduling caused an unexpected checkout of the wrong ref.

branch and rev now default to unset and are only emitted when a
user opts into them explicitly (e.g. to pin an older git-sync v3
image), so ref is authoritative by default as the git-sync v4 docs
intend.

Note: the lint-helm-chart and kubeconform prek hooks were skipped
for this commit because the sandbox this was authored in blocks
get.helm.sh (needed by `breeze k8s setup-env` to provision the helm
binary those hooks shell out to). Run them locally or rely on CI
before merging.

Closes: apache#42918

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SaCoAHZUXWqg6eAX9Godp9
@hitenshKharva

Copy link
Copy Markdown
Author

This issue seems to be already fixed. Apologies for the rework and noise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kubernetes Pod Operator fails with 404 errors when pods are preempted by daemonsets

2 participants