rancher / dashboard

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

Unable to edit Project Name in Rancher 2.6 UI #7179

Closed gaktive closed 1 year ago

gaktive commented 2 years ago

Internal reference: SURE-5027 Reported in 2.6.4

Request description: User is unable to edit Project name (new and existing Projects). This is supported in Rancher v2.5, but does not appear to be supported in Rancher v2.6. Looks to be a dropped or missing feature in terms of UI operations.

Actual behavior: Project Name field in the form is greyed out, i.e. not available for edit.

Expected behavior: Project name field should be editable by an authorized user.

Workaround: A Project name can be modified using kubectl (projects.management.cattle.io) through the spec.displayName field.

View in 2.5.x: Projects - Rancher v2.5.jpg

View in 2.6.x: Projects - Rancher v2.6.jpg

brudnak commented 1 year ago

🚧 REOPENED

Reproduction Environment

Component Version / Type
Rancher version 2.7.0
Installation option Helm (high availability)
If Helm Chart k8s cluster v1.24.7+k3s1
Cert Details Let's Encrypt / traefik
k3s ha external db Aurora MySQL 5.7.mysql_aurora.2.10.2
Helm version v2.16.8-rancher2
Downstream cluster type not applicable
Downstream K8s version not applicable
Authentication providers enabled local
Logged in user role Administrator
Browser type Google Chrome
Browser version 108.0.5359.98 (Official Build) (x86_64)
🚨 Additional Reproduction Setup Details: Click to Expand >K3s install command for node one. Replace values in <> ```shell curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION= sh -s - server --token=SECRET --datastore-endpoint= --tls-san --node-external-ip ``` >K3s install command for node two. Replace values in <>. Main difference here is the --token ```shell curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION= sh -s - server --token= --datastore-endpoint= --tls-san --node-external-ip ```

Reproduction steps

  1. Starting from the default Rancher homepage /dashboard/home
  2. Click hamburger menu >>> local >>> Projects/Namespaces >>> Create Project
  3. Fill out the project creation form
    1. Name: test-project
    2. Click Create >>> you are redirected back to the projects and namespaces page
  4. Scroll to the bottom on the page (filter to All Namespaces)
  5. Click the ellipsis (three dots) for test-project >>> click Edit Config
  6. Notice the Name field cannot be edited and is stuck as test-project

Additional Info

RESULTS

✅ Expected

To be able to update the project name that was created

❌ Actual

Unable to edit the project name that was created


Validation Environment

Component Version / Type
Rancher version v2.7-e077f670ab72023102d36725ed1e2e7e56dbcdd4-head
Rancher commit link https://github.com/rancher/rancher/commit/e077f670ab72023102d36725ed1e2e7e56dbcdd4
Installation option Helm (high availability)
If Helm Chart k8s cluster v1.24.7+k3s1
Cert Details Let's Encrypt / traefik
k3s ha external db Aurora MySQL 5.7.mysql_aurora.2.10.2
Helm version v2.16.8-rancher2
Downstream cluster type not applicable
Downstream K8s version not applicable
Authentication providers enabled local
Logged in user role Administrator
Browser type Google Chrome
Browser version 108.0.5359.98 (Official Build) (x86_64)
🚨 Additional Reproduction Setup Details: Click to Expand >K3s install command for node one. Replace values in <> ```shell curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION= sh -s - server --token=SECRET --datastore-endpoint= --tls-san --node-external-ip ``` >K3s install command for node two. Replace values in <>. Main difference here is the --token ```shell curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION= sh -s - server --token= --datastore-endpoint= --tls-san --node-external-ip ```

Validation steps

  1. Starting from the default Rancher homepage /dashboard/home
  2. Click hamburger menu >>> local >>> Projects/Namespaces >>> Create Project
  3. Fill out the project creation form
    1. Name: test-project
    2. Click Create >>> you are redirected back to the projects and namespaces page
  4. Scroll to the bottom on the page (filter to All Namespaces)
  5. Click the ellipsis (three dots) for test-project >>> click Edit Config
  6. Notice the Name field can be edited now
  7. Change the name from test-project >>> to test-project123
  8. Click Save >>> you are then redirected back to the Projects and Namespaces page
  9. There is no failed network requests, but the project name in the UI has not changed and is still just test-project
    1. 200 PUT to >>> v3/projects/local:p-gtjx6?_replace=true
    2. 200 POST to >>> /v3/projects/local:p-gtjx6?action=setpodsecuritypolicytemplate
    3. 200 GET to >>> v1/management.cattle.io.projects
  10. Check the project with kubectl to verify if it has actually been changed or not and the UI is just display incorrect data
  11. Open the Kubectl Shell
  12. Run the following:
k get projects -A
k describe project p-gtjx6 -n local
  1. When checking with kubectl describe the Display Name for the project is still just test-project and not test-project123

Additional Info

RESULTS

✅ Expected

Expected the project name to be updated since it was an option to do so in the UI

❌ Actual

When changing the project name and saving, the save appeared to be successful (no warning in the UI, and no failed network requests etc) However the project name did not change from test-project to test-project123

brudnak commented 1 year ago

✅ PASSED

Reproduction Environment

Not required.


Validation Environment

Component Version / Type
Rancher version v2.7-5df9701e63e148e64c949f49fe768d56ccdfa9b5-head
Rancher commit link https://github.com/rancher/rancher/commit/5df9701e63e148e64c949f49fe768d56ccdfa9b5
Installation option Helm (high availability)
If Helm Chart k8s cluster v1.24.7+k3s1
Cert Details Let's Encrypt / traefik
k3s ha external db Aurora MySQL 5.7.mysql_aurora.2.10.2
Helm version v2.16.8-rancher2
Downstream cluster type RKE1 Linode
Downstream K8s version v1.24.8
Authentication providers enabled local
Logged in user role Administrator, Standard
Browser type Google Chrome
Browser version 108.0.5359.124 (Official Build) (x86_64)
🚨 Additional Reproduction Setup Details: Click to Expand >K3s install command for node one. Replace values in <> ```shell curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION= sh -s - server --token=SECRET --datastore-endpoint= --tls-san --node-external-ip ``` >K3s install command for node two. Replace values in <>. Main difference here is the --token ```shell curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION= sh -s - server --token= --datastore-endpoint= --tls-san --node-external-ip ```

Validation steps

  1. Starting from the default Rancher homepage /dashboard/home
  2. Click hamburger menu >>> local >>> Projects/Namespaces >>> Create Project
  3. Fill out the project creation form
    1. Name: test-project
    2. Click Create >>> you are redirected back to the projects and namespaces page
  4. Scroll to the bottom on the page (filter to All Namespaces)
  5. Click the ellipsis (three dots) for test-project >>> click Edit Config
  6. Notice the Name field can be edited now
  7. Change the name from test-project >>> to test-project123
  8. Click Save >>> you are then redirected back to the Projects and Namespaces page
  9. Project name change successful

Additional Info

RESULTS

✅ Expected

To be able to edit a project name via the Rancher user interface

✅ Actual

I was able to edit the project name via the Rancher user interface

📋 QA Test Plan

Scenario Steps Expected Actual & Pass/Fail
Ensure updating project name is working via kubectl
  1. Create a project
  2. Edit project name with kubectl
  3. Verify the update was successful
Expected: To be able to edit the project name with kubectl without any errors Actual: Able to edit the project name with kubectl

Pass/Fail: ✅PASS
Ensure updating the project name with Postman/API call works
  1. Create a project
  2. Edit the project name using the Rancher API with Postman
  3. Ensure that the change was successful without error
Expected: To be able to edit the project name with API/Postman Actual: Was able to edit the project name with Postman

Pass/Fail: ✅PASS