You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "YakshaB (via GitHub)" <gi...@apache.org> on 2025/01/21 17:15:13 UTC

[D] require_confirmation_dag_change need usecase/explanation [airflow]

GitHub user YakshaB created a discussion: require_confirmation_dag_change need usecase/explanation


I have gone through doc https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#require-confirmation-dag-change and tried this 
'''
require_confirmation_dag_change
New in version 2.9.0.
Require confirmation when changing a DAG in the web UI. This is to prevent accidental changes to a DAG that may be running on sensitive environments like production. When set to True, confirmation dialog will be shown when a user tries to Pause/Unpause, Trigger a DAG

Default
False

Environment Variable
AIRFLOW__WEBSERVER__REQUIRE_CONFIRMATION_DAG_CHANGE

'''

I have changed the REQUIRE_CONFIRMATION_DAG_CHANGE value to true and restarted and checked the UI, still Im able to enable/disable DAGs

![image](https://github.com/user-attachments/assets/26f0c461-a02a-4107-af83-89e8e1c61239)

How does it helps to me ? I checked below info, But when I enable/disable I don't see any thing

`This feature is particularly useful in environments where accidental changes to DAGs could lead to service downtime, data processing issues, or job failures. When require_confirmation_dag_change is set to True, users must explicitly confirm their actions, adding an extra layer of protection.`

@potiuk can you please correct me If I wrong




GitHub link: https://github.com/apache/airflow/discussions/45852

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org


Re: [D] require_confirmation_dag_change need usecase/explanation [airflow]

Posted by "Pedrinhonitz (via GitHub)" <gi...@apache.org>.
GitHub user Pedrinhonitz added a comment to the discussion: require_confirmation_dag_change need usecase/explanation

Evidence for `2.10.4` airflow version

<img width="1440" height="245" alt="image" src="https://github.com/user-attachments/assets/82631285-f53e-446b-b360-a66521f3dd43" />


GitHub link: https://github.com/apache/airflow/discussions/45852#discussioncomment-16979177

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org


Re: [D] require_confirmation_dag_change need usecase/explanation [airflow]

Posted by "nesp159de (via GitHub)" <gi...@apache.org>.
GitHub user nesp159de added a comment to the discussion: require_confirmation_dag_change need usecase/explanation

jak odstranit v microsoft edge: 
<img width="358" height="200" alt="image" src="https://github.com/user-attachments/assets/dc4a4ee7-9244-452c-b020-465c743b231e" />



GitHub link: https://github.com/apache/airflow/discussions/45852#discussioncomment-16889010

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org


Re: [D] require_confirmation_dag_change need usecase/explanation [airflow]

Posted by "Pedrinhonitz (via GitHub)" <gi...@apache.org>.
GitHub user Pedrinhonitz added a comment to the discussion: require_confirmation_dag_change need usecase/explanation

Possible solution in #67208 

GitHub link: https://github.com/apache/airflow/discussions/45852#discussioncomment-16981290

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org


Re: [D] require_confirmation_dag_change need usecase/explanation [airflow]

Posted by "YakshaB (via GitHub)" <gi...@apache.org>.
GitHub user YakshaB added a comment to the discussion: require_confirmation_dag_change need usecase/explanation

sure, sorry @potiuk 

GitHub link: https://github.com/apache/airflow/discussions/45852#discussioncomment-11919200

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org


Re: [D] require_confirmation_dag_change need usecase/explanation [airflow]

Posted by "Pedrinhonitz (via GitHub)" <gi...@apache.org>.
GitHub user Pedrinhonitz added a comment to the discussion: require_confirmation_dag_change need usecase/explanation

Hello, I saw the open forum and performed some tests, I hope this helps to understand.

I checked exactly version 2.10.4 of airflow and with the parameter AIRFLOW__WEBSERVER__REQUIRE_CONFIRMATION_DAG_CHANGE, in fact, in /home where we list the DAGs the alert does not appear, however if you click on the DAG to open it (View the /grid), the alert appears. Another important point I noticed is that if we have an airflow.cfg file, the following parameter needs to be added to it: require_confirmation_dag_change = True.

This implementation came from the following PR #38299, which makes it clear in the screenshots that it is developed only for the /grid pages of the DAG, and subsequently the following PR #42063, which was opened to correct a bug.

For Airflow 3.X, this has already been fixed and appears directly in the DAG listing on the home page and in the DAG grid. An important point is that for Airflow 3.X, the variable changes because the WebServer switches to the API Server, resulting in the variable being AIRFLOW__API__REQUIRE_CONFIRMATION_DAG_CHANGE.

I recommend updating to version 3.X if your environment is critical and requires the flag in the listing. Based on my research, there are no fixes for this in Airflow version 2.X, possibly due to the complex structure of (Flask + jQuery) making it difficult to implement without bugs. However, feel free to implement it if you wish.


Note: The documentation might be confusing because it doesn't explicitly state that it's for grid screens, and we could consider highlighting this point, as the end user might assume it applies to all screens.

However, note that in the PR, the author himself states the following:

"
However, when a user sets this configuration to True, **the Dag screen (Dag.html)** will enforce a logic that requires users to confirm before they can Trigger a DAG or Pause/UnPause a Dag.
" (`the Dag screen (Dag.html)`)

GitHub link: https://github.com/apache/airflow/discussions/45852#discussioncomment-16979140

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org


Re: [D] require_confirmation_dag_change need usecase/explanation [airflow]

Posted by "vlad-pebblepost (via GitHub)" <gi...@apache.org>.
GitHub user vlad-pebblepost added a comment to the discussion: require_confirmation_dag_change need usecase/explanation

@YakshaB have you solved issue?
having same problem, but it looks like pause/unpause confirmation works only when you open dag itself page, but not on main page with list of all dags

GitHub link: https://github.com/apache/airflow/discussions/45852#discussioncomment-12268250

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org


Re: [D] require_confirmation_dag_change need usecase/explanation [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
GitHub user potiuk added a comment to the discussion: require_confirmation_dag_change need usecase/explanation

No idea. And please avoid tagging people directly. People here are possibly helpi g if they feel like they can help and have some time to spare, not because they are tagged. And by tagging peop you limit your chances to get help from others. 

GitHub link: https://github.com/apache/airflow/discussions/45852#discussioncomment-11908270

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org