rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
450 stars 256 forks source link

Machine Pool Changes Saved Unexpectedly When Switching from Form to YAML Editor #9697

Open rak-phillip opened 1 year ago

rak-phillip commented 1 year ago

Description

When editing a machine pool and then switching from Form mode to the YAML editor, changes are unexpectedly saved, even if the user cancels the operation. This behavior results in the machine pool values being updated when the user didn't intend to make any changes.

Steps to Reproduce (Edit as YAML commits changes)

  1. Navigate to Cluster Management and click on "Create"
  2. Provision a new RKE 2 Cluster (this has been reproduced with both DigitalOcean & VMware vSphere)
    1. Give the cluster a name and leave all other fields as default
    2. Click Create
    3. Wait for the cluster to enter a ready state
  3. Edit the cluster that was provisioned in Step 2
    1. Change some values for a Machine Pool, for example update the Size of a Digital Ocean cluster from Basic: 4GB to Basic: 8GB
    2. Click on "Edit as YAML"
    3. Click Cancel

Expected

Actual

Additional Info

richard-cox commented 11 months ago

Given https://github.com/rancher/dashboard/pull/9798 / https://github.com/rancher/dashboard/issues/9724 this issue is back again

zube[bot] commented 11 months ago

richard-cox said: @rak-phillip Can this one be moved to 2.8q1?

rak-phillip commented 11 months ago

@richard-cox yes, we can move this one out. We get a warning when clicking on the Edit as YAML button with #9798, so the user will at least be notified that Machine Pools will be saved when switching to the YAML editor.

momesgin commented 9 months ago

The current process involves the Frontend triggering a Backend call with the updated configuration to obtain the updated YAML for rendering. This involves a PUT request that saves the cluster with the modified configuration. Following discussions with @richard-cox, two potential solutions have been identified to address this matter:

  1. Backend Solution:
  1. Frontend Logic Enhancement:
richard-cox commented 8 months ago

I would vote we discuss option 1 with the BE. Requesting the machine config YAML that we can show inline when editing cluster YAML... and then save that YAML when the user clicks on saving the cluster would be better UX

gaktive commented 8 months ago

I'll file a backend ticket and figure out how to get it rolling.

gaktive commented 8 months ago

https://github.com/rancher/rancher/issues/43993 in place. Need to check on process to get that evaluated though I left it as a bug for now, despite it screaming feature request.

gaktive commented 5 months ago

For internal coordiation, SURE-8093 is our reference.

gaktive commented 3 months ago

Pushing to 2.10.0 since this has been around for a while and we're still backend blocked.