shahar1 commented on code in PR #56158:
URL: https://github.com/apache/airflow/pull/56158#discussion_r2386297379


##########
providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:
##########
@@ -698,19 +697,22 @@ def __init__(
         super().__init__(**kwargs)
         self.emr_conn_id = emr_conn_id
         self.job_flow_overrides = job_flow_overrides or {}
-        self.wait_policy = wait_policy
+        self.wait_for_completion = wait_for_completion
         self.waiter_max_attempts = waiter_max_attempts or 60
         self.waiter_delay = waiter_delay or 60
         self.deferrable = deferrable
 
-        if wait_for_completion is not None:
+        if wait_policy is not None:
             warnings.warn(
-                "`wait_for_completion` parameter is deprecated, please use 
`wait_policy` instead.",
+                "`wait_policy` parameter is deprecated, please use 
`wait_for_completion` instead.",
                 AirflowProviderDeprecationWarning,
                 stacklevel=2,
             )
-            # preserve previous behaviour
-            self.wait_policy = WaitPolicy.WAIT_FOR_COMPLETION if 
wait_for_completion else None
+            self.wait_policy = wait_policy
+            self.wait_for_completion = wait_policy in (
+                WaitPolicy.WAIT_FOR_COMPLETION,
+                WaitPolicy.WAIT_FOR_STEPS_COMPLETION,
+            )

Review Comment:
   @laksh-krishna-sharma please try to polish this one.
   After that I think that we're good :)



-- 
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]

Reply via email to