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


##########
airflow/providers/amazon/aws/hooks/redshift_cluster.py:
##########
@@ -157,16 +158,24 @@ def create_cluster_snapshot(
         )
         return response["Snapshot"] if response["Snapshot"] else None
 
-    def get_cluster_snapshot_status(self, snapshot_identifier: str, 
cluster_identifier: str):
+    def get_cluster_snapshot_status(self, snapshot_identifier: str, 
cluster_identifier: str | None = None):
         """
         Return Redshift cluster snapshot status. If cluster snapshot not found 
return ``None``
 
         :param snapshot_identifier: A unique identifier for the snapshot that 
you are requesting
-        :param cluster_identifier: The unique identifier of the cluster the 
snapshot was created from
+        :param cluster_identifier: (deprecated) The unique identifier of the 
cluster
+            the snapshot was created from

Review Comment:
   The change was made as a result of debugging during testing for the redshift 
system test. It was not originally in scope of the refactoring of the 
`RedshiftResumeClusterOperator` and `RedshiftPauseClusterOperator`. I included 
it in this PR because the `get_cluster_snapshot_status` function does not work 
as written.
   
   >If boto3 accept this as valid input why should we prevent users from using 
it?
   
   Boto3 does not accept both inputs at the same time. If both are provided, we 
get an `InvalidParameterCombination` exception. 
   



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

Reply via email to