laksh-krishna-sharma opened a new pull request, #56077:
URL: https://github.com/apache/airflow/pull/56077
## Summary of Changes
This PR fixes the behavior of `EmrCreateJobFlowOperator` when global
deferrable mode is enabled (`AIRFLOW__OPERATORS__DEFAULT_DEFERRABLE=true`).
Previously, the operator would defer unconditionally if `deferrable=True`,
even when no wait policy was requested. This caused submit-only jobs (e.g.,
`wait_policy=None`) to unexpectedly defer. With this fix, the operator now only
defers when a wait policy is explicitly provided.
Closes #40966
---
## Changes Made
* Updated `EmrCreateJobFlowOperator` logic:
* Deferral now occurs **only when** `wait_policy` is set **and**
`deferrable=True`.
* Synchronous waiting occurs when `wait_policy` is set and
`deferrable=False`.
* No waiting or deferral happens when `wait_policy=None` (submit-only
mode).
* Adjusted tests to cover all scenarios:
* No wait policy + deferrable → submit-only (no defer).
* No wait policy + non-deferrable → submit-only (no waiter).
* Wait policy + deferrable → deferred (raises `TaskDeferred`).
* Wait policy + non-deferrable → synchronous wait with `get_waiter().wait`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]