kaxil commented on issue #12757: URL: https://github.com/apache/airflow/issues/12757#issuecomment-739089385
@yuqian90 / @houqp If you have some time can you help looking into this issue, it looks like it has something to do with the TaskGroup change in graph.html after some debugging. Here is the DAG (notice the 2nd task does is not directly assigned to a DAG but because of the dependency of the other task it works fine on Tree View). It used to work on Graph view too until the TaskGroup change in `airflow/www/templates/airflow/graph.html` file: Error:  Tree View:  DAG: ```python """Demo DAG""" from datetime import timedelta from airflow import DAG from airflow.contrib.operators.kubernetes_pod_operator import KubernetesPodOperator from airflow.utils.dates import days_ago args = { 'owner': 'airflow', } dag = DAG( dag_id='demo_test', default_args=args, schedule_interval='0 0 * * *', start_date=days_ago(2), dagrun_timeout=timedelta(minutes=60), tags=['demo'], params={ "pod_op_image": "localhost:5000/my-image:latest", "pod_op_image_pull_policy": "IfNotPresent", }, ) env_params = { "TEST_ENV_VAR": "TEST ENV VAR", } normal_op = KubernetesPodOperator( dag=dag, name='normal_op', task_id='normal_op', namespace='airflow', image="{{ dag_run.conf['pod_op_image'] }}", image_pull_policy="{{ dag_run.conf['pod_op_image_pull_policy'] }}", env_vars=env_params, cmds=["/bin/bash", "-c"], arguments=["echo $TEST_ENV_VAR"], ) #below is templated multi-string var which is used as argument further templated_command = """ echo "{{ var.value.TEST_VAR}}" echo "{{ params.my_param }}" """ templated_op = KubernetesPodOperator( name='templated_op', task_id='templated_op', namespace='airflow', image="{{ dag_run.conf['pod_op_image'] }}", image_pull_policy="{{ dag_run.conf['pod_op_image_pull_policy'] }}", cmds=["bash", "-c"], arguments=[templated_command], params={'my_param': 'Passed_Parameter'}, ) normal_op >> templated_op ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
