`task-expires-after` should be more broadly configurable

Open
#527 2 comments 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 reading the task-expires-after configuration in config.yml and the hardcoded defaults in src/taskgraph/transforms/task.py around lines 1084-1086. Trace how task defaults are selected, then define and test configuration behavior for all tasks, including separate by-level and by-tasks-for settings.

Written by the indexing model from the issue text.

Description

#409 added a task-expires-after to config.yml which only applies to non-try tasks, with other tasks defaulting to a hardcoded level of "1 year". This is confusing, because when you look at the configuration all you see is something like:

task-expires-after: 90 days

...which can be fairly interpreted to mean "all tasks expire after 90 days" (I'm not even sure most people would interpret it to mean "by default, unless overridden elsewhere", although that's probably a separate issue.)

To remedy this, I think task-expires-after should apply to all task defaults, and support being configured at least by-level and by-tasks-for (to allow things like try and pull requests to easily have separate expires configured). This would make the behaviour much more obvious to users, and have the benefit of getting rid of fully hardcoded values such as in https://github.com/taskcluster/taskgraph/blob/649bba50850dd4c89ad59949ff1be1f36e05f083/src/taskgraph/transforms/task.py#L1084-L1086.

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.