Dependency only tasks should run with maximum allowed priority of their dependents

Open
#625 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
ci-cd

Research direction

Start by tracing how the optimized and target graphs are produced and how task priorities are represented. Then inspect how requests to the Taskcluster auth service could obtain the highest allowed priority. Done means dependency-only tasks follow the stated capped maximum-priority algorithm without changing target tasks.

Written by the indexing model from the issue text.

Description

Tasks that get pulled into the graph only as a dependency should adjust their priority to match the priority of the task(s) that depend on it.

For example, if a test task runs with the lowest priority, the build that it depends on should also be lowest priority. Conversely, if we're in the middle of a chemspill and need to schedule some release tasks with highest priority, the builds that they depend on should also run with highest priority.

In Gecko, we already have the ability to set the priority of an entire graph, so the chemspill case isn't that important. But the lowest case is not currently possible (unless you're willing to make the whole graph lowest). But in general, it would be nice if this tuning of priorities happened automatically and at a much more granular level.

I propose that for all tasks that are in the optimized graph but not the target graph, we set the priority based on the following algorithm:

min(<highest allowed priority>, max(<priorities of dependent tasks>))

Obtaining the <highest allowed priority> would require a request to the Taskcluster auth service. I'm not sure if we'd want the ability to toggle this behaviour on or off. I'd be inclined to make it the default at the very least.

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.