vincbeck commented on code in PR #31215:
URL: https://github.com/apache/airflow/pull/31215#discussion_r1191436879
##########
airflow/providers/amazon/aws/operators/emr.py:
##########
@@ -102,10 +104,22 @@ def __init__(
self.waiter_max_attempts = waiter_max_attempts
self.execution_role_arn = execution_role_arn
- def execute(self, context: Context) -> list[str]:
- emr_hook = EmrHook(aws_conn_id=self.aws_conn_id)
+ @cached_property
+ def hook(self) -> EmrHook:
+ """Create and return an EmrHook."""
+ # Increase the number of max attempts (default 5) because the
AddJobFlowSteps API gets throttled,
+ # replenishment is quite slow.
+ # See https://docs.aws.amazon.com/general/latest/gr/emr.html#limits_emr
+ config = Config(
+ retries={
+ "max_attempts": 10,
Review Comment:
Setting the PR as draft to not merge it accidentally. Meanwhile, I am going
to think a bit more on that specific issue
--
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]