-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Labels
affected_version:2.7Issues Reported for 2.7Issues Reported for 2.7area:UIRelated to UI/UX. For Frontend Developers.Related to UI/UX. For Frontend Developers.area:webserverWebserver related IssuesWebserver related Issueskind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
Description
Apache Airflow version
2.7.0rc1
What happened
As per #31583, now we can only run DAG with config from UI if DAG has params, however, if a DAG is using dag_run.conf there is no way to run with config from UI and as dag_run.conf is not deprecated most of the users will be impacted by this
@hussein-awala also mentioned it in his voting
What you think should happen instead
I think there should be a way to provide param values from UI when dag_run.conf is used in DAG
How to reproduce
Use below DAG in 2.7.0rc and you will notice there is no way to provide conf value from airflow UI
DAG CODE
from airflow.models import DAG
from airflow.operators.bash import BashOperator
from airflow.operators.python import PythonOperator
from airflow.utils.dates import days_ago
dag = DAG(
dag_id="trigger_target_dag",
default_args={"start_date": days_ago(2), "owner": "Airflow"},
tags=["core"],
schedule_interval=None, # This must be none so it's triggered by the controller
is_paused_upon_creation=False, # This must be set so other workers can pick this dag up. mabye it's a bug idk
)
def run_this_func(**context):
print(
f"Remotely received value of {context['dag_run'].conf['message']} for key=message "
)
run_this = PythonOperator(
task_id="run_this",
python_callable=run_this_func,
dag=dag,
)
bash_task = BashOperator(
task_id="bash_task",
bash_command='echo "Here is the message: $message"',
env={"message": '{{ dag_run.conf["message"] if dag_run else "" }}'},
dag=dag,
)
Operating System
MAS os Monterey
Versions of Apache Airflow Providers
No response
Deployment
Astronomer
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
cryptopalxyz
Metadata
Metadata
Assignees
Labels
affected_version:2.7Issues Reported for 2.7Issues Reported for 2.7area:UIRelated to UI/UX. For Frontend Developers.Related to UI/UX. For Frontend Developers.area:webserverWebserver related IssuesWebserver related Issueskind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet