Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task-expires-after should be more broadly configurable #527

Open
bhearsum opened this issue Jun 24, 2024 · 2 comments
Open

task-expires-after should be more broadly configurable #527

bhearsum opened this issue Jun 24, 2024 · 2 comments

Comments

@bhearsum
Copy link
Contributor

#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

config.graph_config._config.get("task-expires-after", "28 days")
if config.params.is_try()
else "1 year"
.

@ahal
Copy link
Collaborator

ahal commented Jun 24, 2024

Maybe we could also call it default-task-expires-after.

Though at this point, it seems like what we really want is a global task-defaults (just like you can have a task-defaults in a kind.yml that then gets used by all the files in tasks-from, except that this time it would work across all kinds).

This probably warrants a separate issue though.

@bhearsum
Copy link
Contributor Author

Maybe we could also call it default-task-expires-after.

Though at this point, it seems like what we really want is a global task-defaults (just like you can have a task-defaults in a kind.yml that then gets used by all the files in tasks-from, except that this time it would work across all kinds).

This probably warrants a separate issue though.

I could go either way on this. I can see a case for treating something like expires in a special way (because it's always part of a task definition), whereas supporting task-defaults in general could end up getting weird because, eg: someone may want to set defaults or all things that go through the run transforms, which may not apply to something like fetch. I wouldn't try to veto this change if someone wanted to do it, and it would supercede this, but I agree it's a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants