Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix Triggering DAG with parameters is mandatory when show_trigger_form_if_no_params is enabled #37063

Conversation

jscheffl
Copy link
Contributor

After the last rework of the trigger form to prevent a XSS we did not fully test the UI when the configuration show_trigger_form_if_no_params is set to True.

This PR fixes the reported problem as reported in #36843 by submitting a virtual empty form.
Alongside I found that there is a key error if some required fields are not set, which still is validated. In such cases an Exception was produced earlier, now it is correctly forwarding and forcing the user to enter data into the form.

How to test (needs to be made manually :-( ):

  • Run Airflow and trigger a DAG with params (e.g. example_params_ui_tutorial) and one without (e.g. example_bash_decorator) and see like before form is displayed depending on params defined on the DAG.
  • Start webserver with AIRFLOW__WEBSERVER__SHOW_TRIGGER_FORM_IF_NO_PARAMS=True and try to start the two DAGs above with and without params. Shuod fix the bug reported.

closes: #36843

@jscheffl jscheffl added type:bug-fix Changelog: Bug Fixes area:UI Related to UI/UX. For Frontend Developers. labels Jan 28, 2024
@jscheffl jscheffl added this to the Airflow 2.8.2 milestone Jan 28, 2024
@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Jan 28, 2024
@jscheffl jscheffl changed the title Bugfix/36843 allow skip params form if forms wo parameters is true Bugfix Triggering DAG with parameters is mandatory when show_trigger_form_if_no_params is enabled Jan 28, 2024
@potiuk potiuk merged commit 1197f2f into apache:main Jan 29, 2024
54 checks passed
jedcunningham pushed a commit that referenced this pull request Feb 9, 2024
…form_if_no_params is enabled (#37063)

* Add a requested default configuration to form call to start w/o form display

* Follow-up bugfix - ensure bad form values are transferred when key exists

(cherry picked from commit 1197f2f)
potiuk pushed a commit that referenced this pull request Feb 13, 2024
…form_if_no_params is enabled (#37063)

* Add a requested default configuration to form call to start w/o form display

* Follow-up bugfix - ensure bad form values are transferred when key exists

(cherry picked from commit 1197f2f)
ephraimbuddy pushed a commit that referenced this pull request Feb 22, 2024
…form_if_no_params is enabled (#37063)

* Add a requested default configuration to form call to start w/o form display

* Follow-up bugfix - ensure bad form values are transferred when key exists

(cherry picked from commit 1197f2f)
abhishekbhakat pushed a commit to abhishekbhakat/my_airflow that referenced this pull request Mar 5, 2024
…form_if_no_params is enabled (apache#37063)

* Add a requested default configuration to form call to start w/o form display

* Follow-up bugfix - ensure bad form values are transferred when key exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Triggering DAG with parameters is mandatory when show_trigger_form_if_no_params is enabled
3 participants