uranusjr commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1057658232


##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,44 @@ the dependency graph.
 The dependency detector is configurable, so you can implement your own logic 
different than the defaults in
 :class:`~airflow.serialization.serialized_objects.DependencyDetector`
 
-DAG pausing, deactivation and deletion
---------------------------------------
-
-The DAGs have several states when it comes to being "not running". DAGs can be 
paused, deactivated
-and finally all metadata for the DAG can be deleted.
-
-Dag can be paused via UI when it is present in the ``DAGS_FOLDER``, and 
scheduler stored it in
-the database, but the user chose to disable it via the UI. The "pause" and 
"unpause" actions are available
-via UI and API. Paused DAG is not scheduled by the Scheduler, but you can 
trigger them via UI for
-manual runs. In the UI, you can see Paused DAGs (in ``Paused`` tab). The DAGs 
that are un-paused
-can be found in the ``Active`` tab.
-
-Dag can be deactivated (do not confuse it with ``Active`` tag in the UI) by 
removing them from the
-``DAGS_FOLDER``. When scheduler parses the ``DAGS_FOLDER`` and misses the DAG 
that it had seen
-before and stored in the database it will set is as deactivated. The metadata 
and history of the
-DAG` is kept for deactivated DAGs and when the DAG is re-added to the 
``DAGS_FOLDER`` it will be again
-activated and history will be visible. You cannot activate/deactivate DAG via 
UI or API, this
-can only be done by removing files from the ``DAGS_FOLDER``. Once again - no 
data for historical runs of the
-DAG are lost when it is deactivated by the scheduler. Note that the ``Active`` 
tab in Airflow UI
-refers to DAGs that are not both ``Activated`` and ``Not paused`` so this 
might initially be a
-little confusing.
-
-You can't see the deactivated DAGs in the UI - you can sometimes see the 
historical runs, but when you try to
-see the information about those you will see the error that the DAG is missing.
-
-You can also delete the DAG metadata from the metadata database using UI or 
API, but it does not
-always result in disappearing of the DAG from the UI - which might be also 
initially a bit confusing.
-If the DAG is still in ``DAGS_FOLDER`` when you delete the metadata, the DAG 
will re-appear as
-Scheduler will parse the folder, only historical runs information for the DAG 
will be removed.
-
-This all means that if you want to actually delete a DAG and its all 
historical metadata, you need to do
-it in three steps:
-
-* pause the DAG
-* delete the historical metadata from the database, via UI or API
-* delete the DAG file from the ``DAGS_FOLDER`` and wait until it becomes 
inactive
+Controlling DAG Execution
+--------------------------
+
+A DAG can be prevented from running by being paused, deactivated, or deleted.

Review Comment:
   I wonder if it’d be worthwhile to very briefly mention how each can be done 
here, e.g.
   
   ```rst
   A DAG can be prevented from running by being:
   
   * *Paused*, done in the web UI’s home page.
   * *Deactivated*, by removing the file containing the DAG from 
``DAGS_FOLDER``.
   * *Deleted*, from the web UI or API.
   ```
   
   This would be useful for people using the documentation as a reference, so 
they don’t need to read the prose below every time.



-- 
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]

Reply via email to