From 69d00b6257a2085ab0a07a0d58d97cbd2d39fb8e Mon Sep 17 00:00:00 2001 From: Lyndon Fan Date: Sat, 9 Nov 2024 16:23:47 +0000 Subject: [PATCH] fix: replace \s with space output is from running python file, which we know --- providers/pyproject.toml | 6 ------ providers/src/airflow/providers/amazon/aws/hooks/eks.py | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/providers/pyproject.toml b/providers/pyproject.toml index 093cbbd5471414..cdda548684a8cf 100644 --- a/providers/pyproject.toml +++ b/providers/pyproject.toml @@ -56,9 +56,6 @@ extend-exclude = [ # Ignore Doc rules et al for anything outside of tests "!src/*" = ["D", "TID253", "S101", "TRY002"] -# https://github.com/apache/airflow/issues/39252 -"src/airflow/providers/amazon/aws/hooks/eks.py" = ["W605"] - # All of the modules which have an extra license header (i.e. that we copy from another project) need to # ignore E402 -- module level import not at top level "tests/amazon/aws/auth_manager/security_manager/test_aws_security_manager_override.py" = ["E402"] @@ -93,6 +90,3 @@ extend-exclude = [ "tests/qdrant/operators/test_qdrant.py" = ["E402"] "tests/snowflake/operators/test_snowflake_sql.py" = ["E402"] "tests/yandex/**/*.py" = ["E402"] - -# https://github.com/apache/airflow/issues/39252 -"airflow/providers/amazon/aws/hooks/eks.py" = ["W605"] diff --git a/providers/src/airflow/providers/amazon/aws/hooks/eks.py b/providers/src/airflow/providers/amazon/aws/hooks/eks.py index 23fbd433309774..40f1fe6193673f 100644 --- a/providers/src/airflow/providers/amazon/aws/hooks/eks.py +++ b/providers/src/airflow/providers/amazon/aws/hooks/eks.py @@ -85,8 +85,8 @@ class NodegroupStates(Enum): exit 1 fi - expiration_timestamp=$(echo "$output" | grep -oP 'expirationTimestamp:\s*\K[^,]+') - token=$(echo "$output" | grep -oP 'token:\s*\K[^,]+') + expiration_timestamp=$(echo "$output" | grep -oP 'expirationTimestamp: \\K[^,]+') + token=$(echo "$output" | grep -oP 'token: \\K[^,]+') json_string=$(printf '{{"kind": "ExecCredential","apiVersion": \ "client.authentication.k8s.io/v1alpha1","spec": {{}},"status": \