Re: [PR] Fix sync to async issue when getting connection for SQLExecuteQueryTrigger [airflow]
dabla closed pull request #55094: Fix sync to async issue when getting connection for SQLExecuteQueryTrigger URL: https://github.com/apache/airflow/pull/55094 -- 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]
Re: [PR] Fix sync to async issue when getting connection for SQLExecuteQueryTrigger [airflow]
github-actions[bot] commented on PR #55094: URL: https://github.com/apache/airflow/pull/55094#issuecomment-3850405330 This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. -- 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]
Re: [PR] Fix sync to async issue when getting connection for SQLExecuteQueryTrigger [airflow]
dabla commented on PR #55094: URL: https://github.com/apache/airflow/pull/55094#issuecomment-3579993267 > aget_connection Do you mean a "compat" module in common provider which is then re-used accross all providers? This would be neat but would tightly couple other providers with common provider? Or do you mean just add it in version_compat of each provider, in this case sql provider? -- 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]
Re: [PR] Fix sync to async issue when getting connection for SQLExecuteQueryTrigger [airflow]
github-actions[bot] commented on PR #55094: URL: https://github.com/apache/airflow/pull/55094#issuecomment-3578168980 This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. -- 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]
Re: [PR] Fix sync to async issue when getting connection for SQLExecuteQueryTrigger [airflow]
potiuk commented on PR #55094: URL: https://github.com/apache/airflow/pull/55094#issuecomment-3393069898 Looks good. Side comment (as a potential follow-up) - maybe we should add common.compat for aget_connection and use it in all places instead of importing *from asgiref.sync import sync_to_async* -> that would also help with removing this compat when we have >= 3.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]
Re: [PR] Fix sync to async issue when getting connection for SQLExecuteQueryTrigger [airflow]
dabla commented on PR #55094: URL: https://github.com/apache/airflow/pull/55094#issuecomment-3285062196 > > > @eladkal Do you prefer using asyncio.to_thread instead of sync_to_async from asgiref? > > > > > > I believe it's good - we are using sync_to_async in other places already. > > I am away from laptop so cant take a look at the code. > > As long as we are not forcing installing async packages to the users who use only sync approch that is good enough for me. Once providers are used in Airflow 3.1, they wont need the asgiref anymore as they would be able to use the async aget_connection method, thus the module is also only import if needed for fallback, otherwise it's not. As we have to keep providers backward compatible with Airflow 2, we need this fallback functionality. -- 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]
Re: [PR] Fix sync to async issue when getting connection for SQLExecuteQueryTrigger [airflow]
dabla commented on code in PR #55094: URL: https://github.com/apache/airflow/pull/55094#discussion_r2315941750 ## providers/common/sql/src/airflow/providers/common/sql/triggers/sql.py: ## @@ -19,6 +19,8 @@ from typing import TYPE_CHECKING +from asgiref.sync import sync_to_async Review Comment: I've moved the import inside the get_hook method. -- 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]
Re: [PR] Fix sync to async issue when getting connection for SQLExecuteQueryTrigger [airflow]
dabla commented on PR #55094: URL: https://github.com/apache/airflow/pull/55094#issuecomment-3245131270 @eladkal Do you prefer using asyncio.to_thread instead of sync_to_async from asgiref? -- 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]
Re: [PR] Fix sync to async issue when getting connection for SQLExecuteQueryTrigger [airflow]
dabla commented on code in PR #55094: URL: https://github.com/apache/airflow/pull/55094#discussion_r2315620236 ## providers/common/sql/src/airflow/providers/common/sql/triggers/sql.py: ## @@ -19,6 +19,8 @@ from typing import TYPE_CHECKING +from asgiref.sync import sync_to_async Review Comment: Yes, indeed good catch, but fix doesn't work anyway as it's broken again in 3.0.6, see: https://github.com/apache/airflow/issues/54350#issuecomment-3244345712 -- 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]
Re: [PR] Fix sync to async issue when getting connection for SQLExecuteQueryTrigger [airflow]
eladkal commented on code in PR #55094: URL: https://github.com/apache/airflow/pull/55094#discussion_r2315077705 ## providers/common/sql/src/airflow/providers/common/sql/triggers/sql.py: ## @@ -19,6 +19,8 @@ from typing import TYPE_CHECKING +from asgiref.sync import sync_to_async Review Comment: Correct me if I am wrong but this forces all uses of sql provider to install this package even if they are not using async code? -- 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]
Re: [PR] Fix sync to async issue when getting connection for SQLExecuteQueryTrigger [airflow]
dabla commented on PR #55094: URL: https://github.com/apache/airflow/pull/55094#issuecomment-3243929396 @eladkal I've added unit test -- 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]
