- Notifications
You must be signed in to change notification settings - Fork928
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
On the Failed Workspaces page, some dormant workspaces display a message indicating a deletion schedule that has already passed. For example:
This workspace has not been used for a year and has been marked dormant. It is scheduled to be deleted on January 30, 2025 at 2:51 PM.
However, the workspace was not deleted, as seen in the associated build failure, and the message remains misleading.
The associated build shows a deletion failure, but this failure is not reflected in the workspace UI.
The workspace may have failed to delete due to a Terraform state mismatch. A template admin may run coder rm ammar/blah --orphan to delete the workspace skipping resource destruction.
Note:
- In most cases, these failures can only be resolved by admins or users familiar with how the underlying workspace template is configured.
- If we automatically perform an orphan deletion without proper investigation, there's a risk of silently leaking resources.
Relevant Log Output
Expected Behavior
There are 2 issues here:
- Misleading messaging on the Failed Workspaces page
The current message suggests the workspace is pending deletion, when in reality the deletion attempt failed.
Suggestion:
The message should be updated to something more accurate, such as:
Unable to delete workspace. See build failure in the Builds page.
- Missing attribution in the Builds page
On the left panel, the “Delete by” field is currently empty for these failed deletion builds. Since the deletion was initiated automatically by the dormancy process, the field should reflect that.
Suggestion:
Instead of leaving it blank, we could populate this with something like:
System (Dormancy Scheduler)
to clearly indicate the source of the action.
Steps to Reproduce
- Go to the Failed Workspaces page in the dogfood instance.
- Locate a dormant workspace that still shows a scheduled deletion message, even though the scheduled date has already passed.
- Click into the workspace.
- Observe that the deletion build has failed.
- Check the associated Builds page for that workspace.
Environment
Dogfood instance
Additional Context
No response