o-nikolas commented on code in PR #31191:
URL: https://github.com/apache/airflow/pull/31191#discussion_r1190644171
##########
tests/system/providers/amazon/aws/example_eks_with_fargate_in_one_step.py:
##########
@@ -106,13 +106,15 @@
describe_pod = BashOperator(
task_id="describe_pod",
- bash_command=""
- # using reinstall option so that it doesn't fail if already present
- "install_aws.sh --reinstall " "&& install_kubectl.sh --reinstall "
- # configure kubectl to hit the cluster created
- f"&& aws eks update-kubeconfig --name {cluster_name} "
- # once all this setup is done, actually describe the pod
- "&& kubectl describe pod {{ ti.xcom_pull(key='pod_name',
task_ids='run_pod') }}",
+ bash_command=f"""
+ install_aws.sh || true;
+ install_kubectl.sh || true;
+ # configure kubectl to hit the cluster created
Review Comment:
This will actually be fine I think.
Triple quote is being used which is going to preserve the formatting, which
means new lines will be preserved, which means the comments will be evaluated
as a standalone statement and since hash is also comment in bash this will just
be ignored.
In fact, I think using triple quotes here is actually the real fix, I
suspect you could drop all the semi-colons at the end of the lines here and
this would still work. (and conversely the kind of wacky string concat that was
being used previously, which didn't preserve any formatting was causing
issues).
##########
tests/system/providers/amazon/aws/example_eks_with_nodegroup_in_one_step.py:
##########
@@ -116,13 +116,15 @@ def delete_launch_template(template_name: str):
describe_pod = BashOperator(
task_id="describe_pod",
- bash_command=""
- # using reinstall option so that it doesn't fail if already present
- "install_aws.sh --reinstall " "&& install_kubectl.sh --reinstall "
- # configure kubectl to hit the cluster created
- f"&& aws eks update-kubeconfig --name {cluster_name} "
- # once all this setup is done, actually describe the pod
- "&& kubectl describe pod {{ ti.xcom_pull(key='pod_name',
task_ids='run_pod') }}",
+ bash_command=f"""
+ install_aws.sh || true;
+ install_kubectl.sh || true;
+ # configure kubectl to hit the cluster created
+ aws eks update-kubeconfig --name {cluster_name};
+ # once all this setup is done, actually describe the pod
+ echo "vvv pod description below vvv";
+ kubectl describe pod {{{{ ti.xcom_pull(key='pod_name',
task_ids='run_pod') }}}};
+ echo "^^^ pod description above ^^^" """,
Review Comment:
I know we try keep the sys tests DAMP but having this script copy/pasted so
many times makes me sad :crying_cat_face:
--
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]