This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 1cf35f42c6d Use ValueError for unsupported recursive glob in ADLS 
upload (#70540)
1cf35f42c6d is described below

commit 1cf35f42c6d17bfa24e36de1d0638ea6e683526a
Author: Dr Alex Mitre <[email protected]>
AuthorDate: Fri Jul 31 12:54:33 2026 -0600

    Use ValueError for unsupported recursive glob in ADLS upload (#70540)
---
 generated/known_airflow_exceptions.txt                                | 1 -
 .../src/airflow/providers/microsoft/azure/transfers/local_to_adls.py  | 4 ++--
 .../azure/tests/unit/microsoft/azure/transfers/test_local_to_adls.py  | 3 +--
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/generated/known_airflow_exceptions.txt 
b/generated/known_airflow_exceptions.txt
index 66ee6590bc8..5a96a60860b 100644
--- a/generated/known_airflow_exceptions.txt
+++ b/generated/known_airflow_exceptions.txt
@@ -361,7 +361,6 @@ 
providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/synaps
 
providers/microsoft/azure/src/airflow/providers/microsoft/azure/sensors/data_factory.py::1
 
providers/microsoft/azure/src/airflow/providers/microsoft/azure/sensors/msgraph.py::1
 
providers/microsoft/azure/src/airflow/providers/microsoft/azure/sensors/wasb.py::4
-providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/local_to_adls.py::1
 
providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/sftp_to_wasb.py::1
 providers/microsoft/azure/tests/unit/microsoft/azure/hooks/test_asb.py::3
 providers/microsoft/azure/tests/unit/microsoft/azure/operators/test_asb.py::3
diff --git 
a/providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/local_to_adls.py
 
b/providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/local_to_adls.py
index 255bcc1a4eb..45688e7a196 100644
--- 
a/providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/local_to_adls.py
+++ 
b/providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/local_to_adls.py
@@ -19,7 +19,7 @@ from __future__ import annotations
 from collections.abc import Sequence
 from typing import TYPE_CHECKING, Any
 
-from airflow.providers.common.compat.sdk import AirflowException, BaseOperator
+from airflow.providers.common.compat.sdk import BaseOperator
 from airflow.providers.microsoft.azure.hooks.data_lake import AzureDataLakeHook
 
 if TYPE_CHECKING:
@@ -82,7 +82,7 @@ class LocalFilesystemToADLSOperator(BaseOperator):
 
     def execute(self, context: Context) -> None:
         if "**" in self.local_path:
-            raise AirflowException("Recursive glob patterns using `**` are not 
supported")
+            raise ValueError("Recursive glob patterns using `**` are not 
supported")
         if not self.extra_upload_options:
             self.extra_upload_options = {}
         hook = 
AzureDataLakeHook(azure_data_lake_conn_id=self.azure_data_lake_conn_id)
diff --git 
a/providers/microsoft/azure/tests/unit/microsoft/azure/transfers/test_local_to_adls.py
 
b/providers/microsoft/azure/tests/unit/microsoft/azure/transfers/test_local_to_adls.py
index 71aad3d1606..4b968d82e77 100644
--- 
a/providers/microsoft/azure/tests/unit/microsoft/azure/transfers/test_local_to_adls.py
+++ 
b/providers/microsoft/azure/tests/unit/microsoft/azure/transfers/test_local_to_adls.py
@@ -21,7 +21,6 @@ from unittest import mock
 
 import pytest
 
-from airflow.providers.common.compat.sdk import AirflowException
 from airflow.providers.microsoft.azure.transfers.local_to_adls import 
LocalFilesystemToADLSOperator
 
 TASK_ID = "test-adls-upload-operator"
@@ -51,7 +50,7 @@ class TestADLSUploadOperator:
         operator = LocalFilesystemToADLSOperator(
             task_id=TASK_ID, local_path=BAD_LOCAL_PATH, remote_path=REMOTE_PATH
         )
-        with pytest.raises(AirflowException) as ctx:
+        with pytest.raises(ValueError, match="Recursive glob patterns using") 
as ctx:
             operator.execute(None)
         assert str(ctx.value) == "Recursive glob patterns using `**` are not 
supported"
 

Reply via email to