Tasks should be created with task group ID of decision task

Open
#540 2 comments 0 reactions 1 assignee View on GitHub

@petemoore is already working on this.

Since May 7, 2026.

Assessment

This issue has not been assessed yet.

Description

Currently taskgraph assumes that taskId and taskGroupId match. This means, if you retrigger a decision task, but e.g. place it in the original task group, subtasks will end up in a completely different task group to the decision task. Or maybe you want to have more than one decision task in your task group. To ensure that subtasks are always created in same task group as decision task, the subtask should have its taskGroupId set to the taskGroupId of the decision task (not the taskId of the decision task).

One option would be to query the taskcluster queue to get the taskGroupId of the current task. Another option would be to check if TASK_GROUP_ID is set in the environment, and fall back to querying taskcluster queue if it isn't. The reason for this, is that TASK_GROUP_ID env var has been added to Generic Worker tasks in taskcluster/taskcluster#7140, so should be available in future to taskgraph.

Code is here: https://github.com/taskcluster/taskgraph/blob/4896be17ec9ef349f61f8acb85699dc9a9c7e555/src/taskgraph/create.py#L45

Dominant language
Python
Stars
26
Forks
55
Avg merge
2d 6m
Merged PRs (30d)
15

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from taskcluster/taskgraph

All issues in taskcluster/taskgraph

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.