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 f9b0ca76018 Fix location of comment in dags_needing_dagruns (#58173)
f9b0ca76018 is described below

commit f9b0ca760188863fa5350916d00b31332786eb37
Author: Daniel Standish <[email protected]>
AuthorDate: Tue Nov 11 04:19:45 2025 -0800

    Fix location of comment in dags_needing_dagruns (#58173)
    
    The comment applies only when we hit AttributeError, so moving it there 
makes sense.
    
    (cherry picked from commit 2a2c1b1c8517bed956e9b93c34ee3338b2449a5c)
---
 airflow-core/src/airflow/models/dag.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/airflow-core/src/airflow/models/dag.py 
b/airflow-core/src/airflow/models/dag.py
index 2caf4888227..f13782e21df 100644
--- a/airflow-core/src/airflow/models/dag.py
+++ b/airflow-core/src/airflow/models/dag.py
@@ -591,18 +591,20 @@ class DagModel(Base):
         This will return a resultset of rows that is row-level-locked with a 
"SELECT ... FOR UPDATE" query,
         you should ensure that any scheduling decisions are made in a single 
transaction -- as soon as the
         transaction is committed it will be unlocked.
+
+        :meta private:
         """
         from airflow.models.serialized_dag import SerializedDagModel
 
         evaluator = AssetEvaluator(session)
 
         def dag_ready(dag_id: str, cond: BaseAsset, statuses: 
dict[AssetUniqueKey, bool]) -> bool | None:
-            # if dag was serialized before 2.9 and we *just* upgraded,
-            # we may be dealing with old version.  In that case,
-            # just wait for the dag to be reserialized.
             try:
                 return evaluator.run(cond, statuses)
             except AttributeError:
+                # if dag was serialized before 2.9 and we *just* upgraded,
+                # we may be dealing with old version.  In that case,
+                # just wait for the dag to be reserialized.
                 log.warning("dag '%s' has old serialization; skipping DAG run 
creation.", dag_id)
                 return None
 

Reply via email to