-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Problem
When an admin sets Default TTL to 0 (disabling autostop), the Activity Bump field remains editable in the template scheduling UI. This is confusing and dangerous because:
Activity Bumphas no effect when there's no deadline to extend- Admins may set both
Default TTL=0andActivity Bump=0thinking they're "fully disabling" autostop - This creates a dangerous state: existing running workspaces still have their old deadlines, but can no longer extend them via activity (see Warn template admins that autostop/activity_bump changes don't affect running workspaces #21688)
Key Insight: Activity Bump is a Self-Healing Mechanism
When activity_bump > 0 and default_ttl=0, activity bumps actually clear the deadline on running workspaces. This is a safety mechanism - the bump logic applies the new TTL (0) which results in deadline=null.
But when admins set both activity_bump=0 AND default_ttl=0:
- No bumps occur to "heal" the workspace
- Existing deadline persists
- Workspace autostops when the old deadline passes
Proposed Solution
When Default TTL is set to 0:
- Disable or hide the
Activity Bumpfield - Show a tooltip or helper text: "Activity bump only applies when a default TTL is configured. Leaving activity bump enabled allows running workspaces to clear their existing deadlines."
Alternatively, if Default TTL is set to 0, automatically set Activity Bump to a sensible default (e.g., 1 hour) rather than allowing 0.
Why This Helps
This is a minimally invasive way to reduce the chances of admins changing Activity Bump to 0 at the same time they disable autostop. By preserving activity_bump > 0, the self-healing mechanism remains active and running workspaces will naturally clear their deadlines on the next activity bump cycle.
It doesn't fully solve the underlying issue of existing workspaces retaining their deadlines (#21688), but it removes a common footgun from the UI and preserves the safety mechanism.
Related Issues
- Warn template admins that autostop/activity_bump changes don't affect running workspaces #21688 - Warn template admins that autostop/activity_bump changes don't affect running workspaces (larger fix)
- Enhanced Autostop Audit Logging #21702 - Enhanced Autostop Audit Logging
Created on behalf of @bjornrobertsson