Current Buggy or Suspicious Behavior
gc-script-deploy UI gets wonky when app install failed
This is specifically about when something goes wrong during installation and the installer detects that, marking it FAILED.
Steps to Reproduce
You could force this by modifying a AppSpec subclass's def install() to raise exception
- launch the app against a real caprover
- install an app.
- if the installation raises an exception that gc-stack-deploy catches, the UI switches to FAILED.
- Now since it failed, you want to uninstall it.
BUG: You cannot uninstall a failed app.
(The workaround is to exit the app, and re-launch it. On re-launch the app will forget anything had failed, will see the app appears to be installed, and give you the option to uninstall the "installed" app)
Expected Behavior
One possibility is to remove FAILED from AppStatus (represent it some other way), OR to tweak resolve_action so that resolve_action(AppStatus.FAILED, checked=False) -> Action.UNINSTALL
To go one step further, we could also add a one-step reinstall feature. Add a new Action.REINSTALL (which gets interpreted by ChecklistScreen.on_button_pressed as to_uninstall + to_install). And then tweak resolve_action so that
resolve_action(AppStatus.FAILED, checked=FALSE) -> Action.UNINSTALL # current behavior, maintained
resolve_action(AppStatus.FAILED, checked=True) -> Action.REINSTALL # additional new behavior
Current Buggy or Suspicious Behavior
gc-script-deploy UI gets wonky when app install failed
This is specifically about when something goes wrong during installation and the installer detects that, marking it FAILED.
Steps to Reproduce
You could force this by modifying a AppSpec subclass's
def install()to raise exceptionBUG: You cannot uninstall a failed app.
(The workaround is to exit the app, and re-launch it. On re-launch the app will forget anything had failed, will see the app appears to be installed, and give you the option to uninstall the "installed" app)
Expected Behavior
One possibility is to remove FAILED from AppStatus (represent it some other way), OR to tweak
resolve_actionso thatresolve_action(AppStatus.FAILED, checked=False) -> Action.UNINSTALLTo go one step further, we could also add a one-step reinstall feature. Add a new Action.REINSTALL (which gets interpreted by
ChecklistScreen.on_button_pressedasto_uninstall + to_install). And then tweakresolve_actionso that