gschuurman commented on issue #54350:
URL: https://github.com/apache/airflow/issues/54350#issuecomment-3188156882

   > With 3.0.5rc1, this call works fine on my side:
   > 
   > schedule_pipeline = MSGraphAsyncOperator(
   >     task_id="schedule_pipeline",
   >     conn_id="http.fabric",
   >     method="POST",
   >     
url="workspaces/{workspaceId}/items/{pipelineId}/jobs/instances?jobType=Pipeline",
   >     path_parameters={"workspaceId": workspace_id, "pipelineId": 
pipeline_id}
   > )
   > What about you, [@gschuurman](https://github.com/gschuurman), does the 
3.0.5 fix it ?
   
   I just updated our dev environment, but unfortunatly the error is still the 
same.
   ```
   [2025-08-14, 11:40:47] ERROR - An error occurred: You cannot use AsyncToSync 
in the same thread as an async event loop - just await the async function 
directly.: 
source="airflow.providers.microsoft.azure.triggers.msgraph.MSGraphTrigger"
   RuntimeError: You cannot use AsyncToSync in the same thread as an async 
event loop - just await the async function directly.
   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/microsoft/azure/triggers/msgraph.py",
 line 197 in run
   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/microsoft/azure/hooks/msgraph.py",
 line 403 in run
   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/microsoft/azure/hooks/msgraph.py",
 line 422 in send_request
   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/microsoft/azure/hooks/msgraph.py",
 line 252 in get_conn
   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/hooks/base.py", line 
64 in get_connection
   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/models/connection.py",
 line 478 in get_connection_from_secrets
   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/definitions/connection.py",
 line 144 in get
   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/sdk/execution_time/context.py",
 line 155 in _get_connection
   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/jobs/triggerer_job_runner.py",
 line 734 in send
   File "/home/airflow/.local/lib/python3.12/site-packages/asgiref/sync.py", 
line 186 in __call__
   ```
   Now using: 
   ```
   apache-airflow                            3.0.5rc1
   apache-airflow-core                       3.0.5rc1
   apache-airflow-providers-microsoft-azure  12.6.1
   ```


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