syedahsn commented on code in PR #31657:
URL: https://github.com/apache/airflow/pull/31657#discussion_r1228786895
##########
airflow/providers/amazon/aws/operators/eks.py:
##########
@@ -401,13 +417,31 @@ def execute(self, context: Context):
selectors=self.selectors,
**self.create_fargate_profile_kwargs,
)
-
- if self.wait_for_completion:
+ if self.deferrable:
+ self.defer(
+ trigger=EksCreateFargateProfileTrigger(
+ cluster_name=self.cluster_name,
+ fargate_profile_name=self.fargate_profile_name,
+ aws_conn_id=self.aws_conn_id,
+ poll_interval=self.waiter_delay,
+ max_attempts=self.waiter_max_attempts,
+ ),
+ method_name="execute_complete",
+ timeout=timedelta(seconds=(self.waiter_max_attempts *
self.waiter_delay + 60)),
Review Comment:
I have a comment that I used in the redshift operators. I'll use that to be
consistent:
```
# timeout is set to ensure that if a trigger dies, the timeout does not
restart
# 60 seconds is added to allow the trigger to exit gracefully (i.e. yield
TriggerEvent)
```
--
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]