RFC: Concept of marking a workspace as dirty #9477
MrPeacockNLB
started this conversation in
RFCs
Replies: 1 comment 5 replies
-
I've been playing around a bit and implemented a very simple POC for this. I put some Bash scripts into a metadata resource to get current status of opened workspace.
PS: Code is far from perfect! |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
We are using ephemeral workspaces and open for each and every task a new workspace. If one is working on multiple projects simultaneously the list can get easely longer. Each workspace is derived from a repository as everybody nowadays works with a CVS like git. I often open a repository for read only in coder. So there were workspaces with no changes in it. So far so good. But it would be nice if one can see if there is unsaved work before deleting a workspace.
Currently one has to open the workspace and do some manual checking if there were some unsaved change in it. This is a time wasting task. Deleting a workspace means always the anwsering the security dialog or closing the workspace with the coder binary.
Solution
If there is some unsaved work in the workspace then this workspace is marked as dirty in the UI. This should be periodly requested from the coder daemon like metadata values. If the executed code return a code 0 then the workspace is clean or something like that. The executed code can check if there is some unsaved work in the filesystem in the workspace.
If a workspace is marked as clean a simple delete should remove a workspace without any dialog. There should also be the ability to cleanup all clean workspaces at once.
Deleting a dirty workspace should raise the known security dialog to prevent accidentally deleting unsaved work.
Beta Was this translation helpful? Give feedback.
All reactions