This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v2-11-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-11-test by this push:
new 3a8464a1e85 Avoid warning when passing none as dataset alias (#61791)
3a8464a1e85 is described below
commit 3a8464a1e8570a87a01c8f0d3f063fbe112e0d43
Author: Jarek Potiuk <[email protected]>
AuthorDate: Thu Feb 12 01:44:25 2026 +0100
Avoid warning when passing none as dataset alias (#61791)
Passing None is absolutely fine for dataset alias and raising
a warning when it happens is not a good idea.
Fixes #51194
---
airflow/datasets/metadata.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/airflow/datasets/metadata.py b/airflow/datasets/metadata.py
index a2caabf4f43..8219f058f7c 100644
--- a/airflow/datasets/metadata.py
+++ b/airflow/datasets/metadata.py
@@ -52,6 +52,8 @@ class Metadata:
self.extra = extra
if isinstance(alias, DatasetAlias):
self.alias_name = alias.name
+ elif alias is None:
+ self.alias_name = None
else:
warnings.warn(
(