syedahsn commented on code in PR #30244:
URL: https://github.com/apache/airflow/pull/30244#discussion_r1179467321
##########
airflow/providers/amazon/aws/operators/redshift_cluster.py:
##########
@@ -624,8 +629,15 @@ def __init__(
self._attempts = 10
self._attempt_interval = 15
self.redshift_hook = RedshiftHook(aws_conn_id=aws_conn_id)
+ self.aws_conn_id = aws_conn_id
+ self.deferrable = deferrable
+ self.max_attempts = max_attempts
+
+ if self.deferrable and self.wait_for_completion:
+ raise AirflowException("Both wait_for_completion and deferrable
can't be True.")
Review Comment:
I was thinking more on this, and I'm still not sure what the best practice
would be. On one hand, I understand what you are saying here - both
`deferrable` and `wait_for_completion` shouldn't be `True` because only one
path can be taken (in this case, the `deferrable` path will be taken).
But on the other hand, is it important to bother the user with that detail?
If a user wants an operator to complete its execution, and also wants
deferrable behavior, we can make the choice for the user use the deferrable
parameter.
--
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]