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


##########
airflow/providers/amazon/aws/hooks/eks.py:
##########
@@ -521,6 +521,33 @@ def generate_config_file(
         :param eks_cluster_name: The name of the cluster to generate 
kubeconfig file for.
         :param pod_namespace: The namespace to run within kubernetes.
         """
+        args = ""
+        if self.region_name is not None:
+            args = args + f" --region-name {self.region_name}"
+
+        if self.aws_conn_id is not None:
+            args = args + f" --aws-conn-id {self.aws_conn_id}"
+
+        python_executable = 
f"python{sys.version_info[0]}.{sys.version_info[1]}"

Review Comment:
   This is necessary because we need to determine which python executable the 
host is running in order to correctly call the `eks_get_token.py` script as we 
are doing below. By using `sys.version_info`, the solution is generic enough to 
work with any supported python version.



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