rahul-madaan opened a new issue, #41261:
URL: https://github.com/apache/airflow/issues/41261

   ### Apache Airflow Provider(s)
   
   openlineage
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-openlineage==1.9.1
   
   ### Apache Airflow version
   
   Any version above 2.7.0
   
   ### Operating System
   
   Mac OS 14.5
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   Using breeze to run Airflow
   
   ### What happened
   
   In case of nested task groups, we are not getting task group names groups 
levels except the inner most.
   
   eg. in this case group1 is inside group3
   ```
   "task_group": {
       "downstream_group_ids": "[]",
       "downstream_task_ids": "[]",
       "group_id": "group1",
       "prefix_group_id": true,
       "tooltip": "",
       "upstream_group_ids": "[]",
       "upstream_task_ids": "[]"
   },
   "task_id": "group3.group1.task2",
   ```
   
   
   ### What you think should happen instead
   
   group_id should have been "group3.group1"
   
   ### How to reproduce
   
   DAG code:
   ```from airflow import DAG
   from airflow.operators.python_operator import PythonOperator
   from airflow.utils.task_group import TaskGroup
   from datetime import datetime, timedelta
   
   default_args = {
       'owner': 'airflow',
       'depends_on_past': False,
       'start_date': datetime(2023, 1, 1),
       'email_on_failure': False,
       'email_on_retry': False,
       'retries': 1,
       'retry_delay': timedelta(minutes=5),
       'catchup': False,
   }
   
   def my_function():
       print("Hello World")
   
   with DAG('task_group_test_nested4',
            default_args=default_args,
            schedule_interval=timedelta(days=1),
            catchup=False) as dag:
   
       task1 = PythonOperator(task_id='task1', python_callable=my_function)
   
       with TaskGroup(group_id='group3') as group3:
           with TaskGroup(group_id='group1') as group1:
               task2 = PythonOperator(task_id='task2', 
python_callable=my_function)
               task3 = PythonOperator(task_id='task3', 
python_callable=my_function)
   
           task4 = PythonOperator(task_id='task4', python_callable=my_function)
           task5 = PythonOperator(task_id='task5', python_callable=my_function)
   
       task1 >> group3
   
   
   ```
   
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] 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]

Reply via email to