You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/11/30 22:04:27 UTC
[GitHub] [airflow] ryangrose opened a new pull request, #28021: docs: Cleanup the pausing dag section
ryangrose opened a new pull request, #28021:
URL: https://github.com/apache/airflow/pull/28021
Revise and edit the pausing dag section: remove grammatical errors, fix sentence structure, and rewrite for clarity
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1039081898
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,32 @@ 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
---------------------------------------
+Unschedule or Delete a DAG
Review Comment:
How about "deschedule" ? That sounds much better.
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #28021:
URL: https://github.com/apache/airflow/pull/28021#issuecomment-1362775710
Needs to resolve some conflicts.
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ryangrose commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
ryangrose commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1039100977
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,32 @@ 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
---------------------------------------
+Unschedule or Delete a DAG
Review Comment:
No strong feelings either way for me! Deschedule probably matches the latin roots better? Updated accordingly
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ryangrose commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
ryangrose commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1045165468
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,32 +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`
-Deschedule or Delete a DAG
Review Comment:
Deschedule wasn't a word in the airflow dictionary, needed to rephrase
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
uranusjr commented on PR #28021:
URL: https://github.com/apache/airflow/pull/28021#issuecomment-1339152653
CI needs fixing.
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] github-actions[bot] commented on pull request #28021: docs: Cleanup the pausing dag section
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #28021:
URL: https://github.com/apache/airflow/pull/28021#issuecomment-1566319721
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dstandish commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1121131798
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,32 @@ 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
---------------------------------------
+Unschedule or Delete a DAG
Review Comment:
Disable?
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] BasPH commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
BasPH commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1070316746
##########
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.
+
+Pausing a DAG
+^^^^^^^^^^^^^
+
+Pausing a DAG will temporarily prevent scheduled runs from occurring.
+The Scheduler will not schedule a paused DAG, but you can still trigger it manually
+via the UI. The "pause" and "unpause" actions are available in the UI and through the API.
+In the UI, paused DAGs can be found in the ``Paused`` tab, and unpaused DAGs can be found in the
+``Active`` tab.
+
+Deactivating a DAG
+^^^^^^^^^^^^^^^^^^
+
+Deactivating a DAG will prevent it from being scheduled or triggered, and it will not appear in the UI.
+However, its metadata and history will still be persisted in the database.
+When the DAG is reactivated, all of its history and metadata will still be present.
+
+To deactivate a DAG, remove it from the ``DAGS_FOLDER``.
+When the Scheduler finds a DAG in the database but missing from the ``DAGS_FOLDER``,
+it will mark it as deactivated. The metadata and history of the DAG will be kept.
+If the DAG is added back to the ``DAGS_FOLDER``, the Scheduler will mark it as active
+and its history will be visible again. Note that the "Active" tab in the Airflow UI refers
+to DAGs that are not deactivated and not paused.
Review Comment:
```suggestion
To remove a DAG from the UI, remove the corresponding DAG file. Airflow calls such DAGs "deactivated" DAGs. When the scheduler detects a DAG file is missing from the ``DAGS_FOLDER`` it will hide the corresponding DAG in the UI. All metadata and history of the DAG will be preserved. When the DAG file is added back to the ``DAGS_FOLDER``, the DAG and all corresponding metadata and history will be displayed again in the UI.
A "deactivated" DAG cannot be scheduled or triggered.
```
"active" and "deactivated" are internal states and the user never gets to see these. Would focus on the behaviour from a user's perspective.
##########
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.
+
+Pausing a DAG
+^^^^^^^^^^^^^
+
+Pausing a DAG will temporarily prevent scheduled runs from occurring.
+The Scheduler will not schedule a paused DAG, but you can still trigger it manually
+via the UI. The "pause" and "unpause" actions are available in the UI and through the API.
+In the UI, paused DAGs can be found in the ``Paused`` tab, and unpaused DAGs can be found in the
+``Active`` tab.
+
+Deactivating a DAG
+^^^^^^^^^^^^^^^^^^
+
+Deactivating a DAG will prevent it from being scheduled or triggered, and it will not appear in the UI.
+However, its metadata and history will still be persisted in the database.
+When the DAG is reactivated, all of its history and metadata will still be present.
+
+To deactivate a DAG, remove it from the ``DAGS_FOLDER``.
+When the Scheduler finds a DAG in the database but missing from the ``DAGS_FOLDER``,
+it will mark it as deactivated. The metadata and history of the DAG will be kept.
+If the DAG is added back to the ``DAGS_FOLDER``, the Scheduler will mark it as active
+and its history will be visible again. Note that the "Active" tab in the Airflow UI refers
+to DAGs that are not deactivated and not paused.
+
+Deleting a DAG
+^^^^^^^^^^^^^^
+
+You can delete a DAG's metadata from the database using the UI or the API.
Review Comment:
Would be good to include a screenshot here + mention which API endpoint.
##########
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.
+
+Pausing a DAG
+^^^^^^^^^^^^^
+
+Pausing a DAG will temporarily prevent scheduled runs from occurring.
+The Scheduler will not schedule a paused DAG, but you can still trigger it manually
+via the UI. The "pause" and "unpause" actions are available in the UI and through the API.
+In the UI, paused DAGs can be found in the ``Paused`` tab, and unpaused DAGs can be found in the
+``Active`` tab.
+
+Deactivating a DAG
+^^^^^^^^^^^^^^^^^^
+
+Deactivating a DAG will prevent it from being scheduled or triggered, and it will not appear in the UI.
+However, its metadata and history will still be persisted in the database.
+When the DAG is reactivated, all of its history and metadata will still be present.
+
+To deactivate a DAG, remove it from the ``DAGS_FOLDER``.
+When the Scheduler finds a DAG in the database but missing from the ``DAGS_FOLDER``,
+it will mark it as deactivated. The metadata and history of the DAG will be kept.
+If the DAG is added back to the ``DAGS_FOLDER``, the Scheduler will mark it as active
+and its history will be visible again. Note that the "Active" tab in the Airflow UI refers
+to DAGs that are not deactivated and not paused.
+
+Deleting a DAG
+^^^^^^^^^^^^^^
+
+You can delete a DAG's metadata from the database using the UI or the API.
+If the DAG is still in the ``DAGS_FOLDER`` when you delete its metadata, it will reappear
+when the Scheduler parses the folder. Only the DAG's historical runs will be removed.
Review Comment:
I believe _all_ metadata, except for task logs, will be removed.
##########
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.
+
+Pausing a DAG
+^^^^^^^^^^^^^
+
+Pausing a DAG will temporarily prevent scheduled runs from occurring.
Review Comment:
```suggestion
Pausing a DAG will prevent scheduled runs from occurring.
```
##########
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.
+
+Pausing a DAG
+^^^^^^^^^^^^^
+
+Pausing a DAG will temporarily prevent scheduled runs from occurring.
+The Scheduler will not schedule a paused DAG, but you can still trigger it manually
+via the UI. The "pause" and "unpause" actions are available in the UI and through the API.
Review Comment:
Might be nice to show a screenshot here
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on PR #28021:
URL: https://github.com/apache/airflow/pull/28021#issuecomment-1332790473
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:
- Pay attention to the quality of your code (flake8, mypy and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks) will help you with that.
- In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/docs/apache-airflow/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/BREEZE.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
- Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
- Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
- Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#coding-style-and-best-practices).
Apache Airflow is a community-driven project and together we are making it better 🚀.
In case of doubts contact the developers at:
Mailing List: dev@airflow.apache.org
Slack: https://s.apache.org/airflow-slack
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1039081396
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,32 @@ 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
---------------------------------------
+Unschedule or Delete a DAG
Review Comment:
Unschedule is a strange word.
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] github-actions[bot] closed pull request #28021: docs: Cleanup the pausing dag section
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #28021: docs: Cleanup the pausing dag section
URL: https://github.com/apache/airflow/pull/28021
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1039101600
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,32 @@ 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
---------------------------------------
+Unschedule or Delete a DAG
Review Comment:
Not a native speaker, but for my musical ear it does sound better.
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1036754782
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,32 @@ 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
+Unschedule or Delete a DAG
--------------------------------------
Review Comment:
```suggestion
Unschedule or Delete a DAG
--------------------------
```
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] github-actions[bot] commented on pull request #28021: docs: Cleanup the pausing dag section
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #28021:
URL: https://github.com/apache/airflow/pull/28021#issuecomment-1449120719
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dstandish commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1121131798
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,32 @@ 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
---------------------------------------
+Unschedule or Delete a DAG
Review Comment:
How about "Disable" or "pause"?
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dstandish commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1121131798
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,32 @@ 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
---------------------------------------
+Unschedule or Delete a DAG
Review Comment:
How about "Disable"?
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1036754973
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,32 @@ 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
+Unschedule or Delete a DAG
--------------------------------------
-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.
+There are several ways to prevent a dag from running. DAGs can be paused, deactivated, or deleted.
Review Comment:
```suggestion
A DAG can be prevented from running by either being paused, deactivated, or deleted.
```
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,32 @@ 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
+Unschedule or Delete a DAG
--------------------------------------
-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.
+There are several ways to prevent a dag from running. DAGs can be paused, deactivated, or 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
+A DAG can be paused, which prevents scheduled runs. The Scheduler will not schedule a paused DAG,
+but you can trigger it manually via the UI. The "pause" and "unpause" actions are available
+via the UI and the API. In the UI, you can see Paused DAGs in the ``Paused`` tab. DAGs that are un-paused
Review Comment:
```suggestion
via the UI and the API. In the UI, you can see Paused DAGs in the ``Paused`` tab. DAGs that are unpaused
```
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,32 @@ 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
+Unschedule or Delete a DAG
--------------------------------------
-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.
+There are several ways to prevent a dag from running. DAGs can be paused, deactivated, or 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
+A DAG can be paused, which prevents scheduled runs. The Scheduler will not schedule a paused DAG,
+but you can trigger it manually via the UI. The "pause" and "unpause" actions are available
+via the UI and the API. In the UI, you can see Paused DAGs in the ``Paused`` tab. 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
+A DAG can also be deactivated. A deactivated DAG will not run, cannot be triggered, and won't show up in the UI but its metadata
+and history persists in the database. If a DAG is reactivated all of its history and metadata will be present.
Review Comment:
```suggestion
A DAG can also be deactivated. A deactivated DAG will not be scheduled, cannot be triggered, and won't show up in the UI, but its metadata
and history are still persisted in the database. All of the DAG's history and metadata will still be present when it is reactivated.
```
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ryangrose commented on a diff in pull request #28021: docs: Cleanup the pausing dag section
Posted by GitBox <gi...@apache.org>.
ryangrose commented on code in PR #28021:
URL: https://github.com/apache/airflow/pull/28021#discussion_r1039101136
##########
docs/apache-airflow/concepts/dags.rst:
##########
@@ -796,39 +796,32 @@ 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
---------------------------------------
+Unschedule or Delete a DAG
Review Comment:
Plus the alliteration is nice 😄
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org