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

vincbeck 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 62a0eb71731 Fix MyPy type error in workloads.py for SQLAlchemy 2 
compatibility (#56906)
62a0eb71731 is described below

commit 62a0eb71731edbe5fd41aa7b85d764e65826ee84
Author: LI,JHE-CHEN <[email protected]>
AuthorDate: Tue Oct 21 15:05:59 2025 -0400

    Fix MyPy type error in workloads.py for SQLAlchemy 2 compatibility (#56906)
---
 airflow-core/src/airflow/executors/workloads.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/airflow-core/src/airflow/executors/workloads.py 
b/airflow-core/src/airflow/executors/workloads.py
index f69cc85d4c2..c453f153d21 100644
--- a/airflow-core/src/airflow/executors/workloads.py
+++ b/airflow-core/src/airflow/executors/workloads.py
@@ -136,7 +136,7 @@ class ExecuteTask(BaseDagBundleWorkload):
 
         return cls(
             ti=ser_ti,
-            dag_rel_path=dag_rel_path or Path(ti.dag_model.relative_fileloc),
+            dag_rel_path=dag_rel_path or Path(ti.dag_model.relative_fileloc or 
""),
             token=cls.generate_token(str(ti.id), generator),
             log_path=fname,
             bundle_info=bundle_info,
@@ -168,7 +168,7 @@ class ExecuteCallback(BaseDagBundleWorkload):
 
         return cls(
             callback=Callback.model_validate(callback, from_attributes=True),
-            dag_rel_path=dag_rel_path or 
Path(dag_run.dag_model.relative_fileloc),
+            dag_rel_path=dag_rel_path or 
Path(dag_run.dag_model.relative_fileloc or ""),
             token=cls.generate_token(str(callback.id), generator),
             log_path=fname,
             bundle_info=bundle_info,

Reply via email to