dbarrundiag commented on a change in pull request #19665:
URL: https://github.com/apache/airflow/pull/19665#discussion_r759676530



##########
File path: airflow/providers/amazon/aws/hooks/redshift.py
##########
@@ -65,9 +81,9 @@ def cluster_status(self, cluster_identifier: str) -> str:
         """
         try:
             response = 
self.get_conn().describe_clusters(ClusterIdentifier=cluster_identifier)['Clusters']
-            return response[0]['ClusterStatus'] if response else None
+            return RedshiftClusterStates(response[0]['ClusterStatus']) if 
response else None

Review comment:
       @o-nikolas had some good thoughts here on using the `Enum`:
   https://github.com/apache/airflow/pull/19665#discussion_r753507478
   
   essentially because that's what was used on the EKS operators similar to 
this `airflow/airflow/providers/amazon/aws/hooks/eks.py`




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