jedcunningham commented on code in PR #41433:
URL: https://github.com/apache/airflow/pull/41433#discussion_r1734058423
##########
airflow/dag_processing/manager.py:
##########
@@ -526,6 +526,12 @@ def deactivate_stale_dags(
dags_parsed = session.execute(query)
for dag in dags_parsed:
+ # When the DAG processor runs as part of the scheduler, and the
user changes the DAG home folder,
+ # DAGs from the previous DAG home will be marked as stale. Note
that this change has no impact
+ # on standalone DAG processors.
+ if os.path.commonpath([dag.fileloc, dag_directory]) !=
dag_directory:
Review Comment:
I almost feel this should just be an additional condition to the next if
block - that way we still log that the DAG is missing for this case too.
##########
airflow/dag_processing/manager.py:
##########
@@ -526,6 +526,12 @@ def deactivate_stale_dags(
dags_parsed = session.execute(query)
for dag in dags_parsed:
+ # When the DAG processor runs as part of the scheduler, and the
user changes the DAG home folder,
+ # DAGs from the previous DAG home will be marked as stale. Note
that this change has no impact
Review Comment:
```suggestion
# When the DAG processor runs as part of the scheduler, and the
user changes the DAGs folder,
# DAGs from the previous DAGs folder will be marked as stale.
Note that this change has no impact
```
nit: We don't really have a "DAG home folder", we have an Airflow home
folder and a DAG folder - but those are different things ultimately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]