Copilot commented on code in PR #56158:
URL: https://github.com/apache/airflow/pull/56158#discussion_r2386336707
##########
providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:
##########
@@ -748,8 +758,8 @@ def execute(self, context: Context) -> str | None:
job_flow_id=self._job_flow_id,
log_uri=get_log_uri(emr_client=self.hook.conn,
job_flow_id=self._job_flow_id),
)
- if self.wait_policy:
- waiter_name = WAITER_POLICY_NAME_MAPPING[self.wait_policy]
+ if self.wait_for_completion:
+ waiter_name =
WAITER_POLICY_NAME_MAPPING[WaitPolicy.WAIT_FOR_COMPLETION]
Review Comment:
The hardcoded waiter policy loses functionality when `wait_policy` was
`WaitPolicy.WAIT_FOR_STEPS_COMPLETION`. The original behavior should be
preserved by storing the original wait policy and using it here, or by
extending the boolean parameter to support the steps completion option.
```suggestion
waiter_name = WAITER_POLICY_NAME_MAPPING[self.wait_policy]
```
--
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]