This is an automated email from the ASF dual-hosted git repository.
shahar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 2b6ef4acc6c EKS hook: Update auth. API version to v1 and replace
non-POSIX 'source' with '.' (#61441)
2b6ef4acc6c is described below
commit 2b6ef4acc6c34874c7f231d6fc0a0da8ffa84d5e
Author: Idris Akorede Ibrahim <[email protected]>
AuthorDate: Tue Feb 10 18:07:49 2026 +0100
EKS hook: Update auth. API version to v1 and replace non-POSIX 'source'
with '.' (#61441)
---
providers/amazon/src/airflow/providers/amazon/aws/hooks/eks.py | 6 +++---
providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/providers/amazon/src/airflow/providers/amazon/aws/hooks/eks.py
b/providers/amazon/src/airflow/providers/amazon/aws/hooks/eks.py
index 70298d66afe..25db498ebec 100644
--- a/providers/amazon/src/airflow/providers/amazon/aws/hooks/eks.py
+++ b/providers/amazon/src/airflow/providers/amazon/aws/hooks/eks.py
@@ -36,7 +36,7 @@ from airflow.providers.amazon.aws.hooks.sts import StsHook
from airflow.utils import yaml
DEFAULT_PAGINATION_TOKEN = ""
-AUTHENTICATION_API_VERSION = "client.authentication.k8s.io/v1alpha1"
+AUTHENTICATION_API_VERSION = "client.authentication.k8s.io/v1"
_POD_USERNAME = "aws"
_CONTEXT_NAME = "aws"
@@ -79,8 +79,8 @@ class NodegroupStates(Enum):
COMMAND = """
export PYTHON_OPERATORS_VIRTUAL_ENV_MODE=1
- # Source credentials from secure file
- source {credentials_file}
+ # Load credentials from secure file using (POSIX-compliant dot
operator)
+ . {credentials_file}
output=$({python_executable} -m
airflow.providers.amazon.aws.utils.eks_get_token \
--cluster-name {eks_cluster_name} --sts-url '{sts_url}' {args}
2>&1)
diff --git a/providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py
b/providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py
index dabb3821760..c0da40e7c03 100644
--- a/providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py
+++ b/providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py
@@ -1261,13 +1261,13 @@ class TestEksHook:
user = config["users"][0]
assert user["name"] == "aws"
exec_config = user["user"]["exec"]
- assert exec_config["apiVersion"] ==
"client.authentication.k8s.io/v1alpha1"
+ assert exec_config["apiVersion"] ==
"client.authentication.k8s.io/v1"
assert exec_config["command"] == "sh"
assert exec_config["interactiveMode"] == "Never"
# Verify the command references a credential file (not inline
creds)
command_arg = exec_config["args"][1] # The -c argument content
- assert f"source {credentials_file}" in command_arg
+ assert f". {credentials_file}" in command_arg # The dot operator
is used for POSIX-compliance
# Verify region arguments are properly included
if expected_region_args: