o-nikolas commented on code in PR #72542:
URL: https://github.com/apache/airflow/pull/72542#discussion_r4008667919


##########
providers/amazon/src/airflow/providers/amazon/aws/hooks/eks.py:
##########
@@ -105,10 +105,8 @@ class NodegroupStates(Enum):
                 exit "$status"
             fi
 
-            # Use pure bash below to parse so that it's posix compliant
-            # Only the token line should be on stdout (stderr captured above)
-
-            last_line=${{output##*$'\\n'}}  # strip everything up to the last 
newline
+            # Keep only the token line even if a dependency logs to stdout.
+            last_line=$(printf '%s\\n' "$output" | tail -n 1)

Review Comment:
   Please merge this in a separate PR. Don't bundle this fix (which affects the 
existing operator) bundled with this new Operator



##########
providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py:
##########
@@ -53,7 +55,7 @@
     NODEGROUP_NOT_FOUND_MSG,
 )
 
-from airflow.providers.amazon.aws.hooks.eks import EksHook
+from airflow.providers.amazon.aws.hooks.eks import COMMAND, EksHook

Review Comment:
   I think there were other tests that used to import that, can you update 
those to remove the function local imports, thanks!



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