-
Notifications
You must be signed in to change notification settings - Fork 41
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
Allow expiration to be overridden in fetch and docker-image kinds. Allow setting the default expiry on "try" tasks #409
Conversation
eeffe42
to
2f49575
Compare
bcbfdd5
to
a43bbf0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #409 +/- ##
=======================================
Coverage 60.06% 60.06%
=======================================
Files 69 69
Lines 6360 6361 +1
Branches 1284 1284
=======================================
+ Hits 3820 3821 +1
Misses 2254 2254
Partials 286 286 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd prefer a name like default-task-expiry
, but I see we already have task-deadline-after
, so this is fine as it's better to be consistent.
Also bonus points for adding some tests to |
Thanks! I improved the patch. I am gonna delete so much code from the translations repo when this lands :) |
Yeah, I was going for consistency there. |
"task-expires-after", | ||
description="Default 'expires-after' for non level 3 tasks, in relative date format. " | ||
"Eg: '90 days'", | ||
): str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think saying "non level 3" is technically incorrect because is_try()
only catches pull requests and projects that contain the string "try". Saying "level 1 tasks" would be more accurate.
That said, it's kind of a shame that this only impacts level 1 tasks. What if we added an optionally_keyed_by("level", str)
(like how task-deadline-after
is optionally keyed by project above).
This way the graph config could look like:
task-expires-after:
by-level:
1: 90 days
3: 1 year
Also, you could just set a single default for all levels:
task-expires-after: 1 year
Feel free to leave as a follow-up, but would be nice to have an issue on file at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into it a bit and filed #410
fixes #392
fixes #393
fixes #350
fixes #351