Closed
Description
Bug description
The DB contains +6k entries of prebuilds in 'queued' state. Would be good to understand what happens, clean things up and prevent these from being created further.
Updating prebuilt.state on failed prebuild start
During this incident we discovered that there seems to be an ongoing issue with updating state for prebuilds whose instances never reach RUNNING
phase (note the empty startedTime
):
SELECT wsi.id, wsi.creationTime, wsi.phasePersisted, wsi.status, wsi.startedTime, wsi.stoppingTime, wsi.stoppedTime
FROM d_b_workspace_instance AS wsi
JOIN d_b_prebuilt_workspace AS pws
ON pws.buildWorkspaceId = wsi.workspaceId
WHERE pws.state = 'queued'
AND wsi.phasePersisted = 'stopped'
ORDER BY wsi.creationTime DESC;
Note: Especially older entries could also be fallout from other incidents + cleanups, but there seems to be a couple of fresh ones every day.
Steps to reproduce
select * from d_b_prebuilt_workspace where state = 'queued' order by creationTime;
Metadata
Metadata
Assignees
Type
Projects
Status
Done