-
Notifications
You must be signed in to change notification settings - Fork 1
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 expiration and deletion #981
Conversation
b8bf913
to
5d72be8
Compare
5d72be8
to
2570af7
Compare
Hmm. It occurs to me that if the helper aggregator no longer exists, e.g. because the user is turning down their own BYOH, then tasks involving the deleted aggregator will be undeletable. I suppose I should make it such that the leader aggregator must succeed in setting expiration, while the helper can be permissive of failure. This should be fine--the leader is what drives the protocol and is what incurs most of the cost. |
* Exclude deleted tasks from task lists * Client and CLI support for task expiry and deletion
Co-authored-by: Tim Geoghegan <[email protected]>
Supports #862.
Two methods are provided.
PATCH {task_id}
with one fieldexpiration
that allows free manipulation of a task's expiration date. As alluded to in Change default task expiration to None #980, there is no semantic validation of the new expiration--this can be set to whatever the user would like. Changes are propagated to the aggregators.DELETE {task_id}
which sets the aggregators' expiration, if not already set and expired, and then tombstones the divviup-api view of the task by settingdeleted_at
. Currently, there is no effect of this flag--all other methods will ignore the deleted_at field.Note that I'm assuming aggregators need to have support for the missing endpoints, otherwise we explicitly fail. I landed on this because we don't want to 'lie' to the user about deletion/expiration, since active aggregator-side tasks can still process data.
There is still more work to be done, but I'm keeping this PR from getting too long.