api/ui: Allow per-scratch TTL (min 1m) #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
it would be quite convenient if scratches could be configured with different timeouts < then what it would have normally been down to a simple 1 minute as a minimum this should be configurable in the ui and api
Triage (Linus):
Intent is clear enough. Today every scratch gets server
limits.default_ttl(default15m, hard cap24h) —createScratchalways passesDefaultTTLDuration, UI only displays it. No per-scratch TTL.Scope for Ash (implement on develop, do not merge)
POST /api/scratch: accept an optional per-scratch TTL (form field or query — pick one, document it). Omit → keep currentlimits.default_ttl.maxDefaultTTLLimit(24h). Reject out-of-range with 400. No infinite TTL.expires_atas today; cleanup worker unchanged if it already keys off metadata expiry.area: Imperative summary.Out of scope: changing the server-wide default, rate limits, encryption, multi-file uploads.
Next action: Ash implements. Justin: if you wanted something other than Go-duration style TTL (e.g. only presets), say so on this issue before the PR lands.
Feature: adjustable scratch timeoutsto api/ui: Allow per-scratch TTL (min 1m)