You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/04 19:08:21 UTC

[GitHub] [airflow] pierrejeambrun commented on issue #25523: Mapped, classic operator tasks within TaskGroups prepend `group_id` in Graph View

pierrejeambrun commented on issue #25523:
URL: https://github.com/apache/airflow/issues/25523#issuecomment-1205665723

   Hello @josh-fell,
   
   From the [documentation](https://airflow.apache.org/docs/apache-airflow/stable/concepts/dags.html), I expect all of them to have the group_id prefix:
   > By default, child tasks/TaskGroups have their IDs prefixed with the group_id of their parent TaskGroup. This helps to ensure uniqueness of group_id and task_id throughout the DAG.
   >
   >To disable the prefixing, pass prefix_group_id=False when creating the TaskGroup, but note that you will now be responsible for ensuring every single task and group has a unique ID of its own.
   
   
   
   I think the graph is drawn with d3 in `airflow/www/static/js/graph.js` targeting the `graph-svg` element.
   
   There might be 2 different issues:
   - When looking at the data passed to the template `graph.html`, especially the `tasks` variable, and the results from successive ajax call (refetch on `/object/task_instances?dag_id=task_group_task_graph&execution_date...`) both show the same data, see the picture below. It looks like all have the `group_id` prefix except the `mapped_taskflow_task`.
   ![image](https://user-images.githubusercontent.com/14861206/182931536-fc5c14e3-6431-4f7f-b5ef-9025babafa6a.png)
   
       **Why are the label displayed for `not_mapped_classic_task` and `not_mapped_taskflow_task` different from what we see in this payload** (the group_id is not here anymore).
   
   - The id for the `mapped_taskflow_task` does not have the group_id prefix, this might be a more specific problem to the taskflow decorators. (I'm not sure here)
   
   _Note: I tried without overriding the task_id, and the same issue appears_
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org