- Notifications
You must be signed in to change notification settings - Fork928
Closed
Description
Definition of Done
Workspace autostop should fallback to theworkspace.ttl
if theworkspace.latest_build.deadline
is zero.
Steps to Reproduce
- Create a workspace with autostop enabled
- Start workspace and wait for transition to complete
- Edit database and set workspace.latest_build.deadline to time.Zero e.g.
update workspace_builds set deadline='0001-01-01 00:00:00+00' where id = 'deadbeef-dead-beef-dead-beefdeadbeef';
- Observe that workspace does not auto-stop
Expected
Workspace should auto-stop after now plus workspace TTL.
Actual
Workspace does not auto-stop.
Logs
Jun 01 13:39:57 coder coder[28025]: 2022-06-01 13:39:57.575 [DEBUG] <./coderd/autobuild/executor/lifecycle_executor.go:132> (*Executor).runOnce.func2 latest workspace build has zero deadline, skipping {"workspace_id": "64ff14cb-3b2d-4aad-8011-247f2cf9332f", "workspace_build_id": "a67e7139-6266-4e03-8d91-eb21ed14642d"}