Skip to content

KubernetesPodOperator deferred callbacks#47108

Merged
potiuk merged 18 commits into
apache:mainfrom
johnhoran:kubernetes-defer-callback
Oct 13, 2025
Merged

KubernetesPodOperator deferred callbacks#47108
potiuk merged 18 commits into
apache:mainfrom
johnhoran:kubernetes-defer-callback

Conversation

@johnhoran

Copy link
Copy Markdown
Contributor

This adds support for on_pod_manifest_created, on_pod_completion and on_pod_teardown to the kubernetes pod operator when it is running in deffered mode. These callbacks are already supported in non-deferred mode, on_pod_manifest_created runs prior to the task deferring and on_pod_completion and on_pod_teardown run after the pod is completed, when the operator resumes in order to cleanup the pod.

@boring-cyborg boring-cyborg Bot added the provider:cncf-kubernetes Kubernetes (k8s) provider related issues label Feb 26, 2025
@potiuk

potiuk commented Apr 1, 2025

Copy link
Copy Markdown
Member

Needs rebase.

@johnhoran
johnhoran force-pushed the kubernetes-defer-callback branch from 9eee6fd to 46f6eca Compare April 8, 2025 15:34
@johnhoran

Copy link
Copy Markdown
Contributor Author

@potiuk rebased

@johnhoran
johnhoran force-pushed the kubernetes-defer-callback branch from 3e20efc to 03fcd9f Compare June 16, 2025 12:43
@johnhoran
johnhoran marked this pull request as draft July 22, 2025 15:53
@johnhoran
johnhoran marked this pull request as ready for review July 22, 2025 17:39
@eladkal
eladkal requested a review from romsharon98 July 23, 2025 07:48
@github-actions

github-actions Bot commented Sep 8, 2025

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Sep 8, 2025

@romsharon98 romsharon98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@potiuk
potiuk merged commit 895e8ed into apache:main Oct 13, 2025
90 checks passed
TyrellHaywood pushed a commit to TyrellHaywood/airflow that referenced this pull request Oct 22, 2025
* test print

* uv test

* add defer callbacks

* cleanup

* remove redundant call

* move test to async

* add callbacks to test

* cleanup

* format

* Update pod.py

* space

* ruff fix

* merge recent changes

* fix pass args

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

Labels

provider:cncf-kubernetes Kubernetes (k8s) provider related issues stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants