Skip to content

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

Description

@ahal

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.

Activity

  1. jcristau commented on Jan 10, 2025

    @jcristau
    Contributor

    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:

    Presumably you mean target set rather than target graph.

    In general this might make sense, however the very coarse granularity of priorities in tc makes me wonder how widely useful this can be, plus I can see there being issues around things like cached tasks, which can end up being depended on by tasks in other graphs, and so probably shouldn't see their priorities lowered like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions