jkarun opened a new issue, #37084:
URL: https://github.com/apache/airflow/issues/37084
### Apache Airflow version
2.8.1
### If "Other Airflow 2 version" selected, which one?
2.6.1
### What happened?
I am using dynamic task mapping of TriggerDagRunOperator to trigger sub-dags
based on previous component responses. Recently I upgraded the airflow version
to 2.8.1 and the graph/grid UI is not loading and gets an error popup. Earlier
I was using version 2.6.1 and was able to view the graph UI.
Sample Code I used in version 2.6.1
```
@task.python(queue='kubernetes', task_id='get_child_dag_details')
def get_child_dag_details(**kwargs):
"""
Fetch function pipeline details. This function MUST return list of
dict value to run.
sample output formate output:
[
{'trigger_dag_id': '', 'conf': {}},
]
"""
try:
# make REST API call to an external system and get the dag name
and parameter
except Exception as error:
logging.error(error)
raise
champ_details = get_provisional_champion_details()
dynamic_dag_trigger = TriggerDagRunOperator.partial(
task_id='trigger_sub_dag',
wait_for_completion=True,
poke_interval=30,
allowed_states=['success'],
).expand_kwargs(champ_details)
component_A >> champ_details >> dynamic_dag_trigger
```
After upgrading the airflow version graph UI throws the below error
<img width="1784" alt="image"
src="https://github.com/apache/airflow/assets/12997707/c7a2c6b4-757c-490a-a9b7-b676d267cb1d">
### What you think should happen instead?
DAG should load a graph or grid view in the UI without changing the working
code.
### How to reproduce
use airflow 2.8.1 and my sample code to reproduce the error.
### Operating System
Mac
### Versions of Apache Airflow Providers
_No response_
### Deployment
Amazon (AWS) MWAA
### Deployment details
_No response_
### Anything else?
For a workaround, I set the **operator_extra_links** property of
TriggerDagRunOperator to an empty list. After setting this property I can view
the graph/grid view of the DAG in Airflow 2.8.1 version.
sample code:
```
TriggerDagRunOperator.operator_extra_links=[]
dynamic_dag_trigger = TriggerDagRunOperator.partial(
task_id='trigger_sub_dag',
wait_for_completion=True,
poke_interval=30,
allowed_states=['success'],
).expand_kwargs(champ_details)
```
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]