SamWheating commented on a change in pull request #17121:
URL: https://github.com/apache/airflow/pull/17121#discussion_r708743677
##########
File path: airflow/models/dag.py
##########
@@ -2656,11 +2655,6 @@ def deactivate_deleted_dags(cls, alive_dag_filelocs:
List[str], session=None):
if dag_model.fileloc is not None:
if correct_maybe_zipped(dag_model.fileloc) not in
alive_dag_filelocs:
dag_model.is_active = False
- else:
- # If is_active is set as False and the DAG File still
exists
- # Change is_active=True
- if not dag_model.is_active:
- dag_model.is_active = True
Review comment:
> Why this change?
With this code in place, any time a DAG is no longer present in a file it
will be continually reactivated, so this code needs to be removed in order to
fix this issue.
I could not find a good explanation for why this was added in the first
place ([here's the PR which introduced
it](https://github.com/apache/airflow/pull/5743/files)), so I think its safe to
remove.
> what will re-activate the DAG if it is readded
I believe that the next time a DAG is found in a file, it will be marked as
`active`.
https://github.com/apache/airflow/blob/c73004d0cd33d76b82b172078f572e8d4eecab39/airflow/models/dag.py#L2406
--
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]