crc-org / crc-extension

Red Hat OpenShift Local Extension for integration of OpenShift Local clusters with Podman Desktop
Apache License 2.0
13 stars 16 forks source link

When preset is to the current preset, if still asks me to delete #130

Closed gbraad closed 1 year ago

gbraad commented 1 year ago
  1. start with microshift preset
  2. change to openshift preset
  3. answer 'cancel' to the preset changed dialog
  4. change back to microshift
  5. still get the change dialog while this is the same as the current (running) preset
gbraad commented 1 year ago

I guess

https://github.com/crc-org/crc-extension/blob/f975968de77c148687b4165332c7e2d244b0ff73/src/preferences.ts#L165

let needRecreateCrc = false;

is not properly set.

gbraad commented 1 year ago

Added:

  // check for recreate need based on current status too
  if (currentStatus.Preset !== newConfig.preset) {
    console.log("Preset doesn't match. Need to recreate");
    needRecreateCrc = true;
    needRefreshConfig = true;
  }
  else {
    console.log("Preset matches. No need to recreate");
    needRecreateCrc = false;
    needRefreshConfig = true;
  }

but experienced issues with a crashing VM/sshd inside the VM. (unrelated, but annoying as this shows unreachable is not handled).

gbraad commented 1 year ago

Fixed in v1.0.3