SameerMesiah97 opened a new pull request, #62966: URL: https://github.com/apache/airflow/pull/62966
**Description** This change introduces an asynchronous hook for Azure Synapse Pipelines (`AzureSynapsePipelineAsyncHook`). Previously, only a synchronous hook (`AzureSynapsePipelineHook`) was available. This update adds an asynchronous counterpart that mirrors the synchronous hook’s credential resolution and client creation logic using `azure.synapse.artifacts.aio.AsyncArtifactsClient`. The async hook provides non-blocking methods for retrieving pipeline runs, checking pipeline run status, and cancelling pipeline runs. It supports both client-secret and default credential authentication using their asynchronous Azure identity credential equivalents. **Rationale** This change introduces the asynchronous hook as a prerequisite for implementing deferrable mode for Azure Synapse Pipeline operators. Within the Azure provider, several services already support or are introducing deferrable execution. The Azure Data Factory (ADF) operator supports deferrable mode, and deferrable support for Azure Container Instances (ACI) is currently being introduced. **Azure Synapse Pipelines should provide equivalent deferrable capabilities to maintain consistency across Azure services within the provider**. Deferrable operators require non-blocking SDK interactions within triggers running in the triggerer process. The existing synchronous Synapse hook performs blocking I/O and is therefore unsuitable for use in triggers. **Introducing an async hook provides the necessary foundation for implementing deferrable support for Synapse Pipeline operators** while maintaining behavioral parity with the synchronous hook. **Tests** Added unit tests verifying that: * `get_pipeline_run_status()` returns the expected status. * Client secret authentication uses `AsyncClientSecretCredential`. * Default credential authentication uses `AsyncDefaultAzureCredential`. * A `ValueError` is raised when tenant ID is missing for client secret authentication. * `get_async_conn()` reuses the cached async client. * `refresh_conn()` recreates the async client. * `close()` properly closes and clears the async client. * The async context manager calls `close()` on exit. **Documentation** A docstring has been added to `AzureSynapsePipelineAsyncHook` explaining its usage. **Backwards Compatibility** This change does not modify public APIs or alter existing behavior. -- 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]
