You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vandonr-amz (via GitHub)" <gi...@apache.org> on 2023/05/09 18:54:40 UTC

[GitHub] [airflow] vandonr-amz commented on a diff in pull request #30853: Change Deferrable implementation for RedshiftPauseClusterOperator to follow standard

vandonr-amz commented on code in PR #30853:
URL: https://github.com/apache/airflow/pull/30853#discussion_r1189016864


##########
airflow/providers/amazon/aws/operators/redshift_cluster.py:
##########
@@ -524,64 +528,55 @@ def __init__(
         aws_conn_id: str = "aws_default",
         deferrable: bool = False,
         poll_interval: int = 10,
+        max_attempts: int = 15,
         **kwargs,
     ):
         super().__init__(**kwargs)
         self.cluster_identifier = cluster_identifier
         self.aws_conn_id = aws_conn_id
         self.deferrable = deferrable
+        self.max_attempts = max_attempts
         self.poll_interval = poll_interval
-        # These parameters are added to address an issue with the boto3 API where the API
+        # These parameters are used to address an issue with the boto3 API where the API
         # prematurely reports the cluster as available to receive requests. This causes the cluster
         # to reject initial attempts to pause the cluster despite reporting the correct state.
-        self._attempts = 10
+        self._remaining_attempts = 10

Review Comment:
   I must say this is very confusing to see this next to a `max_attempts` parameter and realize that they have nothing to do with each other



-- 
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