Rkejji commented on issue #46964:
URL: https://github.com/apache/airflow/issues/46964#issuecomment-2817279756

   While reproducing the bug I have noticed three things:
   
   - When using Airflow 3 the EksPodOperator does not work, it returns an 
authentication error for the same DAG code 
   `Reason: Unauthorized
   HTTP response headers: HTTPHeaderDict({'Audit-Id': 
'4dedddcb-650f-43dc-ba41-47d41efrrre29', 'Cache-Control': 'no-cache, private', 
'Content-Type': 'application/json', 'Date': 'Sun, 20 Apr 2025 18:00:54 GMT', 
'Content-Length': '129'})
   HTTP response body: 
{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Unauthorized","reason":"Unauthorized","code":401}`
   
   - When using Airflow 2 **with "deferrable=False" the DAG works fine**, but 
when "deferrable=True" I have **an error different from the one present in this 
issue** When I check my EKS cluster I notice **that it worked and the pod is 
running** but I still get this error:
   `kubernetes.config.config_exception.ConfigException: Invalid kube-config 
file. No configuration found.`
   
   
   
   - When I use Airflow 2, when I edit the EksPodOperator to debug I can't see 
my logs nor any change in the py file, while I can see them when using Airflow 3
   
   
   Here is the code of my DAG:
   ```python
   from datetime import datetime, timedelta
   from airflow import DAG
   import logging
   from airflow.providers.amazon.aws.operators.eks import EksPodOperator
   # Define default_args
   default_args = {
       "owner": "airflow",
       "depends_on_past": False,
       "start_date": datetime(2024, 2, 13),
       "retries": 0,
       "retry_delay": timedelta(minutes=5),
   }
   # Define DAG
   with DAG(
       "kpo_hello_world_deferrable_2",
       default_args=default_args,
       catchup=False,
   ) as dag:
       hello_pod = EksPodOperator(
           task_id="start_pod",
           pod_name="test_pod_coucou_333",
           cluster_name="my-eks-cluster",
           image="python:3.8",
           cmds=["python", "-c", 'import time;time.sleep(150)'],
           labels={"demo": "hello_world"},
           region="eu-north-1",
           aws_conn_id="aws_debug_con_2",
           on_finish_action="keep_pod",
           #deferrable=True,
           in_cluster=False,
       )
       hello_pod
   ```


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to