Skip to content

Conversation

@stephen-bracken
Copy link
Contributor

@stephen-bracken stephen-bracken commented Jan 10, 2026

KubernetesJobOperator will raise an error in get_pods() if parallelism=0, this PR refactors the execution flow so that KubernetesJobOperator.get_pods() only gets called if wait_until_job_complete=True, allowing for tasks to create a Job with parallelism:0 when the pods are not being tracked. This is a followup from #53368

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 or {issue_number}.significant.rst, in airflow-core/newsfragments.

@boring-cyborg boring-cyborg bot added area:providers kind:documentation provider:cncf-kubernetes Kubernetes (k8s) provider related issues labels Jan 10, 2026
@stephen-bracken stephen-bracken force-pushed the stephen-bracken/cncf-kubernetes-job-fix branch 2 times, most recently from d24cd13 to faa09ef Compare January 10, 2026 16:39
@shahar1
Copy link
Contributor

shahar1 commented Jan 10, 2026

Good catch! Seems like a useful edge case for pausing existing jobs which we didn't cover in #53368 (see similar case in Terraform: hashicorp/terraform-provider-kubernetes#1313).

@stephen-bracken stephen-bracken force-pushed the stephen-bracken/cncf-kubernetes-job-fix branch 8 times, most recently from 70791c4 to dca3115 Compare January 12, 2026 13:39
@stephen-bracken stephen-bracken force-pushed the stephen-bracken/cncf-kubernetes-job-fix branch from dca3115 to f980e10 Compare January 12, 2026 14:41
@stephen-bracken stephen-bracken marked this pull request as ready for review January 12, 2026 15:53
@shahar1
Copy link
Contributor

shahar1 commented Jan 12, 2026

Awesome!
I'll be happy if you could test it as part of the upcoming providers release tomorrow.

@shahar1 shahar1 merged commit 32d0ae2 into apache:main Jan 12, 2026
199 checks passed
iharsh02 pushed a commit to iharsh02/airflow that referenced this pull request Jan 13, 2026
jason810496 pushed a commit to jason810496/airflow that referenced this pull request Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants