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

Triggering DAG with parameters is mandatory when show_trigger_form_if_no_params is enabled #36843

Closed
1 of 2 tasks
csp33 opened this issue Jan 17, 2024 · 5 comments · Fixed by #37063
Closed
1 of 2 tasks
Labels
affected_version:2.8 Issues Reported for 2.8 area:UI Related to UI/UX. For Frontend Developers. good first issue kind:bug This is a clearly a bug

Comments

@csp33
Copy link
Contributor

csp33 commented Jan 17, 2024

Apache Airflow version

2.8.0

If "Other Airflow 2 version" selected, which one?

No response

What happened?

When setting show_trigger_form_if_no_params to True, users can not trigger DAGs without configuration. The Trigger DAG button redirects to the Trigger DAG form instead of triggering the DAG with dagrun_conf={} (like before)

Grabacion.de.pantalla.2024-01-17.a.las.13.54.15.mov

What you think should happen instead?

The Trigger DAG button should trigger the DAG with dagrun_conf={} (like before).
The Trigger DAG w/ config button should keep its behavior.

How to reproduce

  1. Add a DAG without params to your DAGs folder (for example, example_bash_operator.py).
  2. Start Airflow with the following environment variable value: AIRFLOW__WEBSERVER__SHOW_TRIGGER_FORM_IF_NO_PARAMS=True
  3. Try to trigger the DAG without config (first option)

Operating System

Airflow Docker Image

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

AIRFLOW__WEBSERVER__SHOW_TRIGGER_FORM_IF_NO_PARAMS=True

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@csp33 csp33 added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Jan 17, 2024
@Taragolis Taragolis added good first issue and removed needs-triage label for new issues that we didn't triage yet labels Jan 17, 2024
@eladkal eladkal added the affected_version:2.8 Issues Reported for 2.8 label Jan 17, 2024
@anudeep-pv
Copy link
Contributor

anudeep-pv commented Jan 22, 2024

I may be wrong but I think it's related to this change https://github.com/apache/airflow/pull/36026/files#diff-917b70d2661fae8322c538a4f60b9d4ba755556036fe0c527eb0411a6ac60f2e

In this case,
request_conf is None, request.method is POST, show_trigger_form_if_no_params is True
cc: @jscheffl

@jscheffl jscheffl added area:UI Related to UI/UX. For Frontend Developers. and removed area:core labels Jan 23, 2024
@jscheffl
Copy link
Contributor

Good catch. It seems this slipped through the tests when we tried to fix the XSS problem of the trigger with the referenced commit.
Also this bug is in 2.8.1. If nobody jumps on this, I could try to fix this in the next weeks.

@jscheffl
Copy link
Contributor

jscheffl commented Feb 1, 2024 via email

@wilk85
Copy link

wilk85 commented Feb 3, 2024

@jscheffl thank you, im using helm charts, and i was wondering which annotation would be right and where exactly to add that env variable, i was testing with env: envVars, extraEnvVars

@jscheffl
Copy link
Contributor

jscheffl commented Feb 4, 2024

@jscheffl thank you, im using helm charts, and i was wondering which annotation would be right and where exactly to add that env variable, i was testing with env: envVars, extraEnvVars

@wilk85
Please take a look to https://airflow.apache.org/docs/helm-chart/stable/airflow-configuration.html
Probably (never tried myself) you need to set the following in your values.yaml:

config:
  webserver:
    show_trigger_form_if_no_params: 'True'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:2.8 Issues Reported for 2.8 area:UI Related to UI/UX. For Frontend Developers. good first issue kind:bug This is a clearly a bug
Projects
None yet
6 participants