<h3 dir="auto">Description</h3>
<p dir="auto">It would be nice to add a comment when pausing a DAG, so that others looking at a DAG and expecting it to be unpaused, can understand why it may have been paused and who it has been paused by.</p>
<h3 dir="auto">Use case/motivation</h3>
<p dir="auto">I want to have the ability to share with others, the reason I am pausing a DAG. This could be done via a modal pop-up prompting the user for a comment (while maintaining the option to leave it empty), which will be displayed as a banner near the top of a DAG page.</p>
<h3 dir="auto">Related issues</h3>
<p dir="auto">I found these related issues which has since gone stale <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="916045333" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/16349" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/16349/hovercard" href="https://github.com/apache/airflow/issues/16349">#16349</a> &amp; <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="876597259" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/15675" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/15675/hovercard" href="https://github.com/apache/airflow/issues/15675">#15675</a></p>
<h3 dir="auto">Are you willing to submit a PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul>
<h3 dir="auto">Description</h3>
<p dir="auto">add a global <code class="notranslate">/suspend</code> and <code class="notranslate">/resume</code> endpoint to the REST API (and corresponding CLI command) that would do the following for the entire airflow deployment:</p>
<p dir="auto"><code class="notranslate">/suspend</code></p>
<ul dir="auto">
<li>pause all currently unpaused DAGs (keeping track of what was previously unpaused in the metadata db)</li>
<li>Set <code class="notranslate">AIRFLOW__SCHEDULER__USE_JOB_SCHEDULE=False</code> (if not already false) to prevent scheduler from scheduling more tasks</li>
<li>(should handle duplicate suspend calls by <code class="notranslate">409: Airflow is already suspended</code>)</li>
</ul>
<p dir="auto"><code class="notranslate">/resume</code></p>
<ul dir="auto">
<li>unpause all DAGs from a previous <code class="notranslate">/suspend</code> call</li>
<li>set <code class="notranslate">AIRFLOW__SCHEDULER__USE_JOB_SCHEDULE</code> to whatever it was <em>before</em> the last <code class="notranslate">/suspend</code> call</li>
<li>(should handle resuming an airflow that is not in the suspended state with <code class="notranslate">409: Cannot resume an airflow that is not in suspended state</code>)</li>
</ul>
<h3 dir="auto">Use case/motivation</h3>
<p dir="auto">This could be really helpful for people wanting to pause everything:</p>
<ul dir="auto">
<li>before running and upgrade to a newer airflow version</li>
<li>because this is a dev enviornment and we don't need anything to run outside of working hours to reduce resource consumption</li>
<li>"archiving an airflow" call suspend then tear down all the airflow components, could be restored by bringing up the components and then calling resume.</li>
</ul>
<h3 dir="auto">Related issues</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit a PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul>