'gdk pristine' should ask before deleting backups and logs
Overview
gdk pristine deletes gdk.yml backups and logs in GDK. That is a potentially destructive operation, especially when troubleshooting.
Impacted categories
The following categories relate to this issue:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Impact
-
Restoring after troubleshooting: Users won’t accidentally delete backups of their
gdk.yml, which were created during troubleshooting and to which users may want to revert back to after restoring GDK to a healthy state. - Harder troubleshooting: By deleting all GDK Rake logs, troubleshooting can become more cumbersome.
Implementation plan
In lib/gdk/command/pristine.rb, we should do one of the following:
- delete only logs and config backups that are older than a given threshold (e.g. a month or a week), or
- ask the user whether or not they want to delete the logs and config backups.
Edited by Kev Kloss