adrian-edbert commented on issue #57336:
URL: https://github.com/apache/airflow/issues/57336#issuecomment-3450857070

   > The local file system backend uses connection model but it has a back 
compat shim that should take care of the import of sdk vs models. I tried with 
the same dag and configuration as you 
[@adrian-edbert](https://github.com/adrian-edbert) and it works just fine for 
me.
   > 
   > DAG:
   > 
   > from __future__ import annotations
   > 
   > from airflow.providers.standard.operators.python import PythonOperator
   > from airflow import DAG
   > 
   > 
   > def print_connection():
   >     from airflow.sdk.bases.hook import BaseHook
   >     worker_conn = BaseHook.get_connection("worker_connection_env")
   >     print(f"worker_connection_env : {worker_conn}")
   > 
   > 
   > with DAG(
   >     dag_id='test_dag',
   >     catchup=False,
   >     schedule=None
   > ) as dag:
   >     test = PythonOperator(task_id='task3', 
python_callable=print_connection)
   >     test
   > Could you explain what you have done different?
   
   oh I couldn't find the compat shim for this one, mind pointing me to the 
compat definition file?  
   I do have some logic changes in my fork for the git dag bundle, but I don't 
think that one should affect this? I will double check without git dag bundle 
and get back to this issue again


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