m1racoli opened a new pull request, #56350: URL: https://github.com/apache/airflow/pull/56350
There are instances when `AzureDataFactoryOperator` in deferrable mode fails with the following error: <img width="1518" height="150" alt="Screenshot 2025-10-02 at 17 11 00" src="https://github.com/user-attachments/assets/805e5b23-99b0-43a1-96ab-c86ae5583727" /> Unfortunately this error is only a result of [another error](https://github.com/apache/airflow/blob/41078f1525cccfa439af0527a46f75cc2015abdf/providers/microsoft/azure/src/airflow/providers/microsoft/azure/triggers/data_factory.py#L231) resulting in an [attempt to cancel an existing pipeline run](https://github.com/m1racoli/airflow/blob/dc2d629c4ea0b04984eea36701d1774f5695ce4e/providers/microsoft/azure/src/airflow/providers/microsoft/azure/triggers/data_factory.py#L236](https://github.com/apache/airflow/blob/41078f1525cccfa439af0527a46f75cc2015abdf/providers/microsoft/azure/src/airflow/providers/microsoft/azure/triggers/data_factory.py#L234)). The shown error message indicates that this attempt failed, because the run itself was already successful. Unfortunately that second error is the only error [reported back to the operator](https://github.com/apache/airflow/blob/41078f1525cccfa439af0527a46f75cc2015abdf/providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/d ata_factory.py#L256) even though it is not the initial cause of failure (which is unknown). This PR addresses this by: * logging the initial error with stacktrace in the trigger * in case of failure when cancelling the second error is only logged, while the initial error will be reported back to the operator as a failure reason Additionally we do not obfuscate the exception when cancelling fails, such that we get better visibility on the actual exception thrown, which may allow us to handle failed cancellations for already successful pipelines more gracefully in the future. -- 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]
