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 dfeca8274e0 Update manager.py (#59330)
dfeca8274e0 is described below
commit dfeca8274e0ffbf35257688ea13aad0440d4bfae
Author: Collin McNulty <[email protected]>
AuthorDate: Thu Dec 11 16:46:25 2025 -0600
Update manager.py (#59330)
---
airflow-core/src/airflow/dag_processing/manager.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/airflow-core/src/airflow/dag_processing/manager.py
b/airflow-core/src/airflow/dag_processing/manager.py
index 099b9480e93..a6ddae83038 100644
--- a/airflow-core/src/airflow/dag_processing/manager.py
+++ b/airflow-core/src/airflow/dag_processing/manager.py
@@ -314,10 +314,9 @@ class DagFileProcessorManager(LoggingMixin):
dags_parsed = session.execute(query)
for dag in dags_parsed:
- # The largest valid difference between a DagFileStat's
last_finished_time and a DAG's
- # last_parsed_time is the processor_timeout. Longer than that
indicates that the DAG is
- # no longer present in the file. We have a stale_dag_threshold
configured to prevent a
- # significant delay in deactivation of stale dags when a large
timeout is configured
+ # When the Dag's last_parsed_time is more than the
stale_dag_threshold older than the
+ # Dag file's last_finish_time, the Dag is considered stale as has
apparently been removed from the file,
+ # This is especially relevant for Dag files that generate Dags in
a dynamic manner.
file_info = DagFileInfo(rel_path=Path(dag.relative_fileloc),
bundle_name=dag.bundle_name)
if last_finish_time := last_parsed.get(file_info, None):
if dag.last_parsed_time +
timedelta(seconds=self.stale_dag_threshold) < last_finish_time: