Skip to content

gc-script-deploy UI gets wonky when app install failed #156

Description

@IamJeffG

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

  1. launch the app against a real caprover
  2. install an app.
  3. if the installation raises an exception that gc-stack-deploy catches, the UI switches to FAILED.
  4. 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions