You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/12/30 20:58:25 UTC

[GitHub] [airflow] subkanthi commented on a change in pull request #20600: Fix mypy errors in postgres/hooks and postgres/operators

subkanthi commented on a change in pull request #20600:
URL: https://github.com/apache/airflow/pull/20600#discussion_r776864615



##########
File path: airflow/providers/postgres/hooks/postgres.py
##########
@@ -192,7 +192,7 @@ def get_iam_token(self, conn: Connection) -> Tuple[str, str, int]:
             # Pull the custer-identifier from the beginning of the Redshift URL
             # ex. my-cluster.ccdre4hpd39h.us-east-1.redshift.amazonaws.com returns my-cluster
             cluster_identifier = conn.extra_dejson.get('cluster-identifier', conn.host.split('.')[0])
-            session, endpoint_url = aws_hook._get_credentials()
+            session, endpoint_url = aws_hook._get_credentials(region_name=None)

Review comment:
       was just surprised to see aws_hook in postgres, Im sure its done for a reson.

##########
File path: airflow/providers/postgres/hooks/postgres.py
##########
@@ -192,7 +192,7 @@ def get_iam_token(self, conn: Connection) -> Tuple[str, str, int]:
             # Pull the custer-identifier from the beginning of the Redshift URL
             # ex. my-cluster.ccdre4hpd39h.us-east-1.redshift.amazonaws.com returns my-cluster
             cluster_identifier = conn.extra_dejson.get('cluster-identifier', conn.host.split('.')[0])
-            session, endpoint_url = aws_hook._get_credentials()
+            session, endpoint_url = aws_hook._get_credentials(region_name=None)

Review comment:
       was just surprised to see aws_hook in postgres, Im sure its done for a reason.




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