-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Apache Airflow version
2.5.1
What happened
when using a dynamically generated task that gets the expand data from xcom after a branch_task the graph doesn't render.
It reappears once the dag run is finished.
tried with BashOperator and a KubernetesPodOperator.
the developer console in the browser shows the error:
Uncaught TypeError: Cannot read properties of undefined (reading 'length') at z (graph.1c0596dfced26c638bfe.js:2:17499) at graph.1c0596dfced26c638bfe.js:2:17654 at Array.map (<anonymous>) at z (graph.1c0596dfced26c638bfe.js:2:17646) at graph.1c0596dfced26c638bfe.js:2:26602 at graph.1c0596dfced26c638bfe.js:2:26655 at graph.1c0596dfced26c638bfe.js:2:26661 at graph.1c0596dfced26c638bfe.js:2:222 at graph.1c0596dfced26c638bfe.js:2:227 z @ graph.1c0596dfced26c638bfe.js:2 (anonymous) @ graph.1c0596dfced26c638bfe.js:2 z @ graph.1c0596dfced26c638bfe.js:2 (anonymous) @ graph.1c0596dfced26c638bfe.js:2 (anonymous) @ graph.1c0596dfced26c638bfe.js:2 (anonymous) @ graph.1c0596dfced26c638bfe.js:2 (anonymous) @ graph.1c0596dfced26c638bfe.js:2 (anonymous) @ graph.1c0596dfced26c638bfe.js:2
grid view renders fine.
What you think should happen instead
graph should be rendered.
How to reproduce
def branch_dynamic_flow():
@branch_task
def choose_path():
return 'b'
@task
def a():
print('a')
@task
def get_args():
return ['echo 1', 'echo 2']
b = BashOperator.partial(task_id="b").expand(bash_command=get_args())
path = choose_path()
path >> a()
path >> b
Operating System
red hat
Versions of Apache Airflow Providers
apache-airflow-providers-cncf-kubernetes | 5.1.1 | Kubernetes
Deployment
Official Apache Airflow Helm Chart
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