Summary: A command to find and remove unneeded files from the workspace directory.
Demo:
Passing 25 unit tests with many edge cases which create files/directories, call clean_workspace(), and then verify its contents.
Details
"Aggressive" mode removes all task_runs/*/ directories that are not directly pointed to by a symlink in symlinks/.
"Safe" mode also keeps task_runs/*/ directories which are indirectly pointed to by a symlink. This can happen if a symlink points to a task_runs/*/ directory which has a symlink in it that points to another task_runs/*/ directory.
I chose to write so many unit tests because this operation must be bug-free.
Summary: A command to find and remove unneeded files from the workspace directory.
Demo: Passing 25 unit tests with many edge cases which create files/directories, call
clean_workspace()
, and then verify its contents.Details