vincbeck commented on code in PR #74399:
URL: https://github.com/apache/airflow/pull/74399#discussion_r4211407335
##########
providers/amazon/src/airflow/providers/amazon/aws/utils/eks_get_token.py:
##########
@@ -49,9 +49,12 @@ def get_parser():
return parser
-def fetch_access_token_for_cluster(eks_cluster_name: str, sts_url: str,
region_name: str) -> str:
- # This will use the credentials from the caller set as the standard AWS
env variables
- session = boto3.Session(region_name=region_name)
+def fetch_access_token_for_cluster(
+ eks_cluster_name: str, sts_url: str, region_name: str, session:
boto3.Session | None = None
Review Comment:
Could you combine them? That's always easier to review a feature when you
use it :) It also avoid having useless code in case you forget/drop the
incoming PR
--
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]