amoghrajesh commented on code in PR #39159: URL: https://github.com/apache/airflow/pull/39159#discussion_r1575631616
########## airflow/config_templates/config.yml: ########## @@ -500,6 +500,13 @@ core: type: integer example: ~ default: "4096" + disalble_scan_stale_dags: + description: | + Stale dags are deleted by default, [core] disalble_scan_stale_dags is True if you want to keep them. Review Comment: Correct this in context of above comment ########## docs/apache-airflow/core-concepts/dags.rst: ########## @@ -924,3 +924,10 @@ if it fails for ``N`` number of times consecutively. we can also provide and override these configuration from DAG argument: - ``max_consecutive_failed_dag_runs``: Overrides :ref:`config:core__max_consecutive_failed_dag_runs_per_dag`. + +Disable deletion of stale dags +------------------------------ + +In a versioned DAG context, there may be a need to run two versions of DAGs in parallel in two versions of workers. +It can also be useful to keep the allowed DAGs if they are still in progress in the worker (n -1). +To keep the allowed DAGs, you can change the value of the variable ``AIRFLOW__CORE__DISABLE_SCAN_STALE_DAGS`` to ``True``. By default, it is set to ``False``. Review Comment: Mention that we can also set in config.yml ########## airflow/config_templates/unit_tests.cfg: ########## @@ -59,6 +59,8 @@ unit_test_mode = True killed_task_cleanup_time = 5 # We only allow our own classes to be deserialized in tests allowed_deserialization_classes = airflow.* tests.* +# expired dags are deleted by default, you can put true in this variable if you want to keep them. +disalble_scan_stale_dags = False Review Comment: Same comment as above ########## airflow/config_templates/config.yml: ########## @@ -500,6 +500,13 @@ core: type: integer example: ~ default: "4096" + disalble_scan_stale_dags: Review Comment: ```suggestion disable_scanning_stale_dags ``` -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org