You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "syedahsn (via GitHub)" <gi...@apache.org> on 2023/03/06 19:45:54 UTC

[GitHub] [airflow] syedahsn commented on a diff in pull request #28850: Add deferrable mode in RedshiftPauseClusterOperator

syedahsn commented on code in PR #28850:
URL: https://github.com/apache/airflow/pull/28850#discussion_r1126950222


##########
airflow/providers/amazon/aws/operators/redshift_cluster.py:
##########
@@ -458,11 +460,15 @@ def __init__(
         *,
         cluster_identifier: str,
         aws_conn_id: str = "aws_default",
+        deferrable: bool = False,
+        poll_interval: int = 10,

Review Comment:
   Our team is currently working on implementing deferrable operators as well, and we're taking a slightly different approach. Rather than create async counterparts for all AWS hooks, we are planning to create an `async_conn` property similar to the existing `conn` property. The `async_conn` property will return a `ClientCreatorContext` object that can be used to create an aiobotocore client that can make async calls to the boto3 API. With this approach, we reduce a lot of complexity and code duplication by not having separate async hooks for every service. Additionally, we are focusing on using waiters to perform the polling operations so that most of the triggers will be in a standard format. The aiobotocore library has an AIOWaiter class that make asynchronous calls to the boto3 API which makes it very easy to implement most waiters. This also saves us from having to write custom describe calls for every service. We are currently reviewing the design, but will have a PR for the co
 mmunity shortly.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org