rancher-sandbox / rancher-desktop

Container Management and Kubernetes on the Desktop
https://rancherdesktop.io
Apache License 2.0
6.02k stars 285 forks source link

Trying to enable kubespin without enabling web assembly gives a rest error instead of a human readable error #7517

Open jsoref opened 1 month ago

jsoref commented 1 month ago

Actual Behavior

image

Steps to Reproduce

  1. Download and installed Rancher Desktop 1.16.0
  2. Open Rancher Desktop
  3. Open Preferences
  4. For completeness (but not in reality)
    1. Select Container Engine
    2. Uncheck WebAssembly (Wasm) Enabled
  5. Select Kubernetes
  6. Check Kubernetes Enable Kubernetes (ignore the fact that this label doesn't match the one above, since you didn't open that section in the first place)
  7. Check Options Install Spin Operator
  8. Read message at bottom left of window

Result

Errors in proposed settings: Setting experimental.kubernetes.options.spinkube can only be set when experimental.container-engine.web-assembly.enabled is set as well.

Expected Behavior

Errors in proposed settings: To enable Kubernetes spinkube you need to enable Container Engine WebAssembly first.

Additional Information

I understand that this is a REST response. That's fine. The REST API is entitled to return technical details. The steps above involve a user interface, and the user interface's job is to convert human interactions into REST API calls and REST API messages into messages that make sense to humans using the UI.

Rancher Desktop Version

1.16.0

Rancher Desktop K8s Version

1.28.4

Which container engine are you using?

moby (docker cli)

What operating system are you using?

macOS

Operating System / Build Version

Sonoma 14.6.1

What CPU architecture are you using?

arm64 (Apple Silicon)

Linux only: what package format did you use to install Rancher Desktop?

None

Windows User Only

No response

VikalpRusia commented 1 month ago

Hi @jsoref , I would like to pick this up

I may need help as this will mark my first contribution. :)

jsoref commented 1 month ago

Cool. I find the slack channel to be a great place to get help. I probably won't be the person giving it (although I can definitely give feedback once you're started). Thanks for expressing an interest.

VikalpRusia commented 1 month ago

@jsoref -> Can you share me the slack channel, so that I can discuss approaches before implementing it.

jsoref commented 1 month ago

There's a link to slack at the bottom of https://rancherdesktop.io/

There's also a link to it in https://github.com/rancher-sandbox/rancher-desktop/issues/new/choose

jandubois commented 1 month ago

This is probably not a good first issue. The error messages come from the settings validator that is part of the REST API, so this will require structural changes, and not just editing a string in an error message. Because the error message is correct when the REST API call was made by rdctl and not the GUI.