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 cc279cd4e78 Check GCSToAzureBlobStorageOperator match_glob support
after template… (#70574)
cc279cd4e78 is described below
commit cc279cd4e782ccb7088bff3c88102a6b9426cce7
Author: Bramhanand Lingala <[email protected]>
AuthorDate: Thu Aug 13 18:42:48 2026 +0530
Check GCSToAzureBlobStorageOperator match_glob support after template…
(#70574)
* Check GCSToAzureBlobStorageOperator match_glob support after template
rendering
* Restore match_glob provision check in __init__ per #70296 rules
---
.../src/airflow/providers/microsoft/azure/transfers/gcs_to_wasb.py | 4 ++--
.../azure/tests/unit/microsoft/azure/transfers/test_gcs_to_wasb.py | 5 ++++-
scripts/ci/prek/validate_operators_init_exemptions.txt | 1 -
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git
a/providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/gcs_to_wasb.py
b/providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/gcs_to_wasb.py
index acdc0fa65ea..af10c59cafc 100644
---
a/providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/gcs_to_wasb.py
+++
b/providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/gcs_to_wasb.py
@@ -131,9 +131,9 @@ class GCSToAzureBlobStorageOperator(BaseOperator):
self._is_match_glob_supported = False
except ImportError:
self._is_match_glob_supported = False
- if not self._is_match_glob_supported and match_glob:
- raise ValueError("The 'match_glob' parameter requires
'apache-airflow-providers-google>=10.3.0'.")
self.match_glob = match_glob
+ if not self._is_match_glob_supported and match_glob is not None:
+ raise ValueError("The 'match_glob' parameter requires
'apache-airflow-providers-google>=10.3.0'.")
def _transform_file_path(self, file_path: str) -> str:
"""
diff --git
a/providers/microsoft/azure/tests/unit/microsoft/azure/transfers/test_gcs_to_wasb.py
b/providers/microsoft/azure/tests/unit/microsoft/azure/transfers/test_gcs_to_wasb.py
index 27d61b0c2ae..3ec866a73a6 100644
---
a/providers/microsoft/azure/tests/unit/microsoft/azure/transfers/test_gcs_to_wasb.py
+++
b/providers/microsoft/azure/tests/unit/microsoft/azure/transfers/test_gcs_to_wasb.py
@@ -49,7 +49,9 @@ class TestGCSToAzureBlobStorageOperator:
assert op.create_container is False
@mock.patch("airflow.providers.google.__version__", "10.2.0")
- def test_match_glob_requires_recent_google_provider(self):
+
@mock.patch("airflow.providers.microsoft.azure.transfers.gcs_to_wasb.WasbHook")
+
@mock.patch("airflow.providers.microsoft.azure.transfers.gcs_to_wasb.GCSHook")
+ def test_match_glob_requires_recent_google_provider(self, mock_gcs_hook,
mock_wasb_hook):
with pytest.raises(ValueError, match="match_glob"):
GCSToAzureBlobStorageOperator(
task_id=TASK_ID,
@@ -57,6 +59,7 @@ class TestGCSToAzureBlobStorageOperator:
container_name=CONTAINER,
match_glob="**/*.csv",
)
+ mock_gcs_hook.return_value.list.assert_not_called()
@mock.patch("airflow.providers.microsoft.azure.transfers.gcs_to_wasb.WasbHook")
@mock.patch("airflow.providers.microsoft.azure.transfers.gcs_to_wasb.GCSHook")
diff --git a/scripts/ci/prek/validate_operators_init_exemptions.txt
b/scripts/ci/prek/validate_operators_init_exemptions.txt
index e6869670a5b..b7182ebdda3 100644
--- a/scripts/ci/prek/validate_operators_init_exemptions.txt
+++ b/scripts/ci/prek/validate_operators_init_exemptions.txt
@@ -21,5 +21,4 @@
providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py::C
providers/google/src/airflow/providers/google/cloud/transfers/azure_fileshare_to_gcs.py::AzureFileShareToGCSOperator
providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py::GCSToBigQueryOperator
providers/google/src/airflow/providers/google/marketing_platform/operators/campaign_manager.py::GoogleCampaignManagerDeleteReportOperator
-providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/gcs_to_wasb.py::GCSToAzureBlobStorageOperator
providers/microsoft/psrp/src/airflow/providers/microsoft/psrp/operators/psrp.py::PsrpOperator